## Index

- `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.FunctionService` (interface)
- `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.AbortFunctionUpgradeRequest` (message)
- `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.AutomaticUpdatePolicy` (message)
- `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.BuildConfig` (message)
- `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.BuildConfig.DockerRegistry` (enum)
- `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.BuildConfigOverrides` (message)
- `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.CommitFunctionUpgradeAsGen2Request` (message)
- `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.CommitFunctionUpgradeRequest` (message)
- `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.CreateFunctionRequest` (message)
- `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.DeleteFunctionRequest` (message)
- `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.DetachFunctionRequest` (message)
- `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.Environment` (enum)
- `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.EventFilter` (message)
- `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.EventTrigger` (message)
- `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.EventTrigger.RetryPolicy` (enum)
- `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.Function` (message)
- `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.Function.State` (enum)
- `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.GenerateDownloadUrlRequest` (message)
- `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.GenerateDownloadUrlResponse` (message)
- `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.GenerateUploadUrlRequest` (message)
- `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.GenerateUploadUrlResponse` (message)
- `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.GetFunctionRequest` (message)
- `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.ListFunctionsRequest` (message)
- `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.ListFunctionsResponse` (message)
- `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.ListRuntimesRequest` (message)
- `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.ListRuntimesResponse` (message)
- `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.ListRuntimesResponse.Runtime` (message)
- `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.ListRuntimesResponse.RuntimeStage` (enum)
- `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.LocationMetadata` (message)
- `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.OnDeployUpdatePolicy` (message)
- `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.OperationMetadata` (message)
- `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.OperationType` (enum)
- `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.RedirectFunctionUpgradeTrafficRequest` (message)
- `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.RepoSource` (message)
- `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.RollbackFunctionUpgradeTrafficRequest` (message)
- `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.SecretEnvVar` (message)
- `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.SecretVolume` (message)
- `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.SecretVolume.SecretVersion` (message)
- `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.ServiceConfig` (message)
- `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.ServiceConfig.DirectVpcEgress` (enum)
- `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.ServiceConfig.DirectVpcNetworkInterface` (message)
- `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.ServiceConfig.IngressSettings` (enum)
- `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.ServiceConfig.SecurityLevel` (enum)
- `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.ServiceConfig.VpcConnectorEgressSettings` (enum)
- `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.ServiceConfigOverrides` (message)
- `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.SetupFunctionUpgradeConfigRequest` (message)
- `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.Source` (message)
- `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.SourceProvenance` (message)
- `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.Stage` (message)
- `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.Stage.Name` (enum)
- `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.Stage.State` (enum)
- `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.StateMessage` (message)
- `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.StateMessage.Severity` (enum)
- `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.StorageSource` (message)
- `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.UpdateFunctionRequest` (message)
- `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.UpgradeInfo` (message)
- `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.UpgradeInfo.UpgradeState` (enum)

## FunctionService

Google Cloud Functions is used to deploy functions that are executed by Google in response to various events. Data connected with that event is passed to a function as the input data.

A **function** is a resource which describes a function that should be executed and how it is triggered.

| AbortFunctionUpgrade |
|---|
| `` rpc AbortFunctionUpgrade(`https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.AbortFunctionUpgradeRequest`) returns (`https://docs.cloud.google.com/functions/docs/reference/rpc/google.longrunning#google.longrunning.Operation`) `` Aborts generation upgrade process for a function with the given name from the specified project. Deletes all 2nd Gen copy related configuration and resources which were created during the upgrade process. Authorization scopes :   Requires the following OAuth scope: - `https://www.googleapis.com/auth/cloud-platform` For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp). |

| CommitFunctionUpgrade |
|---|
| `` rpc CommitFunctionUpgrade(`https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.CommitFunctionUpgradeRequest`) returns (`https://docs.cloud.google.com/functions/docs/reference/rpc/google.longrunning#google.longrunning.Operation`) `` Finalizes the upgrade after which function upgrade can not be rolled back. This is the last step of the multi step process to upgrade 1st Gen functions to 2nd Gen. Deletes all original 1st Gen related configuration and resources. Authorization scopes :   Requires the following OAuth scope: - `https://www.googleapis.com/auth/cloud-platform` For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp). |

| CommitFunctionUpgradeAsGen2 |
|---|
| `` rpc CommitFunctionUpgradeAsGen2(`https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.CommitFunctionUpgradeAsGen2Request`) returns (`https://docs.cloud.google.com/functions/docs/reference/rpc/google.longrunning#google.longrunning.Operation`) `` Commits a function upgrade from GCF Gen1 to GCF Gen2. This action deletes the Gen1 function, leaving the Gen2 function active and manageable by the GCFv2 API. Authorization scopes :   Requires the following OAuth scope: - `https://www.googleapis.com/auth/cloud-platform` For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp). |

| CreateFunction |
|---|
| `` rpc CreateFunction(`https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.CreateFunctionRequest`) returns (`https://docs.cloud.google.com/functions/docs/reference/rpc/google.longrunning#google.longrunning.Operation`) `` Creates a new function. If a function with the given name already exists in the specified project, the long running operation will return `ALREADY_EXISTS` error. Authorization scopes :   Requires the following OAuth scope: - `https://www.googleapis.com/auth/cloud-platform` For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp). |

| DeleteFunction |
|---|
| `` rpc DeleteFunction(`https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.DeleteFunctionRequest`) returns (`https://docs.cloud.google.com/functions/docs/reference/rpc/google.longrunning#google.longrunning.Operation`) `` Deletes a function with the given name from the specified project. If the given function is used by some trigger, the trigger will be updated to remove this function. Authorization scopes :   Requires the following OAuth scope: - `https://www.googleapis.com/auth/cloud-platform` For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp). |

| DetachFunction |
|---|
| `` rpc DetachFunction(`https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.DetachFunctionRequest`) returns (`https://docs.cloud.google.com/functions/docs/reference/rpc/google.longrunning#google.longrunning.Operation`) `` Detaches 2nd Gen function to Cloud Run function. Authorization scopes :   Requires the following OAuth scope: - `https://www.googleapis.com/auth/cloud-platform` For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp). |

