Skip to main content

backends

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

Overview

Namebackends
TypeResource
Idfirebase.apphosting.backends

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringIdentifier. The resource name of the backend. Format: projects/{project}/locations/{locationId}/backends/{backendId}.
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.
appIdstringOptional. The ID of a Web App associated with the backend.
codebaseobjectOptional. If specified, the connection to an external source repository to watch for event-driven updates to the backend. (id: Codebase)
createTimestring (google-datetime)Output only. Time at which the backend was created.
deleteTimestring (google-datetime)Output only. Time at which the backend was deleted.
displayNamestringOptional. Human-readable name. 63 character limit.
environmentstringOptional. The environment name of the backend, used to load environment variables from environment specific configuration.
etagstringOutput only. Server-computed checksum based on other values; may be sent on update or delete to ensure operation is done on expected resource.
labelsobjectOptional. Unstructured key value map that can be used to organize and categorize objects.
managedResourcesarrayOutput only. A list of the resources managed by this backend.
modestringOptional. Deprecated: Use environment instead.
reconcilingbooleanOutput only. A field that, if true, indicates that the system is working to make adjustments to the backend during a LRO.
serviceAccountstringRequired. The name of the service account used for Cloud Build and Cloud Run. Should have the role roles/firebaseapphosting.computeRunner or equivalent permissions.
servingLocalitystringRequired. 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).
uidstringOutput only. System-assigned, unique identifier.
updateTimestring (google-datetime)Output only. Time at which the backend was last updated.
uristringOutput only. The primary URI to communicate with the backend.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, backendsIdGets information about a backend.
listselectprojectsId, locationsIdpageSize, pageToken, filter, orderBy, showDeletedLists backends in a given project and location.
createinsertprojectsId, locationsIdbackendId, requestId, validateOnlyCreates a new backend in a given project and location.
patchupdateprojectsId, locationsId, backendsIdupdateMask, requestId, validateOnly, allowMissingUpdates the information for a single backend.
deletedeleteprojectsId, locationsId, backendsIdrequestId, force, validateOnly, etagDeletes 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.

NameDatatypeDescription
backendsIdstring
locationsIdstring
projectsIdstring
allowMissingboolean
backendIdstring
etagstring
filterstring
forceboolean
orderBystring
pageSizeinteger (int32)
pageTokenstring
requestIdstring
showDeletedboolean
updateMaskstring (google-fieldmask)
validateOnlyboolean

SELECT examples

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;

INSERT examples

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
;

UPDATE examples

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

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 }}';