backends
Creates, updates, deletes, gets or lists a backends
resource.
Overview
Name | backends |
Type | Resource |
Id | firebase.apphosting.backends |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Identifier. The resource name of the backend. Format: projects/{project}/locations/{locationId}/backends/{backendId} . |
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. |
appId | string | Optional. The ID of a Web App associated with the backend. |
codebase | object | Optional. If specified, the connection to an external source repository to watch for event-driven updates to the backend. (id: Codebase) |
createTime | string (google-datetime) | Output only. Time at which the backend was created. |
deleteTime | string (google-datetime) | Output only. Time at which the backend was deleted. |
displayName | string | Optional. Human-readable name. 63 character limit. |
environment | string | Optional. The environment name of the backend, used to load environment variables from environment specific configuration. |
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. |
labels | object | Optional. Unstructured key value map that can be used to organize and categorize objects. |
managedResources | array | Output only. A list of the resources managed by this backend. |
mode | string | Optional. Deprecated: Use environment instead. |
reconciling | boolean | Output only. A field that, if true, indicates that the system is working to make adjustments to the backend during a LRO. |
serviceAccount | string | Required. The name of the service account used for Cloud Build and Cloud Run. Should have the role roles/firebaseapphosting.computeRunner or equivalent permissions. |
servingLocality | string | Required. Immutable. Specifies how App Hosting will serve the content for this backend. It will either be contained to a single region (REGIONAL_STRICT) or allowed to use App Hosting's global-replicated serving infrastructure (GLOBAL_ACCESS). |
uid | string | Output only. System-assigned, unique identifier. |
updateTime | string (google-datetime) | Output only. Time at which the backend was last updated. |
uri | string | Output only. The primary URI to communicate with the backend. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Identifier. The resource name of the backend. Format: projects/{project}/locations/{locationId}/backends/{backendId} . |
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. |
appId | string | Optional. The ID of a Web App associated with the backend. |
codebase | object | Optional. If specified, the connection to an external source repository to watch for event-driven updates to the backend. (id: Codebase) |
createTime | string (google-datetime) | Output only. Time at which the backend was created. |
deleteTime | string (google-datetime) | Output only. Time at which the backend was deleted. |
displayName | string | Optional. Human-readable name. 63 character limit. |
environment | string | Optional. The environment name of the backend, used to load environment variables from environment specific configuration. |
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. |
labels | object | Optional. Unstructured key value map that can be used to organize and categorize objects. |
managedResources | array | Output only. A list of the resources managed by this backend. |
mode | string | Optional. Deprecated: Use environment instead. |
reconciling | boolean | Output only. A field that, if true, indicates that the system is working to make adjustments to the backend during a LRO. |
serviceAccount | string | Required. The name of the service account used for Cloud Build and Cloud Run. Should have the role roles/firebaseapphosting.computeRunner or equivalent permissions. |
servingLocality | string | Required. Immutable. Specifies how App Hosting will serve the content for this backend. It will either be contained to a single region (REGIONAL_STRICT) or allowed to use App Hosting's global-replicated serving infrastructure (GLOBAL_ACCESS). |
uid | string | Output only. System-assigned, unique identifier. |
updateTime | string (google-datetime) | Output only. Time at which the backend was last updated. |
uri | string | Output only. The primary URI to communicate with the backend. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , backendsId | Gets information about a backend. | |
list | select | projectsId , locationsId | pageSize , pageToken , filter , orderBy , showDeleted | Lists backends in a given project and location. |
create | insert | projectsId , locationsId | backendId , requestId , validateOnly | Creates a new backend in a given project and location. |
patch | update | projectsId , locationsId , backendsId | updateMask , requestId , validateOnly , allowMissing | Updates the information for a single backend. |
delete | delete | projectsId , locationsId , backendsId | requestId , force , validateOnly , etag | Deletes a single backend. |
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 | |
locationsId | string | |
projectsId | string | |
allowMissing | boolean | |
backendId | string | |
etag | string | |
filter | string | |
force | boolean | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
requestId | string | |
showDeleted | boolean | |
updateMask | string (google-fieldmask) | |
validateOnly | boolean |
SELECT
examples
- get
- list
Gets information about a backend.
SELECT
name,
annotations,
appId,
codebase,
createTime,
deleteTime,
displayName,
environment,
etag,
labels,
managedResources,
mode,
reconciling,
serviceAccount,
servingLocality,
uid,
updateTime,
uri
FROM firebase.apphosting.backends
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND backendsId = '{{ backendsId }}' -- required;
Lists backends in a given project and location.
SELECT
name,
annotations,
appId,
codebase,
createTime,
deleteTime,
displayName,
environment,
etag,
labels,
managedResources,
mode,
reconciling,
serviceAccount,
servingLocality,
uid,
updateTime,
uri
FROM firebase.apphosting.backends
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}'
AND showDeleted = '{{ showDeleted }}';
INSERT
examples
- create
- Manifest
Creates a new backend in a given project and location.
INSERT INTO firebase.apphosting.backends (
data__name,
data__displayName,
data__mode,
data__servingLocality,
data__codebase,
data__serviceAccount,
data__appId,
data__environment,
data__labels,
data__annotations,
projectsId,
locationsId,
backendId,
requestId,
validateOnly
)
SELECT
'{{ name }}',
'{{ displayName }}',
'{{ mode }}',
'{{ servingLocality }}',
'{{ codebase }}',
'{{ serviceAccount }}',
'{{ appId }}',
'{{ environment }}',
'{{ labels }}',
'{{ annotations }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ backendId }}',
'{{ requestId }}',
'{{ validateOnly }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: backends
props:
- name: projectsId
value: string
description: Required parameter for the backends resource.
- name: locationsId
value: string
description: Required parameter for the backends resource.
- name: name
value: string
description: >
Identifier. The resource name of the backend. Format: `projects/{project}/locations/{locationId}/backends/{backendId}`.
- name: displayName
value: string
description: >
Optional. Human-readable name. 63 character limit.
- name: mode
value: string
description: >
Optional. Deprecated: Use `environment` instead.
- name: servingLocality
value: string
description: >
Required. Immutable. Specifies how App Hosting will serve the content for this backend. It will either be contained to a single region (REGIONAL_STRICT) or allowed to use App Hosting's global-replicated serving infrastructure (GLOBAL_ACCESS).
valid_values: ['SERVING_LOCALITY_UNSPECIFIED', 'REGIONAL_STRICT', 'GLOBAL_ACCESS']
- name: codebase
value: object
description: >
Optional. If specified, the connection to an external source repository to watch for event-driven updates to the backend.
- name: serviceAccount
value: string
description: >
Required. The name of the service account used for Cloud Build and Cloud Run. Should have the role roles/firebaseapphosting.computeRunner or equivalent permissions.
- name: appId
value: string
description: >
Optional. The [ID of a Web App](https://firebase.google.com/docs/reference/firebase-management/rest/v1beta1/projects.webApps#WebApp.FIELDS.app_id) associated with the backend.
- name: environment
value: string
description: >
Optional. The environment name of the backend, used to load environment variables from environment specific configuration.
- name: labels
value: object
description: >
Optional. Unstructured key value map that can be used to organize and categorize objects.
- name: annotations
value: object
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: backendId
value: string
- name: requestId
value: string
- name: validateOnly
value: boolean
UPDATE
examples
- patch
Updates the information for a single backend.
UPDATE firebase.apphosting.backends
SET
data__name = '{{ name }}',
data__displayName = '{{ displayName }}',
data__mode = '{{ mode }}',
data__servingLocality = '{{ servingLocality }}',
data__codebase = '{{ codebase }}',
data__serviceAccount = '{{ serviceAccount }}',
data__appId = '{{ appId }}',
data__environment = '{{ environment }}',
data__labels = '{{ labels }}',
data__annotations = '{{ annotations }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND backendsId = '{{ backendsId }}' --required
AND updateMask = '{{ updateMask}}'
AND requestId = '{{ requestId}}'
AND validateOnly = {{ validateOnly}}
AND allowMissing = {{ allowMissing}}
RETURNING
name,
done,
error,
metadata,
response;
DELETE
examples
- delete
Deletes a single backend.
DELETE FROM firebase.apphosting.backends
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND backendsId = '{{ backendsId }}' --required
AND requestId = '{{ requestId }}'
AND force = '{{ force }}'
AND validateOnly = '{{ validateOnly }}'
AND etag = '{{ etag }}';