| GenerateDownloadUrl |
|---|
| `` rpc GenerateDownloadUrl(`https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.GenerateDownloadUrlRequest`) returns (`https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.GenerateDownloadUrlResponse`) `` Returns a signed URL for downloading deployed function source code. The URL is only valid for a limited period and should be used within 30 minutes of generation. For more information about the signed URL usage see: <https://cloud.google.com/storage/docs/access-control/signed-urls> Authorization scopes :   Requires the following OAuth scope: - `https://www.googleapis.com/auth/cloud-platform` For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp). |

| GenerateUploadUrl |
|---|
| `` rpc GenerateUploadUrl(`https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.GenerateUploadUrlRequest`) returns (`https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.GenerateUploadUrlResponse`) `` Returns a signed URL for uploading a function source code. For more information about the signed URL usage see: <https://cloud.google.com/storage/docs/access-control/signed-urls>. Once the function source code upload is complete, the used signed URL should be provided in CreateFunction or UpdateFunction request as a reference to the function source code. When uploading source code to the generated signed URL, please follow these restrictions: - Source file type should be a zip file. - No credentials should be attached - the signed URLs provide access to the target bucket using internal service identity; if credentials were attached, the identity from the credentials would be used, but that identity does not have permissions to upload files to the URL. When making a HTTP PUT request, specify this header: - `content-type: application/zip` Do not specify this header: - `Authorization: Bearer YOUR_TOKEN` Authorization scopes :   Requires the following OAuth scope: - `https://www.googleapis.com/auth/cloud-platform` For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp). |

| GetFunction |
|---|
| `` rpc GetFunction(`https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.GetFunctionRequest`) returns (`https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.Function`) `` Returns a function with the given name from the requested project. Authorization scopes :   Requires the following OAuth scope: - `https://www.googleapis.com/auth/cloud-platform` For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp). |

| ListFunctions |
|---|
| `` rpc ListFunctions(`https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.ListFunctionsRequest`) returns (`https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.ListFunctionsResponse`) `` Returns a list of functions that belong to the requested project. Authorization scopes :   Requires the following OAuth scope: - `https://www.googleapis.com/auth/cloud-platform` For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp). |

| ListRuntimes |
|---|
| `` rpc ListRuntimes(`https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.ListRuntimesRequest`) returns (`https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.ListRuntimesResponse`) `` Returns a list of runtimes that are supported for the requested project. Authorization scopes :   Requires the following OAuth scope: - `https://www.googleapis.com/auth/cloud-platform` For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp). |

| RedirectFunctionUpgradeTraffic |
|---|
| `` rpc RedirectFunctionUpgradeTraffic(`https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.RedirectFunctionUpgradeTrafficRequest`) returns (`https://docs.cloud.google.com/functions/docs/reference/rpc/google.longrunning#google.longrunning.Operation`) `` Changes the traffic target of a function from the original 1st Gen function to the 2nd Gen copy. This is the second step of the multi step process to upgrade 1st Gen functions to 2nd Gen. After this operation, all new traffic will be served by 2nd Gen copy. Authorization scopes :   Requires the following OAuth scope: - `https://www.googleapis.com/auth/cloud-platform` For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp). |

| RollbackFunctionUpgradeTraffic |
|---|
| `` rpc RollbackFunctionUpgradeTraffic(`https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.RollbackFunctionUpgradeTrafficRequest`) returns (`https://docs.cloud.google.com/functions/docs/reference/rpc/google.longrunning#google.longrunning.Operation`) `` Reverts the traffic target of a function from the 2nd Gen copy to the original 1st Gen function. After this operation, all new traffic would be served by the 1st Gen. Authorization scopes :   Requires the following OAuth scope: - `https://www.googleapis.com/auth/cloud-platform` For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp). |

| SetupFunctionUpgradeConfig |
|---|
| `` rpc SetupFunctionUpgradeConfig(`https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.SetupFunctionUpgradeConfigRequest`) returns (`https://docs.cloud.google.com/functions/docs/reference/rpc/google.longrunning#google.longrunning.Operation`) `` Creates a 2nd Gen copy of the function configuration based on the 1st Gen function with the given name. This is the first step of the multi step process to upgrade 1st Gen functions to 2nd Gen. Only 2nd Gen configuration is setup as part of this request and traffic continues to be served by 1st Gen. Authorization scopes :   Requires the following OAuth scope: - `https://www.googleapis.com/auth/cloud-platform` For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp). |

| UpdateFunction |
|---|
| `` rpc UpdateFunction(`https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.UpdateFunctionRequest`) returns (`https://docs.cloud.google.com/functions/docs/reference/rpc/google.longrunning#google.longrunning.Operation`) `` Updates existing function. Authorization scopes :   Requires the following OAuth scope: - `https://www.googleapis.com/auth/cloud-platform` For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp). |

## AbortFunctionUpgradeRequest

Request for the `AbortFunctionUpgrade` method.

| Fields ||
|---|---|
| `name` | `string` Required. The name of the function for which upgrade should be aborted. Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `name`: - `cloudfunctions.functions.generationUpgrade` |

## AutomaticUpdatePolicy

This type has no fields.
Security patches are applied automatically to the runtime without requiring the function to be redeployed.

## BuildConfig

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

