builds
Creates, updates, deletes, gets or lists a builds resource.
Overview
| Name | builds |
| Type | Resource |
| Id | firebase.apphosting.builds |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | Identifier. The resource name of the build. Format: projects/{project}/locations/{locationId}/backends/{backendId}/builds/{buildId}. |
annotations | object | Optional. 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. |
buildLogsUri | string | Output only. The location of the Cloud Build logs for the build process. |
config | object | Optional. Additional configuration of the service. (id: Config) |
createTime | string (google-datetime) | Output only. Time at which the build was created. |
deleteTime | string (google-datetime) | Output only. Time at which the build was deleted. |
displayName | string | Optional. Human-readable name. 63 character limit. |
environment | string | Output only. The environment name of the backend when this build was created. |
errors | array | Output only. A list of all errors that occurred during an App Hosting build. |
etag | string | Output only. Server-computed checksum based on other values; may be sent on update or delete to ensure operation is done on expected resource. |
image | string | Output only. The Artifact Registry container image URI, used by the Cloud Run revision for this build. |
labels | object | Optional. Unstructured key value map that can be used to organize and categorize objects. |
reconciling | boolean | Output only. A field that, if true, indicates that the build has an ongoing LRO. |
source | object | Required. Immutable. The source for the build. (id: BuildSource) |
state | string | Output only. The state of the build. (STATE_UNSPECIFIED, BUILDING, BUILT, DEPLOYING, READY, FAILED, SKIPPED, EXPIRED) |
uid | string | Output only. System-assigned, unique identifier. |
updateTime | string (google-datetime) | Output only. Time at which the build was last updated. |
| Name | Datatype | Description |
|---|---|---|
name | string | Identifier. The resource name of the build. Format: projects/{project}/locations/{locationId}/backends/{backendId}/builds/{buildId}. |
annotations | object | Optional. 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. |
buildLogsUri | string | Output only. The location of the Cloud Build logs for the build process. |
config | object | Optional. Additional configuration of the service. (id: Config) |
createTime | string (google-datetime) | Output only. Time at which the build was created. |
deleteTime | string (google-datetime) | Output only. Time at which the build was deleted. |
displayName | string | Optional. Human-readable name. 63 character limit. |
environment | string | Output only. The environment name of the backend when this build was created. |
errors | array | Output only. A list of all errors that occurred during an App Hosting build. |
etag | string | Output only. Server-computed checksum based on other values; may be sent on update or delete to ensure operation is done on expected resource. |
image | string | Output only. The Artifact Registry container image URI, used by the Cloud Run revision for this build. |
labels | object | Optional. Unstructured key value map that can be used to organize and categorize objects. |
reconciling | boolean | Output only. A field that, if true, indicates that the build has an ongoing LRO. |
source | object | Required. Immutable. The source for the build. (id: BuildSource) |
state | string | Output only. The state of the build. (STATE_UNSPECIFIED, BUILDING, BUILT, DEPLOYING, READY, FAILED, SKIPPED, EXPIRED) |
uid | string | Output only. System-assigned, unique identifier. |
updateTime | string (google-datetime) | Output only. Time at which the build was last updated. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | projectsId, locationsId, backendsId, buildsId | Gets information about a build. | |
list | select | projectsId, locationsId, backendsId | pageSize, pageToken, orderBy, filter, showDeleted | Lists builds in a given project, location, and backend. |
create | insert | projectsId, locationsId, backendsId | buildId, requestId, validateOnly | Creates a new build for a backend. |
delete | delete | projectsId, locationsId, backendsId, buildsId | validateOnly, requestId, etag | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
backendsId | string | |
buildsId | string | |
locationsId | string | |
projectsId | string | |
buildId | string | |
etag | string | |
filter | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
requestId | string | |
showDeleted | boolean | |
validateOnly | boolean |
SELECT examples
- get
- list
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
;
Lists builds in a given project, location, and backend.
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 pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND orderBy = '{{ orderBy }}'
AND filter = '{{ filter }}'
AND showDeleted = '{{ showDeleted }}'
;
INSERT examples
- create
- Manifest
Creates a new build for a backend.
INSERT INTO firebase.apphosting.builds (
data__labels,
data__source,
data__name,
data__displayName,
data__config,
data__annotations,
projectsId,
locationsId,
backendsId,
buildId,
requestId,
validateOnly
)
SELECT
'{{ labels }}',
'{{ source }}',
'{{ name }}',
'{{ displayName }}',
'{{ config }}',
'{{ annotations }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ backendsId }}',
'{{ buildId }}',
'{{ requestId }}',
'{{ validateOnly }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: builds
props:
- name: projectsId
value: "{{ projectsId }}"
description: Required parameter for the builds resource.
- name: locationsId
value: "{{ locationsId }}"
description: Required parameter for the builds resource.
- name: backendsId
value: "{{ backendsId }}"
description: Required parameter for the builds resource.
- name: labels
value: "{{ labels }}"
description: |
Optional. Unstructured key value map that can be used to organize and categorize objects.
- name: source
description: |
Required. Immutable. The source for the build.
value:
archive:
externalSignedUri: "{{ externalSignedUri }}"
description: "{{ description }}"
userStorageUri: "{{ userStorageUri }}"
author:
imageUri: "{{ imageUri }}"
displayName: "{{ displayName }}"
email: "{{ email }}"
rootDirectory: "{{ rootDirectory }}"
codebase:
uri: "{{ uri }}"
author:
email: "{{ email }}"
displayName: "{{ displayName }}"
imageUri: "{{ imageUri }}"
commit: "{{ commit }}"
hash: "{{ hash }}"
commitTime: "{{ commitTime }}"
branch: "{{ branch }}"
displayName: "{{ displayName }}"
repository: "{{ repository }}"
commitMessage: "{{ commitMessage }}"
container:
image: "{{ image }}"
- name: name
value: "{{ name }}"
description: |
Identifier. The resource name of the build. Format: `projects/{project}/locations/{locationId}/backends/{backendId}/builds/{buildId}`.
- name: displayName
value: "{{ displayName }}"
description: |
Optional. Human-readable name. 63 character limit.
- name: config
description: |
Optional. Additional configuration of the service.
value:
runConfig:
concurrency: {{ concurrency }}
maxInstances: {{ maxInstances }}
minInstances: {{ minInstances }}
cpu: {{ cpu }}
memoryMib: {{ memoryMib }}
env:
- value: "{{ value }}"
secret: "{{ secret }}"
originFileName: "{{ originFileName }}"
variable: "{{ variable }}"
availability: "{{ availability }}"
origin: "{{ origin }}"
effectiveEnv:
- value: "{{ value }}"
secret: "{{ secret }}"
originFileName: "{{ originFileName }}"
variable: "{{ variable }}"
availability: "{{ availability }}"
origin: "{{ origin }}"
- name: annotations
value: "{{ annotations }}"
description: |
Optional. 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.
- name: buildId
value: "{{ buildId }}"
- name: requestId
value: "{{ requestId }}"
- name: validateOnly
value: {{ validateOnly }}
DELETE examples
- delete
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 validateOnly = '{{ validateOnly }}'
AND requestId = '{{ requestId }}'
AND etag = '{{ etag }}'
;