REST Resource: projects.locations.backends

Resource: Backend

A backend is the primary resource of App Hosting.

JSON representation
{
  "name": string,
  "displayName": string,
  "servingLocality": enum (ServingLocality),
  "codebase": {
    object (Codebase)
  },
  "uri": string,
  "managedResources": [
    {
      object (ManagedResource)
    }
  ],
  "serviceAccount": string,
  "appId": string,
  "environment": string,
  "reconciling": boolean,
  "createTime": string,
  "updateTime": string,
  "deleteTime": string,
  "labels": {
    string: string,
    ...
  },
  "annotations": {
    string: string,
    ...
  },
  "uid": string,
  "etag": string
}
Fields
name

string

Identifier. The resource name of the backend.

Format:

projects/{project}/locations/{locationId}/backends/{backendId}.

displayName

string

Optional. Human-readable name. 63 character limit.

servingLocality

enum (ServingLocality)

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).

codebase

object (Codebase)

Optional. If specified, the connection to an external source repository to watch for event-driven updates to the backend.

uri

string

Output only. The primary URI to communicate with the backend.

managedResources[]

object (ManagedResource)

Output only. A list of the resources managed by this backend.

serviceAccount

string

Required. The name of the service account used for Cloud Build and Cloud Run. Should have the role roles/firebaseapphosting.googleapis.com/computeRunner or equivalent permissions.

appId

string

Optional. The ID of a Web App associated with the backend.

environment

string

Optional. The environment name of the backend, used to load environment variables from environment specific configuration.

reconciling

boolean

Output only. A field that, if true, indicates that the system is working to make adjustments to the backend during a LRO.

createTime

string (Timestamp format)

Output only. Time at which the backend was created.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

updateTime

string (Timestamp format)

Output only. Time at which the backend was last updated.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

deleteTime

string (Timestamp format)

Output only. Time at which the backend was deleted.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

labels

map (key: string, value: string)

Optional. Unstructured key value map that can be used to organize and categorize objects.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

annotations

map (key: string, value: string)

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.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

uid

string

Output only. System-assigned, unique identifier.

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.

ServingLocality

Specifies how App Hosting replicates and serves your backend's data.

Enums
SERVING_LOCALITY_UNSPECIFIED Unspecified. Will return an error if used.
REGIONAL_STRICT In this mode, App Hosting serves your backend's content from your chosen parent region. App Hosting only maintains data and serving infrastructure in that chosen region and does not replicate your data to other regions.
GLOBAL_ACCESS In this mode, App Hosting serves your backend's content from multiple points-of-presence (POP) across the globe. App Hosting replicates your backend's configuration and cached data to these POPs and uses a global CDN to further decrease response latency. App Hosting-maintained Cloud Resources on your project, such as Cloud Run services, Cloud Build build, and Artifact Registry Images are still confined to your backend's parent region. Responses cached by the CDN may be stored in the POPs for the duration of the cache's TTL.

Codebase

The connection to an external source repository to watch for event-driven updates to the backend.

JSON representation
{
  "repository": string,
  "rootDirectory": string
}
Fields
repository

string

Required. The resource name for the Developer Connect gitRepositoryLink connected to this backend, in the format:

projects/{project}/locations/{location}/connections/{connection}/gitRepositoryLinks/{repositoryLink}

The connection for the gitRepositoryLink must made be using the Firebase App Hosting Github App via the Firebase Console.

rootDirectory

string

Optional. If repository is provided, the directory relative to the root of the repository to use as the root for the deployed web app.

ManagedResource

An external resource managed by App Hosting on the project.

JSON representation
{

  // Union field managed_resource can be only one of the following:
  "runService": {
    object (RunService)
  }
  // End of list of possible types for union field managed_resource.
}
Fields

Union field managed_resource.

managed_resource can be only one of the following:

runService

object (RunService)

A Cloud Run service, managed by App Hosting.

RunService

A managed Cloud Run service.

JSON representation
{
  "service": string
}
Fields
service

string

Optional. The name of the Cloud Run service, in the format:

projects/{project}/locations/{location}/services/{serviceId}

Methods

create

Creates a new backend in a given project and location.

delete

Deletes a single backend.

get

Gets information about a backend.

getTraffic

Gets information about a backend's traffic.

list

Lists backends in a given project and location.

patch

Updates the information for a single backend.

updateTraffic

Updates a backend's traffic.