| Fields ||
|---|---|
| `build` | `string` Output only. The Cloud Build name of the latest successful deployment of the function. |
| `runtime` | `string` The runtime in which to run the function. Required when deploying a new function, optional when updating an existing function. For a complete list of possible choices, see the [`gcloud` command reference](https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--runtime). |
| `entry_point` | `string` 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". For Node.js this is name of a function exported by the module specified in `source_location`. |
| `source` | `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.Source` The location of the function source code. |
| `source_provenance` | `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.SourceProvenance` Output only. A permanent fixed identifier for source. |
| `worker_pool` | `string` Name of the Cloud Build Custom Worker Pool that should be used to build the 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. If the project id is not the same as the function, then the Cloud Functions Service Agent (service- @gcf-admin-robot.iam.gserviceaccount.com) must be granted the role Cloud Build Custom Workers Builder (roles/cloudbuild.customworkers.builder) in the project. |
| `environment_variables` | `map<string, string>` User-provided build-time environment variables for the function |
| `docker_registry (deprecated)` | `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.BuildConfig.DockerRegistry` > [!WARNING] > This item is deprecated! Docker Registry to use for this deployment. This configuration is only applicable to 1st Gen functions, 2nd Gen functions can only use Artifact Registry. Deprecated: as of March 2025, `CONTAINER_REGISTRY` option is no longer available in response to Container Registry's deprecation: <https://cloud.google.com/artifact-registry/docs/transition/transition-from-gcr> Please use Artifact Registry instead, which is the default choice. If unspecified, it defaults to `ARTIFACT_REGISTRY`. If `docker_repository` field is specified, this field should either be left unspecified or set to `ARTIFACT_REGISTRY`. |
| `docker_repository` | `string` Repository in Artifact Registry to which the function docker image will be pushed after it is built by Cloud Build. If specified by user, it is created and managed by user with a customer managed encryption key. Otherwise, GCF will create and use a repository named 'gcf-artifacts' for every deployed region. It must match the pattern `projects/{project}/locations/{location}/repositories/{repository}`. Repository format must be 'DOCKER'. |
| `service_account` | `string` Service account to be used for building the container. The format of this field is `projects/{projectId}/serviceAccounts/{serviceAccountEmail}`. |
| `source_token` | `string` An identifier for Firebase function sources. Disclaimer: This field is only supported for Firebase function deployments. |
| Union field `runtime_update_policy`. This controls when security patches are applied to the runtime environment. `runtime_update_policy` can be only one of the following: ||
| `automatic_update_policy` | `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.AutomaticUpdatePolicy` |
| `on_deploy_update_policy` | `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.OnDeployUpdatePolicy` |

## DockerRegistry

Docker Registry to use for storing function Docker images.

| Enums ||
|---|---|
| `DOCKER_REGISTRY_UNSPECIFIED` | Unspecified. |
| `CONTAINER_REGISTRY` | Docker images will be stored in multi-regional Container Registry repositories named `gcf`. |
| `ARTIFACT_REGISTRY` | Docker images will be stored in regional Artifact Registry repositories. By default, GCF will create and use repositories named `gcf-artifacts` in every region in which a function is deployed. But the repository to use can also be specified by the user using the `docker_repository` field. |

## BuildConfigOverrides

Contains overrides related to the function's build configuration.

| Fields ||
|---|---|
| `runtime` | `string` Optional. Specifies the desired runtime for the new Cloud Run function. (e.g., `"nodejs20"`, `"python312"`). Constraints: 1. This field CANNOT be used to change the runtime language (e.g., from `NODEJS` to `PYTHON`). The backend will enforce this. 2. This field can ONLY be used to upgrade the runtime version (e.g., `nodejs18` to `nodejs20`). Downgrading the version is not permitted. The backend will validate the version change. If provided and valid, this overrides the runtime of the Gen1 function. |

## CommitFunctionUpgradeAsGen2Request

Request for the `CommitFunctionUpgradeAsGen2` method.

| Fields ||
|---|---|
| `name` | `string` Required. The name of the function for which upgrade should be committed to Gen2. Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `name`: - `cloudfunctions.functions.generationUpgrade` |

## CommitFunctionUpgradeRequest

Request for the `CommitFunctionUpgrade` method.

| Fields ||
|---|---|
| `name` | `string` Required. The name of the function for which upgrade should be finalized. Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `name`: - `cloudfunctions.functions.generationUpgrade` |

## CreateFunctionRequest

Request for the `CreateFunction` method.

| Fields ||
|---|---|
| `parent` | `string` Required. The project and location in which the function should be created, specified in the format `projects/*/locations/*` Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `parent`: - `cloudfunctions.functions.create` |
| `function` | `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.Function` Required. Function to be created. |
| `function_id` | `string` The ID to use for the function, which will become the final component of the function's resource name. This value should be 4-63 characters, and valid characters are /\[a-z\]\[0-9\]-/. |

## DeleteFunctionRequest

Request for the `DeleteFunction` method.

| Fields ||
|---|---|
| `name` | `string` Required. The name of the function which should be deleted. Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `name`: - `cloudfunctions.functions.delete` |

## DetachFunctionRequest

Request for the `DetachFunction` method.

| Fields ||
|---|---|
| `name` | `string` Required. The name of the function for which should be detached. Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `name`: - `cloudfunctions.functions.generationUpgrade` |

## Environment

The environment the function is hosted on.

| Enums ||
|---|---|
| `ENVIRONMENT_UNSPECIFIED` | Unspecified |
| `GEN_1` | Gen 1 |
| `GEN_2` | Gen 2 |

## EventFilter

Filters events based on exact matches on the CloudEvents attributes.

| Fields ||
|---|---|
| `attribute` | `string` Required. The name of a CloudEvents attribute. |
| `value` | `string` Required. The value for the attribute. |
| `operator` | `string` Optional. The operator used for matching the events with the value of the filter. If not specified, only events that have an exact key-value pair specified in the filter are matched. The only allowed value is `match-path-pattern`. |

## EventTrigger

Describes EventTrigger, used to request events to be sent from another service.

| Fields ||
|---|---|
| `trigger` | `string` Output only. The resource name of the Eventarc trigger. The format of this field is `projects/{project}/locations/{region}/triggers/{trigger}`. |
| `trigger_region` | `string` The region that the trigger will be in. The trigger will only receive events originating in this region. It can be the same region as the function, a different region or multi-region, or the global region. If not provided, defaults to the same region as the function. |
| `event_type` | `string` Required. The type of event to observe. For example: `google.cloud.audit.log.v1.written` or `google.cloud.pubsub.topic.v1.messagePublished`. |
| `event_filters[]` | `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.EventFilter` Criteria used to filter events. |
| `pubsub_topic` | `string` Optional. The name of a Pub/Sub topic in the same project that will be used as the transport topic for the event delivery. Format: `projects/{project}/topics/{topic}`. This is only valid for events of type `google.cloud.pubsub.topic.v1.messagePublished`. The topic provided here will not be deleted at function deletion. |
| `service_account_email` | `string` Optional. The email of the trigger's service account. The service account must have permission to invoke Cloud Run services, the permission is `run.routes.invoke`. If empty, defaults to the Compute Engine default service account: `{project_number}-compute@developer.gserviceaccount.com`. |
| `retry_policy` | `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.EventTrigger.RetryPolicy` Optional. If unset, then defaults to ignoring failures (i.e. not retrying them). |
| `channel` | `string` Optional. The name of the channel associated with the trigger in `projects/{project}/locations/{location}/channels/{channel}` format. You must provide a channel to receive events from Eventarc SaaS partners. |
| `service` | `string` Optional. The hostname of the service that 1st Gen function should be observed. If no string is provided, the default service implementing the API will be used. For example, `storage.googleapis.com` is the default for all event types in the `google.storage` namespace. The field is only applicable to 1st Gen functions. |

