- [Resource: Service](https://docs.cloud.google.com/run/docs/reference/rest/v2/projects.locations.services#Service)
  - [JSON representation](https://docs.cloud.google.com/run/docs/reference/rest/v2/projects.locations.services#Service.SCHEMA_REPRESENTATION)
- [RevisionTemplate](https://docs.cloud.google.com/run/docs/reference/rest/v2/projects.locations.services#RevisionTemplate)
  - [JSON representation](https://docs.cloud.google.com/run/docs/reference/rest/v2/projects.locations.services#RevisionTemplate.SCHEMA_REPRESENTATION)
- [TrafficTarget](https://docs.cloud.google.com/run/docs/reference/rest/v2/projects.locations.services#TrafficTarget)
  - [JSON representation](https://docs.cloud.google.com/run/docs/reference/rest/v2/projects.locations.services#TrafficTarget.SCHEMA_REPRESENTATION)
- [TrafficTargetAllocationType](https://docs.cloud.google.com/run/docs/reference/rest/v2/projects.locations.services#TrafficTargetAllocationType)
- [ServiceScaling](https://docs.cloud.google.com/run/docs/reference/rest/v2/projects.locations.services#ServiceScaling)
  - [JSON representation](https://docs.cloud.google.com/run/docs/reference/rest/v2/projects.locations.services#ServiceScaling.SCHEMA_REPRESENTATION)
- [ScalingMode](https://docs.cloud.google.com/run/docs/reference/rest/v2/projects.locations.services#ScalingMode)
- [MultiRegionSettings](https://docs.cloud.google.com/run/docs/reference/rest/v2/projects.locations.services#MultiRegionSettings)
  - [JSON representation](https://docs.cloud.google.com/run/docs/reference/rest/v2/projects.locations.services#MultiRegionSettings.SCHEMA_REPRESENTATION)
- [TrafficTargetStatus](https://docs.cloud.google.com/run/docs/reference/rest/v2/projects.locations.services#TrafficTargetStatus)
  - [JSON representation](https://docs.cloud.google.com/run/docs/reference/rest/v2/projects.locations.services#TrafficTargetStatus.SCHEMA_REPRESENTATION)
- [BuildConfig](https://docs.cloud.google.com/run/docs/reference/rest/v2/projects.locations.services#BuildConfig)
  - [JSON representation](https://docs.cloud.google.com/run/docs/reference/rest/v2/projects.locations.services#BuildConfig.SCHEMA_REPRESENTATION)
- [Methods](https://docs.cloud.google.com/run/docs/reference/rest/v2/projects.locations.services#METHODS_SUMMARY)

## Resource: Service

Service acts as a top-level container that manages a set of configurations and revision templates which implement a network service. Service exists to provide a singular abstraction which can be access controlled, reasoned about, and which encapsulates software lifecycle decisions such as rollout policy and team resource ownership.

| JSON representation |
|---|
| ``` { "name": string, "description": string, "uid": string, "generation": string, "labels": { string: string, ... }, "annotations": { string: string, ... }, "createTime": string, "updateTime": string, "deleteTime": string, "expireTime": string, "creator": string, "lastModifier": string, "client": string, "clientVersion": string, "ingress": enum (`https://docs.cloud.google.com/run/docs/reference/rest/v2/IngressTraffic`), "launchStage": enum (`https://docs.cloud.google.com/run/docs/reference/rest/v2/LaunchStage`), "binaryAuthorization": { object (`https://docs.cloud.google.com/run/docs/reference/rest/v2/BinaryAuthorization`) }, "template": { object (`https://docs.cloud.google.com/run/docs/reference/rest/v2/projects.locations.services#RevisionTemplate`) }, "traffic": [ { object (`https://docs.cloud.google.com/run/docs/reference/rest/v2/projects.locations.services#TrafficTarget`) } ], "scaling": { object (`https://docs.cloud.google.com/run/docs/reference/rest/v2/projects.locations.services#ServiceScaling`) }, "invokerIamDisabled": boolean, "defaultUriDisabled": boolean, "urls": [ string ], "iapEnabled": boolean, "multiRegionSettings": { object (`https://docs.cloud.google.com/run/docs/reference/rest/v2/projects.locations.services#MultiRegionSettings`) }, "customAudiences": [ string ], "observedGeneration": string, "terminalCondition": { object (`https://docs.cloud.google.com/run/docs/reference/rest/v2/Condition`) }, "conditions": [ { object (`https://docs.cloud.google.com/run/docs/reference/rest/v2/Condition`) } ], "latestReadyRevision": string, "latestCreatedRevision": string, "trafficStatuses": [ { object (`https://docs.cloud.google.com/run/docs/reference/rest/v2/projects.locations.services#TrafficTargetStatus`) } ], "uri": string, "satisfiesPzs": boolean, "threatDetectionEnabled": boolean, "buildConfig": { object (`https://docs.cloud.google.com/run/docs/reference/rest/v2/projects.locations.services#BuildConfig`) }, "reconciling": boolean, "etag": string, "sshEnabled": boolean } ``` |

| Fields ||
|---|---|
| `name` | `string` Identifier. The fully qualified name of this Service. In CreateServiceRequest, this field is ignored, and instead composed from CreateServiceRequest.parent and CreateServiceRequest.service_id. Format: projects/{project}/locations/{location}/services/{serviceId} |
| `description` | `string` User-provided description of the Service. This field currently has a 512-character limit. |
| `uid` | `string` Output only. Server assigned unique identifier for the trigger. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted. |
| `generation` | `string (https://developers.google.com/discovery/v1/type-format format)` Output only. A number that monotonically increases every time the user modifies the desired state. Please note that unlike v1, this is an int64 value. As with most Google APIs, its JSON representation will be a `string` instead of an `integer`. |
| `labels` | `map (key: string, value: string)` Optional. Unstructured key value map that can be used to organize and categorize objects. User-provided labels are shared with Google's billing system, so they can be used to filter, or break down billing charges by team, component, environment, state, etc. For more information, visit <https://cloud.google.com/resource-manager/docs/creating-managing-labels> or <https://cloud.google.com/run/docs/configuring/labels>. <br /> Cloud Run API v2 does not support labels with `run.googleapis.com`, `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` namespaces, and they will be rejected. All system labels in v1 now have a corresponding field in v2 Service. 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. <br /> Cloud Run API v2 does not support annotations with `run.googleapis.com`, `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` namespaces, and they will be rejected in new resources. All system annotations in v1 now have a corresponding field in v2 Service. <br /> This field follows Kubernetes annotations' namespacing, limits, and rules. An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |
| `createTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The creation time. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `updateTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The last-modified time. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `deleteTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The deletion time. It is only populated as a response to a Delete request. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `expireTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. For a deleted resource, the time after which it will be permanently deleted. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `creator` | `string` Output only. Email address of the authenticated creator. |
| `lastModifier` | `string` Output only. Email address of the last authenticated modifier. |
| `client` | `string` Arbitrary identifier for the API client. |
| `clientVersion` | `string` Arbitrary version identifier for the API client. |
| `ingress` | ``enum (`https://docs.cloud.google.com/run/docs/reference/rest/v2/IngressTraffic`)`` Optional. Provides the ingress settings for this Service. On output, returns the currently observed ingress settings, or INGRESS_TRAFFIC_UNSPECIFIED if no revision is active. |
| `launchStage` | ``enum (`https://docs.cloud.google.com/run/docs/reference/rest/v2/LaunchStage`)`` Optional. The launch stage as defined by [Google Cloud Platform Launch Stages](https://cloud.google.com/terms/launch-stages). Cloud Run supports `ALPHA`, `BETA`, and `GA`. If no value is specified, GA is assumed. Set the launch stage to a preview stage on input to allow use of preview features in that stage. On read (or output), describes whether the resource uses preview features. For example, if ALPHA is provided as input, but only BETA and GA-level features are used, this field will be BETA on output. |
| `binaryAuthorization` | ``object (`https://docs.cloud.google.com/run/docs/reference/rest/v2/BinaryAuthorization`)`` Optional. Settings for the Binary Authorization feature. |
| `template` | ``object (`https://docs.cloud.google.com/run/docs/reference/rest/v2/projects.locations.services#RevisionTemplate`)`` Required. The template used to create revisions for this Service. |
| `traffic[]` | ``object (`https://docs.cloud.google.com/run/docs/reference/rest/v2/projects.locations.services#TrafficTarget`)`` Optional. Specifies how to distribute traffic over a collection of Revisions belonging to the Service. If traffic is empty or not provided, defaults to 100% traffic to the latest `Ready` Revision. |
| `scaling` | ``object (`https://docs.cloud.google.com/run/docs/reference/rest/v2/projects.locations.services#ServiceScaling`)`` Optional. Specifies service-level scaling settings |
| `invokerIamDisabled` | `boolean` Optional. Disables IAM permission check for run.routes.invoke for callers of this service. For more information, visit <https://cloud.google.com/run/docs/securing/managing-access#invoker_check>. |
| `defaultUriDisabled` | `boolean` Optional. Disables public resolution of the default URI of this service. |
| `urls[]` | `string` Output only. All URLs serving traffic for this Service. |
| `iapEnabled` | `boolean` Optional. IAP settings on the Service. |
| `multiRegionSettings` | ``object (`https://docs.cloud.google.com/run/docs/reference/rest/v2/projects.locations.services#MultiRegionSettings`)`` Optional. Settings for multi-region deployment. |
| `customAudiences[]` | `string` One or more custom audiences that you want this service to support. Specify each custom audience as the full URL in a string. The custom audiences are encoded in the token and used to authenticate requests. For more information, see <https://cloud.google.com/run/docs/configuring/custom-audiences>. |
| `observedGeneration` | `string (https://developers.google.com/discovery/v1/type-format format)` Output only. The generation of this Service currently serving traffic. See comments in `reconciling` for additional information on reconciliation process in Cloud Run. Please note that unlike v1, this is an int64 value. As with most Google APIs, its JSON representation will be a `string` instead of an `integer`. |
| `terminalCondition` | ``object (`https://docs.cloud.google.com/run/docs/reference/rest/v2/Condition`)`` Output only. The Condition of this Service, containing its readiness status, and detailed error information in case it did not reach a serving state. See comments in `reconciling` for additional information on reconciliation process in Cloud Run. |
| `conditions[]` | ``object (`https://docs.cloud.google.com/run/docs/reference/rest/v2/Condition`)`` Output only. The Conditions of all other associated sub-resources. They contain additional diagnostics information in case the Service does not reach its Serving state. See comments in `reconciling` for additional information on reconciliation process in Cloud Run. |
| `latestReadyRevision` | `string` Output only. Name of the latest revision that is serving traffic. See comments in `reconciling` for additional information on reconciliation process in Cloud Run. |
| `latestCreatedRevision` | `string` Output only. Name of the last created revision. See comments in `reconciling` for additional information on reconciliation process in Cloud Run. |
| `trafficStatuses[]` | ``object (`https://docs.cloud.google.com/run/docs/reference/rest/v2/projects.locations.services#TrafficTargetStatus`)`` Output only. Detailed status information for corresponding traffic targets. See comments in `reconciling` for additional information on reconciliation process in Cloud Run. |
| `uri` | `string` Output only. The main URI in which this Service is serving traffic. |
| `satisfiesPzs` | `boolean` Output only. Reserved for future use. |
| `threatDetectionEnabled` | `boolean` Output only. True if Cloud Run Threat Detection monitoring is enabled for the parent project of this Service. |
| `buildConfig` | ``object (`https://docs.cloud.google.com/run/docs/reference/rest/v2/projects.locations.services#BuildConfig`)`` Optional. Configuration for building a Cloud Run function. |
| `reconciling` | `boolean` Output only. Returns true if the Service is currently being acted upon by the system to bring it into the desired state. When a new Service is created, or an existing one is updated, Cloud Run will asynchronously perform all necessary steps to bring the Service to the desired serving state. This process is called reconciliation. While reconciliation is in process, `observedGeneration`, `latestReadyRevision`, `trafficStatuses`, and `uri` will have transient values that might mismatch the intended state: Once reconciliation is over (and this field is false), there are two possible outcomes: reconciliation succeeded and the serving state matches the Service, or there was an error, and reconciliation failed. This state can be found in `terminalCondition.state`. If reconciliation succeeded, the following fields will match: `traffic` and `trafficStatuses`, `observedGeneration` and `generation`, `latestReadyRevision` and `latestCreatedRevision`. If reconciliation failed, `trafficStatuses`, `observedGeneration`, and `latestReadyRevision` will have the state of the last serving revision, or empty for newly created Services. Additional information on the failure can be found in `terminalCondition` and `conditions`. |
| `etag` | `string` Optional. A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates. |
| `sshEnabled` | `boolean` Optional. Enables SSH access to the Service. |

## RevisionTemplate

RevisionTemplate describes the data a revision should have when created from a template.

| JSON representation |
|---|
| ``` { "revision": string, "labels": { string: string, ... }, "annotations": { string: string, ... }, "scaling": { object (`https://docs.cloud.google.com/run/docs/reference/rest/v2/RevisionScaling`) }, "vpcAccess": { object (`https://docs.cloud.google.com/run/docs/reference/rest/v2/VpcAccess`) }, "timeout": string, "serviceAccount": string, "containers": [ { object (`https://docs.cloud.google.com/run/docs/reference/rest/v2/Container`) } ], "volumes": [ { object (`https://docs.cloud.google.com/run/docs/reference/rest/v2/Volume`) } ], "executionEnvironment": enum (`https://docs.cloud.google.com/run/docs/reference/rest/v2/ExecutionEnvironment`), "encryptionKey": string, "maxInstanceRequestConcurrency": integer, "serviceMesh": { object (`https://docs.cloud.google.com/run/docs/reference/rest/v2/ServiceMesh`) }, "encryptionKeyRevocationAction": enum (`https://docs.cloud.google.com/run/docs/reference/rest/v2/EncryptionKeyRevocationAction`), "encryptionKeyShutdownDuration": string, "sessionAffinity": boolean, "healthCheckDisabled": boolean, "nodeSelector": { object (`https://docs.cloud.google.com/run/docs/reference/rest/v2/NodeSelector`) }, "client": string, "clientVersion": string, "gpuZonalRedundancyDisabled": boolean } ``` |

| Fields ||
|---|---|
| `revision` | `string` Optional. The unique name for the revision. If this field is omitted, it will be automatically generated based on the Service name. |
| `labels` | `map (key: string, value: string)` Optional. Unstructured key value map that can be used to organize and categorize objects. User-provided labels are shared with Google's billing system, so they can be used to filter, or break down billing charges by team, component, environment, state, etc. For more information, visit <https://cloud.google.com/resource-manager/docs/creating-managing-labels> or <https://cloud.google.com/run/docs/configuring/labels>. <br /> Cloud Run API v2 does not support labels with `run.googleapis.com`, `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` namespaces, and they will be rejected. All system labels in v1 now have a corresponding field in v2 RevisionTemplate. 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. <br /> Cloud Run API v2 does not support annotations with `run.googleapis.com`, `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` namespaces, and they will be rejected. All system annotations in v1 now have a corresponding field in v2 RevisionTemplate. <br /> This field follows Kubernetes annotations' namespacing, limits, and rules. An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |
| `scaling` | ``object (`https://docs.cloud.google.com/run/docs/reference/rest/v2/RevisionScaling`)`` Optional. Scaling settings for this Revision. |
| `vpcAccess` | ``object (`https://docs.cloud.google.com/run/docs/reference/rest/v2/VpcAccess`)`` Optional. VPC Access configuration to use for this Revision. For more information, visit <https://cloud.google.com/run/docs/configuring/connecting-vpc>. |
| `timeout` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#duration` format)`` Optional. Max allowed time for an instance to respond to a request. A duration in seconds with up to nine fractional digits, ending with '`s`'. Example: `"3.5s"`. |
| `serviceAccount` | `string` Optional. Email address of the IAM service account associated with the revision of the service. The service account represents the identity of the running revision, and determines what permissions the revision has. If not provided, the revision will use the project's default service account. |
| `containers[]` | ``object (`https://docs.cloud.google.com/run/docs/reference/rest/v2/Container`)`` Holds the list which define the units of execution for this Revision. |
| `volumes[]` | ``object (`https://docs.cloud.google.com/run/docs/reference/rest/v2/Volume`)`` Optional. A list of Volumes to make available to containers. |
| `executionEnvironment` | ``enum (`https://docs.cloud.google.com/run/docs/reference/rest/v2/ExecutionEnvironment`)`` Optional. The sandbox environment to host this Revision. |
| `encryptionKey` | `string` A reference to a customer managed encryption key (CMEK) to use to encrypt this container image. For more information, go to <https://cloud.google.com/run/docs/securing/using-cmek> |
| `maxInstanceRequestConcurrency` | `integer` Optional. Sets the maximum number of requests that each serving instance can receive. If not specified or 0, concurrency defaults to 80 when requested `CPU >= 1` and defaults to 1 when requested `CPU < 1`. |
| `serviceMesh` | ``object (`https://docs.cloud.google.com/run/docs/reference/rest/v2/ServiceMesh`)`` Optional. Enables service mesh connectivity. |
| `encryptionKeyRevocationAction` | ``enum (`https://docs.cloud.google.com/run/docs/reference/rest/v2/EncryptionKeyRevocationAction`)`` Optional. The action to take if the encryption key is revoked. |
| `encryptionKeyShutdownDuration` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#duration` format)`` Optional. If encryptionKeyRevocationAction is SHUTDOWN, the duration before shutting down all instances. The minimum increment is 1 hour. A duration in seconds with up to nine fractional digits, ending with '`s`'. Example: `"3.5s"`. |
| `sessionAffinity` | `boolean` Optional. Enable session affinity. |
| `healthCheckDisabled` | `boolean` Optional. Disables health checking containers during deployment. |
| `nodeSelector` | ``object (`https://docs.cloud.google.com/run/docs/reference/rest/v2/NodeSelector`)`` Optional. The node selector for the revision template. |
| `client` | `string` Optional. Arbitrary identifier for the API client. |
| `clientVersion` | `string` Optional. Arbitrary version identifier for the API client. |
| `gpuZonalRedundancyDisabled` | `boolean` Optional. True if GPU zonal redundancy is disabled on this revision. |

## TrafficTarget

Holds a single traffic routing entry for the Service. Allocations can be done to a specific Revision name, or pointing to the latest Ready Revision.

| JSON representation |
|---|
| ``` { "type": enum (`https://docs.cloud.google.com/run/docs/reference/rest/v2/projects.locations.services#TrafficTargetAllocationType`), "revision": string, "percent": integer, "tag": string } ``` |

| Fields ||
|---|---|
| `type` | ``enum (`https://docs.cloud.google.com/run/docs/reference/rest/v2/projects.locations.services#TrafficTargetAllocationType`)`` The allocation type for this traffic target. |
| `revision` | `string` Revision to which to send this portion of traffic, if traffic allocation is by revision. |
| `percent` | `integer` Specifies percent of the traffic to this Revision. This defaults to zero if unspecified. |
| `tag` | `string` Indicates a string to be part of the URI to exclusively reference this target. |

## TrafficTargetAllocationType

The type of instance allocation.

| Enums ||
|---|---|
| `TRAFFIC_TARGET_ALLOCATION_TYPE_UNSPECIFIED` | Unspecified instance allocation type. |
| `TRAFFIC_TARGET_ALLOCATION_TYPE_LATEST` | Allocates instances to the Service's latest ready Revision. |
| `TRAFFIC_TARGET_ALLOCATION_TYPE_REVISION` | Allocates instances to a Revision by name. |

## ServiceScaling

Scaling settings applied at the service level rather than at the revision level.

| JSON representation |
|---|
| ``` { "minInstanceCount": integer, "scalingMode": enum (`https://docs.cloud.google.com/run/docs/reference/rest/v2/projects.locations.services#ScalingMode`), "maxInstanceCount": integer, "manualInstanceCount": integer } ``` |

| Fields ||
|---|---|
| `minInstanceCount` | `integer` Optional. total min instances for the service. This number of instances is divided among all revisions with specified traffic based on the percent of traffic they are receiving. |
| `scalingMode` | ``enum (`https://docs.cloud.google.com/run/docs/reference/rest/v2/projects.locations.services#ScalingMode`)`` Optional. The scaling mode for the service. |
| `maxInstanceCount` | `integer` Optional. total max instances for the service. This number of instances is divided among all revisions with specified traffic based on the percent of traffic they are receiving. |
| `manualInstanceCount` | `integer` Optional. total instance count for the service in manual scaling mode. This number of instances is divided among all revisions with specified traffic based on the percent of traffic they are receiving. |

## ScalingMode

The scaling mode for the service. If not provided, it defaults to AUTOMATIC.

| Enums ||
|---|---|
| `SCALING_MODE_UNSPECIFIED` | Unspecified. |
| `AUTOMATIC` | Scale based on traffic between min and max instances. |
| `MANUAL` | Scale to exactly min instances and ignore max instances. |

## MultiRegionSettings

Settings for multi-region deployment.

| JSON representation |
|---|
| ``` { "regions": [ string ], "multiRegionId": string } ``` |

| Fields ||
|---|---|
| `regions[]` | `string` Required. List of regions to deploy to, including primary region. |
| `multiRegionId` | `string` Optional. System-generated unique id for the multi-region Service. |

## TrafficTargetStatus

Represents the observed state of a single `TrafficTarget` entry.

| JSON representation |
|---|
| ``` { "type": enum (`https://docs.cloud.google.com/run/docs/reference/rest/v2/projects.locations.services#TrafficTargetAllocationType`), "revision": string, "percent": integer, "tag": string, "uri": string } ``` |

| Fields ||
|---|---|
| `type` | ``enum (`https://docs.cloud.google.com/run/docs/reference/rest/v2/projects.locations.services#TrafficTargetAllocationType`)`` The allocation type for this traffic target. |
| `revision` | `string` Revision to which this traffic is sent. |
| `percent` | `integer` Specifies percent of the traffic to this Revision. |
| `tag` | `string` Indicates the string used in the URI to exclusively reference this target. |
| `uri` | `string` Displays the target URI. |

## BuildConfig

Describes the Build step of the function that builds a container from the given source.

| JSON representation |
|---|
| ``` { "name": string, "sourceLocation": string, "functionTarget": string, "imageUri": string, "baseImage": string, "enableAutomaticUpdates": boolean, "workerPool": string, "environmentVariables": { string: string, ... }, "serviceAccount": string } ``` |

| Fields ||
|---|---|
| `name` | `string` Output only. The Cloud Build name of the latest successful deployment of the function. |
| `sourceLocation` | `string` The Cloud Storage bucket URI where the function source code is located. |
| `functionTarget` | `string` Optional. The name of the function (as defined in source code) that will be executed. Defaults to the resource name suffix, if not specified. For backward compatibility, if function with given name is not found, then the system will try to use function named "function". |
| `imageUri` | `string` Optional. Artifact Registry URI to store the built image. |
| `baseImage` | `string` Optional. The base image used to build the function. |
| `enableAutomaticUpdates` | `boolean` Optional. Sets whether the function will receive automatic base image updates. |
| `workerPool` | `string` Optional. Name of the Cloud Build Custom Worker Pool that should be used to build the Cloud Run function. The format of this field is `projects/{project}/locations/{region}/workerPools/{workerPool}` where `{project}` and `{region}` are the project id and region respectively where the worker pool is defined and `{workerPool}` is the short name of the worker pool. |
| `environmentVariables` | `map (key: string, value: string)` Optional. User-provided build-time environment variables for the function An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |
| `serviceAccount` | `string` Optional. Service account to be used for building the container. The format of this field is `projects/{projectId}/serviceAccounts/{serviceAccountEmail}`. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/run/docs/reference/rest/v2/projects.locations.services/create` | Creates a new Service in a given project and location. |
| ### `https://docs.cloud.google.com/run/docs/reference/rest/v2/projects.locations.services/delete` | Deletes a Service. |
| ### `https://docs.cloud.google.com/run/docs/reference/rest/v2/projects.locations.services/get` | Gets information about a Service. |
| ### `https://docs.cloud.google.com/run/docs/reference/rest/v2/projects.locations.services/getIamPolicy` | Gets the IAM Access Control policy currently in effect for the given Cloud Run Service. |
| ### `https://docs.cloud.google.com/run/docs/reference/rest/v2/projects.locations.services/list` | Lists Services. |
| ### `https://docs.cloud.google.com/run/docs/reference/rest/v2/projects.locations.services/patch` | Updates a Service. |
| ### `https://docs.cloud.google.com/run/docs/reference/rest/v2/projects.locations.services/setIamPolicy` | Sets the IAM Access control policy for the specified Service. |
| ### `https://docs.cloud.google.com/run/docs/reference/rest/v2/projects.locations.services/testIamPermissions` | Returns permissions that a caller has on the specified Project. |