Skip to main content

builds

Creates, updates, deletes, gets or lists a builds resource.

Overview

Namebuilds
TypeResource
Idfirebase.apphosting.builds

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringIdentifier. The resource name of the build. Format: projects/{project}/locations/{locationId}/backends/{backendId}/builds/{buildId}.
annotationsobjectOptional. Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved when modifying objects.
buildLogsUristringOutput only. The location of the Cloud Build logs for the build process.
configobjectOptional. Additional configuration of the service. (id: Config)
createTimestring (google-datetime)Output only. Time at which the build was created.
deleteTimestring (google-datetime)Output only. Time at which the build was deleted.
displayNamestringOptional. Human-readable name. 63 character limit.
environmentstringOutput only. The environment name of the backend when this build was created.
errorsarrayOutput only. A list of all errors that occurred during an App Hosting build.
etagstringOutput only. Server-computed checksum based on other values; may be sent on update or delete to ensure operation is done on expected resource.
imagestringOutput only. The Artifact Registry container image URI, used by the Cloud Run revision for this build.
labelsobjectOptional. Unstructured key value map that can be used to organize and categorize objects.
reconcilingbooleanOutput only. A field that, if true, indicates that the build has an ongoing LRO.
sourceobjectRequired. Immutable. The source for the build. (id: BuildSource)
statestringOutput only. The state of the build.
uidstringOutput only. System-assigned, unique identifier.
updateTimestring (google-datetime)Output only. Time at which the build was last updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, backendsId, buildsIdGets information about a build.
listselectprojectsId, locationsId, backendsIdpageSize, pageToken, filter, orderBy, showDeletedLists builds in a given project, location, and backend.
createinsertprojectsId, locationsId, backendsIdbuildId, requestId, validateOnlyCreates a new build for a backend.
deletedeleteprojectsId, locationsId, backendsId, buildsIdrequestId, etag, validateOnlyDeletes a single build.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
backendsIdstring
buildsIdstring
locationsIdstring
projectsIdstring
buildIdstring
etagstring
filterstring
orderBystring
pageSizeinteger (int32)
pageTokenstring
requestIdstring
showDeletedboolean
validateOnlyboolean

SELECT examples

Gets information about a build.

SELECT
name,
annotations,
buildLogsUri,
config,
createTime,
deleteTime,
displayName,
environment,
errors,
etag,
image,
labels,
reconciling,
source,
state,
uid,
updateTime
FROM firebase.apphosting.builds
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND backendsId = '{{ backendsId }}' -- required
AND buildsId = '{{ buildsId }}' -- required;

INSERT examples

Creates a new build for a backend.

INSERT INTO firebase.apphosting.builds (
data__name,
data__displayName,
data__config,
data__source,
data__labels,
data__annotations,
projectsId,
locationsId,
backendsId,
buildId,
requestId,
validateOnly
)
SELECT
'{{ name }}',
'{{ displayName }}',
'{{ config }}',
'{{ source }}',
'{{ labels }}',
'{{ annotations }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ backendsId }}',
'{{ buildId }}',
'{{ requestId }}',
'{{ validateOnly }}'
RETURNING
name,
done,
error,
metadata,
response
;

DELETE examples

Deletes a single build.

DELETE FROM firebase.apphosting.builds
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND backendsId = '{{ backendsId }}' --required
AND buildsId = '{{ buildsId }}' --required
AND requestId = '{{ requestId }}'
AND etag = '{{ etag }}'
AND validateOnly = '{{ validateOnly }}';