## RetryPolicy

Describes the retry policy in case of function's execution failure. Retried execution is charged as any other execution.

| Enums ||
|---|---|
| `RETRY_POLICY_UNSPECIFIED` | Not specified. |
| `RETRY_POLICY_DO_NOT_RETRY` | Do not retry. |
| `RETRY_POLICY_RETRY` | Retry on any failure, retry up to 7 days with an exponential backoff (capped at 10 seconds). |

## Function

Describes a Cloud Function that contains user computation executed in response to an event. It encapsulates function and trigger configurations.

| Fields ||
|---|---|
| `name` | `string` A user-defined name of the function. Function names must be unique globally and match pattern `projects/*/locations/*/functions/*` |
| `description` | `string` User-provided description of a function. |
| `build_config` | `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.BuildConfig` Describes the Build step of the function that builds a container from the given source. |
| `service_config` | `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.ServiceConfig` Describes the Service being deployed. Currently deploys services to Cloud Run (fully managed). |
| `event_trigger` | `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.EventTrigger` An Eventarc trigger managed by Google Cloud Functions that fires events in response to a condition in another service. |
| `state` | `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.Function.State` Output only. State of the function. |
| `update_time` | `https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` Output only. The last update timestamp of a Cloud Function. |
| `labels` | `map<string, string>` Labels associated with this Cloud Function. |
| `state_messages[]` | `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.StateMessage` Output only. State Messages for this Cloud Function. |
| `environment` | `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.Environment` Describe whether the function is 1st Gen or 2nd Gen. |
| `upgrade_info` | `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.UpgradeInfo` Output only. UpgradeInfo for this Cloud Function |
| `url` | `string` Output only. The deployed url for the function. |
| `kms_key_name` | `string` Resource name of a KMS crypto key (managed by the user) used to encrypt/decrypt function resources. It must match the pattern `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. |
| `satisfies_pzs` | `bool` Output only. Reserved for future use. |
| `create_time` | `https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` Output only. The create timestamp of a Cloud Function. This is only applicable to 2nd Gen functions. |
| `satisfies_pzi` | `bool` Output only. Reserved for future use. |

## State

Describes the current state of the function.

| Enums ||
|---|---|
| `STATE_UNSPECIFIED` | Not specified. Invalid state. |
| `ACTIVE` | Function has been successfully deployed and is serving. |
| `FAILED` | Function deployment failed and the function is not serving. |
| `DEPLOYING` | Function is being created or updated. |
| `DELETING` | Function is being deleted. |
| `UNKNOWN` | Function deployment failed and the function serving state is undefined. The function should be updated or deleted to move it out of this state. |
| `DETACHING` | Function is being detached. |
| `DETACH_FAILED` | Function detach failed and the function is still serving. |

## GenerateDownloadUrlRequest

Request of `GenerateDownloadUrl` method.

| Fields ||
|---|---|
| `name` | `string` Required. The name of function for which source code Google Cloud Storage signed URL should be generated. Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `name`: - `cloudfunctions.functions.sourceCodeGet` |

## GenerateDownloadUrlResponse

Response of `GenerateDownloadUrl` method.

| Fields ||
|---|---|
| `download_url` | `string` The generated Google Cloud Storage signed URL that should be used for function source code download. |

## GenerateUploadUrlRequest

Request of `GenerateSourceUploadUrl` method.

| Fields ||
|---|---|
| `parent` | `string` Required. The project and location in which the Google Cloud Storage signed URL should be generated, specified in the format `projects/*/locations/*`. Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `parent`: - `cloudfunctions.functions.sourceCodeSet` |
| `kms_key_name` | `string` Resource name of a KMS crypto key (managed by the user) used to encrypt/decrypt function source code objects in intermediate Cloud Storage buckets. When you generate an upload url and upload your source code, it gets copied to an intermediate Cloud Storage bucket. The source code is then copied to a versioned directory in the sources bucket in the consumer project during the function deployment. It must match the pattern `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. The Google Cloud Functions service account (service-{project_number}@gcf-admin-robot.iam.gserviceaccount.com) must be granted the role 'Cloud KMS CryptoKey Encrypter/Decrypter (roles/cloudkms.cryptoKeyEncrypterDecrypter)' on the Key/KeyRing/Project/Organization (least access preferred). |
| `environment` | `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.Environment` The function environment the generated upload url will be used for. The upload url for 2nd Gen functions can also be used for 1st gen functions, but not vice versa. If not specified, 2nd generation-style upload URLs are generated. |

## GenerateUploadUrlResponse

Response of `GenerateSourceUploadUrl` method.

| Fields ||
|---|---|
| `upload_url` | `string` The generated Google Cloud Storage signed URL that should be used for a function source code upload. The uploaded file should be a zip archive which contains a function. |
| `storage_source` | `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.StorageSource` The location of the source code in the upload bucket. Once the archive is uploaded using the `upload_url` use this field to set the `function.build_config.source.storage_source` during CreateFunction and UpdateFunction. Generation defaults to 0, as Cloud Storage provides a new generation only upon uploading a new object or version of an object. |

## GetFunctionRequest

Request for the `GetFunction` method.

| Fields ||
|---|---|
| `name` | `string` Required. The name of the function which details should be obtained. Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `name`: - `cloudfunctions.functions.get` |
| `revision` | `string` Optional. The optional version of the 1st gen function whose details should be obtained. The version of a 1st gen function is an integer that starts from 1 and gets incremented on redeployments. GCF may keep historical configs for old versions of 1st gen function. This field can be specified to fetch the historical configs. This field is valid only for GCF 1st gen function. |

## ListFunctionsRequest

Request for the `ListFunctions` method.

| Fields ||
|---|---|
| `parent` | `string` Required. The project and location from which the function should be listed, specified in the format `projects/*/locations/*` If you want to list functions in all locations, use "-" in place of a location. When listing functions in all locations, if one or more location(s) are unreachable, the response will contain functions from all reachable locations along with the names of any unreachable locations. Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `parent`: - `cloudfunctions.functions.list` |
| `page_size` | `int32` Maximum number of functions to return per call. The largest allowed page_size is 1,000, if the page_size is omitted or specified as greater than 1,000 then it will be replaced as 1,000. The size of the list response can be less than specified when used with filters. |
| `page_token` | `string` The value returned by the last `ListFunctionsResponse`; indicates that this is a continuation of a prior `ListFunctions` call, and that the system should return the next page of data. |
| `filter` | `string` The filter for Functions that match the filter expression, following the syntax outlined in <https://google.aip.dev/160>. |
| `order_by` | `string` The sorting order of the resources returned. Value should be a comma separated list of fields. The default sorting order is ascending. See <https://google.aip.dev/132#ordering>. |

## ListFunctionsResponse

Response for the `ListFunctions` method.

| Fields ||
|---|---|
| `functions[]` | `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.Function` The functions that match the request. |
| `next_page_token` | `string` A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
| `unreachable[]` | `string` Locations that could not be reached. The response does not include any functions from these locations. |

## ListRuntimesRequest

Request for the `ListRuntimes` method.

| Fields ||
|---|---|
| `parent` | `string` Required. The project and location from which the runtimes should be listed, specified in the format `projects/*/locations/*` Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `parent`: - `iam.permissions.none` |
| `filter` | `string` The filter for Runtimes that match the filter expression, following the syntax outlined in <https://google.aip.dev/160>. |

## ListRuntimesResponse

Response for the `ListRuntimes` method.

| Fields ||
|---|---|
| `runtimes[]` | `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.ListRuntimesResponse.Runtime` The runtimes that match the request. |

## Runtime

Describes a runtime and any special information (e.g., deprecation status) related to it.

| Fields ||
|---|---|
| `name` | `string` The name of the runtime, e.g., 'go113', 'nodejs12', etc. |
| `display_name` | `string` The user facing name, eg 'Go 1.13', 'Node.js 12', etc. |
| `stage` | `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.ListRuntimesResponse.RuntimeStage` The stage of life this runtime is in, e.g., BETA, GA, etc. |
| `warnings[]` | `string` Warning messages, e.g., a deprecation warning. |
| `environment` | `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.Environment` The environment for the runtime. |
| `deprecation_date` | `https://docs.cloud.google.com/functions/docs/reference/rpc/google.type#google.type.Date` Deprecation date for the runtime. |
| `decommission_date` | `https://docs.cloud.google.com/functions/docs/reference/rpc/google.type#google.type.Date` Decommission date for the runtime. |

## RuntimeStage

The various stages that a runtime can be in.

| Enums ||
|---|---|
| `RUNTIME_STAGE_UNSPECIFIED` | Not specified. |
| `DEVELOPMENT` | The runtime is in development. |
| `ALPHA` | The runtime is in the Alpha stage. |
| `BETA` | The runtime is in the Beta stage. |
| `GA` | The runtime is generally available. |
| `DEPRECATED` | The runtime is deprecated. |
| `DECOMMISSIONED` | The runtime is no longer supported. |

## LocationMetadata

Extra GCF specific location information.

| Fields ||
|---|---|
| `environments[]` | `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.Environment` The Cloud Function environments this location supports. |

## OnDeployUpdatePolicy

Security patches are only applied when a function is redeployed.

| Fields ||
|---|---|
| `runtime_version` | `string` Output only. contains the runtime version which was used during latest function deployment. |

## OperationMetadata

Represents the metadata of the long-running operation.

| Fields ||
|---|---|
| `create_time` | `https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` The time the operation was created. |
| `end_time` | `https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` The time the operation finished running. |
| `target` | `string` Server-defined resource path for the target of the operation. |
| `verb` | `string` Name of the verb executed by the operation. |
| `status_detail` | `string` Human-readable status of the operation, if any. |
| `cancel_requested` | `bool` Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have `https://docs.cloud.google.com/functions/docs/reference/rpc/google.longrunning#google.longrunning.Operation.FIELDS.google.rpc.Status.google.longrunning.Operation.error` value with a `https://docs.cloud.google.com/functions/docs/reference/rpc/google.rpc#google.rpc.Status.FIELDS.int32.google.rpc.Status.code` of 1, corresponding to `Code.CANCELLED`. |
| `api_version` | `string` API version used to start the operation. |
| `request_resource` | `https://protobuf.dev/reference/protobuf/google.protobuf#any` The original request that started the operation. |
| `stages[]` | `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.Stage` Mechanism for reporting in-progress stages |
| `source_token` | `string` An identifier for Firebase function sources. Disclaimer: This field is only supported for Firebase function deployments. |
| `build_name` | `string` The build name of the function for create and update operations. |
| `operation_type` | `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.OperationType` The operation type. |
| `custom_iam_role_detected` | `bool` Output only. Whether a custom IAM role binding was detected during the upgrade. |

## OperationType

The type of the long running operation.

| Enums ||
|---|---|
| `OPERATIONTYPE_UNSPECIFIED` | Unspecified |
| `CREATE_FUNCTION` | CreateFunction |
| `UPDATE_FUNCTION` | UpdateFunction |
| `DELETE_FUNCTION` | DeleteFunction |
| `REDIRECT_FUNCTION_UPGRADE_TRAFFIC` | RedirectFunctionUpgradeTraffic |
| `ROLLBACK_FUNCTION_UPGRADE_TRAFFIC` | RollbackFunctionUpgradeTraffic |
| `SETUP_FUNCTION_UPGRADE_CONFIG` | SetupFunctionUpgradeConfig |
| `ABORT_FUNCTION_UPGRADE` | AbortFunctionUpgrade |
| `COMMIT_FUNCTION_UPGRADE` | CommitFunctionUpgrade |
| `DETACH_FUNCTION` | DetachFunction |
| `COMMIT_FUNCTION_UPGRADE_AS_GEN2` | CommitFunctionUpgradeAsGen2 |

## RedirectFunctionUpgradeTrafficRequest

Request for the `RedirectFunctionUpgradeTraffic` method.

| Fields ||
|---|---|
| `name` | `string` Required. The name of the function for which traffic target should be changed to 2nd Gen from 1st Gen. Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `name`: - `cloudfunctions.functions.generationUpgrade` |

## RepoSource

Location of the source in a Google Cloud Source Repository.

| Fields ||
|---|---|
| `project_id` | `string` ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed. |
| `repo_name` | `string` Name of the Cloud Source Repository. |
| `dir` | `string` Directory, relative to the source root, in which to run the build. This must be a relative path. If a step's `dir` is specified and is an absolute path, this value is ignored for that step's execution. eg. helloworld (no leading slash allowed) |
| Union field `revision`. A revision within the Cloud Source Repository must be specified in one of these ways. `revision` can be only one of the following: ||
| `branch_name` | `string` Regex matching branches to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at <https://github.com/google/re2/wiki/Syntax> |
| `tag_name` | `string` Regex matching tags to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at <https://github.com/google/re2/wiki/Syntax> |
| `commit_sha` | `string` Explicit commit SHA to build. |

## RollbackFunctionUpgradeTrafficRequest

Request for the `RollbackFunctionUpgradeTraffic` method.

| Fields ||
|---|---|
| `name` | `string` Required. The name of the function for which traffic target should be changed back to 1st Gen from 2nd Gen. Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `name`: - `cloudfunctions.functions.generationUpgrade` |

## SecretEnvVar

Configuration for a secret environment variable. It has the information necessary to fetch the secret value from secret manager and expose it as an environment variable.

| Fields ||
|---|---|
| `key` | `string` Name of the environment variable. |
| `project_id` | `string` Project identifier (preferably project number but can also be the project ID) of the project that contains the secret. If not set, it is assumed that the secret is in the same project as the function. |
| `secret` | `string` Name of the secret in secret manager (not the full resource name). |
| `version` | `string` Version of the secret (version number or the string 'latest'). It is recommended to use a numeric version for secret environment variables as any updates to the secret value is not reflected until new instances start. |

## SecretVolume

Configuration for a secret volume. It has the information necessary to fetch the secret value from secret manager and make it available as files mounted at the requested paths within the application container.

| Fields ||
|---|---|
| `mount_path` | `string` The path within the container to mount the secret volume. For example, setting the mount_path as `/etc/secrets` would mount the secret value files under the `/etc/secrets` directory. This directory will also be completely shadowed and unavailable to mount any other secrets. Recommended mount path: /etc/secrets |
| `project_id` | `string` Project identifier (preferably project number but can also be the project ID) of the project that contains the secret. If not set, it is assumed that the secret is in the same project as the function. |
| `secret` | `string` Name of the secret in secret manager (not the full resource name). |
| `versions[]` | `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.SecretVolume.SecretVersion` List of secret versions to mount for this secret. If empty, the `latest` version of the secret will be made available in a file named after the secret under the mount point. |

## SecretVersion

Configuration for a single version.

| Fields ||
|---|---|
| `version` | `string` Version of the secret (version number or the string 'latest'). It is preferable to use `latest` version with secret volumes as secret value changes are reflected immediately. |
| `path` | `string` Relative path of the file under the mount path where the secret value for this version will be fetched and made available. For example, setting the mount_path as '/etc/secrets' and path as `secret_foo` would mount the secret value file at `/etc/secrets/secret_foo`. |

## ServiceConfig

Describes the Service being deployed. Currently Supported : Cloud Run (fully managed).

| Fields ||
|---|---|
| `service` | `string` Output only. Name of the service associated with a Function. The format of this field is `projects/{project}/locations/{region}/services/{service}` |
| `timeout_seconds` | `int32` The function execution timeout. Execution is considered failed and can be terminated if the function is not completed at the end of the timeout period. Defaults to 60 seconds. |
| `available_memory` | `string` The amount of memory available for a function. Defaults to 256M. Supported units are k, M, G, Mi, Gi. If no unit is supplied the value is interpreted as bytes. See <https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go> a full description. |
| `available_cpu` | `string` The number of CPUs used in a single container instance. Default value is calculated from available memory. Supports the same values as Cloud Run, see <https://cloud.google.com/run/docs/reference/rest/v1/Container#resourcerequirements> Example: "1" indicates 1 vCPU |
| `environment_variables` | `map<string, string>` Environment variables that shall be available during function execution. |
| `max_instance_count` | `int32` The limit on the maximum number of function instances that may coexist at a given time. In some cases, such as rapid traffic surges, Cloud Functions may, for a short period of time, create more instances than the specified max instances limit. If your function cannot tolerate this temporary behavior, you may want to factor in a safety margin and set a lower max instances value than your function can tolerate. See the [Max Instances](https://cloud.google.com/functions/docs/max-instances) Guide for more details. |
| `min_instance_count` | `int32` The limit on the minimum number of function instances that may coexist at a given time. Function instances are kept in idle state for a short period after they finished executing the request to reduce cold start time for subsequent requests. Setting a minimum instance count will ensure that the given number of instances are kept running in idle state always. This can help with cold start times when jump in incoming request count occurs after the idle instance would have been stopped in the default case. |
| `vpc_connector` | `string` The Serverless VPC Access connector that this cloud function can connect to. The format of this field is `projects/*/locations/*/connectors/*`. |
| `vpc_connector_egress_settings` | `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.ServiceConfig.VpcConnectorEgressSettings` The egress settings for the connector, controlling what traffic is diverted through it. |
| `ingress_settings` | `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.ServiceConfig.IngressSettings` The ingress settings for the function, controlling what traffic can reach it. |
| `uri` | `string` Output only. URI of the Service deployed. |
| `service_account_email` | `string` The email of the service's service account. If empty, defaults to `{project_number}-compute@developer.gserviceaccount.com`. |
| `all_traffic_on_latest_revision` | `bool` Whether 100% of traffic is routed to the latest revision. On CreateFunction and UpdateFunction, when set to true, the revision being deployed will serve 100% of traffic, ignoring any traffic split settings, if any. On GetFunction, true will be returned if the latest revision is serving 100% of traffic. |
| `secret_environment_variables[]` | `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.SecretEnvVar` Secret environment variables configuration. |
| `secret_volumes[]` | `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.SecretVolume` Secret volumes configuration. |
| `revision` | `string` Output only. The name of service revision. |
| `max_instance_request_concurrency` | `int32` Sets the maximum number of concurrent requests that each instance can receive. Defaults to 1. |
| `security_level` | `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.ServiceConfig.SecurityLevel` Security level configure whether the function only accepts https. This configuration is only applicable to 1st Gen functions with Http trigger. By default https is optional for 1st Gen functions; 2nd Gen functions are https ONLY. |
| `binary_authorization_policy` | `string` Optional. The binary authorization policy to be checked when deploying the Cloud Run service. |
| `direct_vpc_network_interface[]` | `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.ServiceConfig.DirectVpcNetworkInterface` Optional. The Direct VPC network interface for the Cloud Function. Currently only a single Direct VPC is supported. |
| `direct_vpc_egress` | `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.ServiceConfig.DirectVpcEgress` Optional. Egress settings for direct VPC. If not provided, it defaults to VPC_EGRESS_PRIVATE_RANGES_ONLY. |

## DirectVpcEgress

Available egress settings for Direct VPC.

| Enums ||
|---|---|
| `DIRECT_VPC_EGRESS_UNSPECIFIED` | Unspecified. |
| `VPC_EGRESS_PRIVATE_RANGES_ONLY` | Sends only traffic to internal addresses through the VPC network. |
| `VPC_EGRESS_ALL_TRAFFIC` | Sends all outbound traffic through the VPC network. |

## DirectVpcNetworkInterface

The Direct VPC network interface. This is mutually exclusive with VPC Connector.

| Fields ||
|---|---|
| `network` | `string` Optional. The name of the VPC network to which the function will be connected. Specify either a VPC network or a subnet, or both. If you specify only a network, the subnet uses the same name as the network. |
| `subnetwork` | `string` Optional. The name of the VPC subnetwork that the Cloud Function resource will get IPs from. Specify either a VPC network or a subnet, or both. If both network and subnetwork are specified, the given VPC subnetwork must belong to the given VPC network. If subnetwork is not specified, the subnetwork with the same name with the network will be used. |
| `tags[]` | `string` Optional. Network tags applied to this Cloud Function resource. |

## IngressSettings

Available ingress settings.

This controls what traffic can reach the function.

If unspecified, ALLOW_ALL will be used.

| Enums ||
|---|---|
| `INGRESS_SETTINGS_UNSPECIFIED` | Unspecified. |
| `ALLOW_ALL` | Allow HTTP traffic from public and private sources. |
| `ALLOW_INTERNAL_ONLY` | Allow HTTP traffic from only private VPC sources. |
| `ALLOW_INTERNAL_AND_GCLB` | Allow HTTP traffic from private VPC sources and through GCLB. |

## SecurityLevel

Available security level settings.

This enforces security protocol on function URL.

Security level is only configurable for 1st Gen functions, If unspecified, SECURE_OPTIONAL will be used. 2nd Gen functions are SECURE_ALWAYS ONLY.

| Enums ||
|---|---|
| `SECURITY_LEVEL_UNSPECIFIED` | Unspecified. |
| `SECURE_ALWAYS` | Requests for a URL that match this handler that do not use HTTPS are automatically redirected to the HTTPS URL with the same path. Query parameters are reserved for the redirect. |
| `SECURE_OPTIONAL` | Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used and respond accordingly. |

## VpcConnectorEgressSettings

Available egress settings.

This controls what traffic is diverted through the VPC Access Connector resource. By default PRIVATE_RANGES_ONLY will be used.

| Enums ||
|---|---|
| `VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED` | Unspecified. |
| `PRIVATE_RANGES_ONLY` | Use the VPC Access Connector only for private IP space from RFC1918. |
| `ALL_TRAFFIC` | Force the use of VPC Access Connector for all egress traffic from the function. |

## ServiceConfigOverrides

Contains overrides related to the function's service configuration.

| Fields ||
|---|---|
| `max_instance_count` | `int32` Optional. Specifies the maximum number of instances for the new Cloud Run function. If provided, this overrides the max_instance_count setting of the Gen1 function. |

## SetupFunctionUpgradeConfigRequest

Request for the `SetupFunctionUpgradeConfig` method.

| Fields ||
|---|---|
| `name` | `string` Required. The name of the function which should have configuration copied for upgrade. Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `name`: - `cloudfunctions.functions.generationUpgrade` |
| `trigger_service_account` | `string` Optional. The trigger's service account. The service account must have permission to invoke Cloud Run services, the permission is `run.routes.invoke`. If empty, defaults to the Compute Engine default service account: `{project_number}-compute@developer.gserviceaccount.com`. |
| `build_config_overrides` | `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.BuildConfigOverrides` Optional. Specifies overrides for the build process. |
| `service_config_overrides` | `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.ServiceConfigOverrides` Optional. Specifies overrides for the service configuration. |

## Source

The location of the function source code.

| Fields ||
|---|---|
| Union field `source`. Location of the source. At least one source needs to be provided for the deployment to succeed. `source` can be only one of the following: ||
| `storage_source` | `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.StorageSource` If provided, get the source from this location in Google Cloud Storage. |
| `repo_source` | `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.RepoSource` If provided, get the source from this location in a Cloud Source Repository. |
| `git_uri` | `string` If provided, get the source from GitHub repository. This option is valid only for GCF 1st Gen function. Example: <https://github.com/> / /blob/ / |

## SourceProvenance

Provenance of the source. Ways to find the original source, or verify that some source was used for this build.

| Fields ||
|---|---|
| `resolved_storage_source` | `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.StorageSource` A copy of the build's `source.storage_source`, if exists, with any generations resolved. |
| `resolved_repo_source` | `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.RepoSource` A copy of the build's `source.repo_source`, if exists, with any revisions resolved. |
| `git_uri` | `string` A copy of the build's `source.git_uri`, if exists, with any commits resolved. |

## Stage

Each Stage of the deployment process

| Fields ||
|---|---|
| `name` | `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.Stage.Name` Name of the Stage. This will be unique for each Stage. |
| `message` | `string` Message describing the Stage |
| `state` | `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.Stage.State` Current state of the Stage |
| `resource` | `string` Resource of the Stage |
| `resource_uri` | `string` Link to the current Stage resource |
| `state_messages[]` | `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.StateMessage` State messages from the current Stage. |

## Name

Possible names for a Stage

| Enums ||
|---|---|
| `NAME_UNSPECIFIED` | Not specified. Invalid name. |
| `ARTIFACT_REGISTRY` | Artifact Registry Stage |
| `BUILD` | Build Stage |
| `SERVICE` | Service Stage |
| `TRIGGER` | Trigger Stage |
| `SERVICE_ROLLBACK` | Service Rollback Stage |
| `TRIGGER_ROLLBACK` | Trigger Rollback Stage |

## State

Possible states for a Stage

| Enums ||
|---|---|
| `STATE_UNSPECIFIED` | Not specified. Invalid state. |
| `NOT_STARTED` | Stage has not started. |
| `IN_PROGRESS` | Stage is in progress. |
| `COMPLETE` | Stage has completed. |

## StateMessage

Informational messages about the state of the Cloud Function or Operation.

| Fields ||
|---|---|
| `severity` | `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.StateMessage.Severity` Severity of the state message. |
| `type` | `string` One-word CamelCase type of the state message. |
| `message` | `string` The message. |

## Severity

Severity of the state message.

| Enums ||
|---|---|
| `SEVERITY_UNSPECIFIED` | Not specified. Invalid severity. |
| `ERROR` | ERROR-level severity. |
| `WARNING` | WARNING-level severity. |
| `INFO` | INFO-level severity. |

## StorageSource

Location of the source in an archive file in Google Cloud Storage.

| Fields ||
|---|---|
| `bucket` | `string` Google Cloud Storage bucket containing the source (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). |
| `object` | `string` Google Cloud Storage object containing the source. This object must be a gzipped archive file (`.tar.gz`) containing source to build. |
| `generation` | `int64` Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used. |
| `source_upload_url` | `string` When the specified storage bucket is a 1st gen function uploard url bucket, this field should be set as the generated upload url for 1st gen deployment. |

## UpdateFunctionRequest

Request for the `UpdateFunction` method.

| Fields ||
|---|---|
| `function` | `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.Function` Required. New version of the function. Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `function`: - `cloudfunctions.functions.update` |
| `update_mask` | `https://protobuf.dev/reference/protobuf/google.protobuf#field-mask` The list of fields to be updated. If no field mask is provided, all fields will be updated. |

## UpgradeInfo

Information related to: \* A function's eligibility for 1st Gen to 2nd Gen migration. \* Current state of migration for function undergoing migration.

| Fields ||
|---|---|
| `upgrade_state` | `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.UpgradeInfo.UpgradeState` UpgradeState of the function |
| `service_config` | `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.ServiceConfig` Describes the Cloud Run service which has been setup to prepare for 2nd gen upgrade. |
| `event_trigger` | `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.EventTrigger` Describes the Event trigger which has been setup to prepare for 2nd gen upgrade. |
| `build_config` | `https://docs.cloud.google.com/functions/docs/reference/rpc/google.cloud.functions.v2beta#google.cloud.functions.v2beta.BuildConfig` Describes the Build step of the function that builds a container to prepare for 2nd gen upgrade. |

## UpgradeState

Enum representing the various upgrade state a function can have.

| Enums ||
|---|---|
| `UPGRADE_STATE_UNSPECIFIED` | Unspecified state. Most functions are in this upgrade state. |
| `ELIGIBLE_FOR_2ND_GEN_UPGRADE` | Functions in this state are eligible for 1st Gen upgrade. |
| `INELIGIBLE_FOR_UPGRADE_UNTIL_REDEPLOYMENT` | Functions in this state are ineligible for 1st Gen upgrade until redeployment with newer runtime. |
| `UPGRADE_OPERATION_IN_PROGRESS` | An upgrade related operation is in progress. |
| `SETUP_FUNCTION_UPGRADE_CONFIG_SUCCESSFUL` | SetupFunctionUpgradeConfig API was successful and a 2nd Gen function has been created based on 1st Gen function instance. |
| `SETUP_FUNCTION_UPGRADE_CONFIG_ERROR` | SetupFunctionUpgradeConfig API was un-successful. |
| `ABORT_FUNCTION_UPGRADE_ERROR` | AbortFunctionUpgrade API was un-successful. |
| `REDIRECT_FUNCTION_UPGRADE_TRAFFIC_SUCCESSFUL` | RedirectFunctionUpgradeTraffic API was successful and traffic is served by 2nd Gen function stack. |
| `REDIRECT_FUNCTION_UPGRADE_TRAFFIC_ERROR` | RedirectFunctionUpgradeTraffic API was un-successful. |
| `ROLLBACK_FUNCTION_UPGRADE_TRAFFIC_ERROR` | RollbackFunctionUpgradeTraffic API was un-successful. |
| `COMMIT_FUNCTION_UPGRADE_ERROR` | CommitFunctionUpgrade API was un-successful and 1st gen function might have broken. |
| `COMMIT_FUNCTION_UPGRADE_ERROR_ROLLBACK_SAFE` | CommitFunctionUpgrade API was un-successful but safe to rollback traffic or abort. |
| `COMMIT_FUNCTION_UPGRADE_AS_GEN2_SUCCESSFUL` | Deprecated: This state is no longer returned by the backend. Clients should not rely on polling for this specific state. A successful upgrade is now indicated by the long-running operation completing successfully with a Function resource in the response. > [!WARNING] > This item is deprecated! |
| `COMMIT_FUNCTION_UPGRADE_AS_GEN2_ERROR` | CommitFunctionUpgradeAsGen2 API was un-successful and 1st gen function might have broken. |