---
title: "POST /v2/{+parent}/functions"
method: POST
path: "/v2/{+parent}/functions"
tags: ["projects"]
---

# POST /v2/{+parent}/functions

`POST /v2/{+parent}/functions`

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.

## Path parameters

- `parent` string, required

## Query parameters

- `functionId` string

## Request body

- Function — Describes a Cloud Function that contains user computation executed in response to an event. It encapsulates function and trigger configurations.
  - `upgradeInfo` UpgradeInfo — Information related to: * A function's eligibility for 1st Gen to 2nd Gen migration. * Current state of migration for function undergoing migration.
    - `eventTrigger` EventTrigger — Describes EventTrigger, used to request events to be sent from another service.
      - `pubsubTopic` 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.
      - `retryPolicy` 'RETRY_POLICY_UNSPECIFIED' | 'RETRY_POLICY_DO_NOT_RETRY' | 'RETRY_POLICY_RETRY' — Optional. If unset, then defaults to ignoring failures (i.e. not retrying them).
      - `trigger` string — Output only. The resource name of the Eventarc trigger. The format of this field is `projects/{project}/locations/{region}/triggers/{trigger}`.
      - `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.
      - `triggerRegion` 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.
      - `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.
      - `eventType` string — Required. The type of event to observe. For example: `google.cloud.audit.log.v1.written` or `google.cloud.pubsub.topic.v1.messagePublished`.
      - `eventFilters` EventFilter[] — Criteria used to filter events.
        - `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`.
        - `attribute` string — Required. The name of a CloudEvents attribute.
        - `value` string — Required. The value for the attribute.
      - `serviceAccountEmail` 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`.
    - `buildConfig` BuildConfig — Describes the Build step of the function that builds a container from the given source.
      - `source` Source — The location of the function source code.
        - `gitUri` string — If provided, get the source from GitHub repository. This option is valid only for GCF 1st Gen function. Example: https://github.com///blob//
        - `storageSource` StorageSource — Location of the source in an archive file in Google Cloud Storage.
          - `object` string — Google Cloud Storage object containing the source. This object must be a gzipped archive file (`.tar.gz`) containing source to build.
          - `generation` string, int64 — Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used.
          - `bucket` string — Google Cloud Storage bucket containing the source (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
          - `sourceUploadUrl` 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.
        - `repoSource` RepoSource — Location of the source in a Google Cloud Source Repository.
          - `repoName` string — Name of the Cloud Source Repository.
          - `branchName` 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
          - `tagName` 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
          - `projectId` string — ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.
          - `commitSha` string — Explicit commit SHA to build.
          - `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)
      - `serviceAccount` string — Service account to be used for building the container. The format of this field is `projects/{projectId}/serviceAccounts/{serviceAccountEmail}`.
      - `entryPoint` 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`.
      - `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).
      - `sourceToken` string — An identifier for Firebase function sources. Disclaimer: This field is only supported for Firebase function deployments.
      - `workerPool` 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.
      - `build` string — Output only. The Cloud Build name of the latest successful deployment of the function.
      - `onDeployUpdatePolicy` OnDeployUpdatePolicy — Security patches are only applied when a function is redeployed.
        - `runtimeVersion` string — Output only. contains the runtime version which was used during latest function deployment.
      - `dockerRepository` 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'.
      - `automaticUpdatePolicy` AutomaticUpdatePolicy — Security patches are applied automatically to the runtime without requiring the function to be redeployed.
      - `environmentVariables` object — User-provided build-time environment variables for the function
      - `dockerRegistry` 'DOCKER_REGISTRY_UNSPECIFIED' | 'CONTAINER_REGISTRY' | 'ARTIFACT_REGISTRY' — 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`.
      - `sourceProvenance` SourceProvenance — Provenance of the source. Ways to find the original source, or verify that some source was used for this build.
        - `resolvedStorageSource` StorageSource — Location of the source in an archive file in Google Cloud Storage.
          - `object` string — Google Cloud Storage object containing the source. This object must be a gzipped archive file (`.tar.gz`) containing source to build.
          - `generation` string, int64 — Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used.
          - `bucket` string — Google Cloud Storage bucket containing the source (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
          - `sourceUploadUrl` 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.
        - `resolvedRepoSource` RepoSource — Location of the source in a Google Cloud Source Repository.
          - `repoName` string — Name of the Cloud Source Repository.
          - `branchName` 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
          - `tagName` 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
          - `projectId` string — ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.
          - `commitSha` string — Explicit commit SHA to build.
          - `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)
        - `gitUri` string — A copy of the build's `source.git_uri`, if exists, with any commits resolved.
    - `upgradeState` 'UPGRADE_STATE_UNSPECIFIED' | 'ELIGIBLE_FOR_2ND_GEN_UPGRADE' | 'INELIGIBLE_FOR_UPGRADE_UNTIL_REDEPLOYMENT' | 'UPGRADE_OPERATION_IN_PROGRESS' | 'SETUP_FUNCTION_UPGRADE_CONFIG_SUCCESSFUL' | 'SETUP_FUNCTION_UPGRADE_CONFIG_ERROR' | 'ABORT_FUNCTION_UPGRADE_ERROR' | 'REDIRECT_FUNCTION_UPGRADE_TRAFFIC_SUCCESSFUL' | 'REDIRECT_FUNCTION_UPGRADE_TRAFFIC_ERROR' | 'ROLLBACK_FUNCTION_UPGRADE_TRAFFIC_ERROR' | 'COMMIT_FUNCTION_UPGRADE_ERROR' | 'COMMIT_FUNCTION_UPGRADE_ERROR_ROLLBACK_SAFE' | 'COMMIT_FUNCTION_UPGRADE_AS_GEN2_SUCCESSFUL' | 'COMMIT_FUNCTION_UPGRADE_AS_GEN2_ERROR' — UpgradeState of the function
    - `serviceConfig` ServiceConfig — Describes the Service being deployed. Currently Supported : Cloud Run (fully managed).
      - `environmentVariables` object — Environment variables that shall be available during function execution.
      - `secretEnvironmentVariables` SecretEnvVar[] — Secret environment variables configuration.
        - `projectId` 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.
        - `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.
        - `secret` string — Name of the secret in secret manager (not the full resource name).
        - `key` string — Name of the environment variable.
      - `availableMemory` 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.
      - `allTrafficOnLatestRevision` boolean — 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.
      - `secretVolumes` SecretVolume[] — Secret volumes configuration.
        - `secret` string — Name of the secret in secret manager (not the full resource name).
        - `versions` 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.
          - `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`.
        - `projectId` 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.
        - `mountPath` 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
      - `directVpcNetworkInterface` DirectVpcNetworkInterface[] — Optional. The Direct VPC network interface for the Cloud Function. Currently only a single Direct VPC is supported.
        - `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.
      - `maxInstanceCount` integer — 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.
      - `maxInstanceRequestConcurrency` integer — Sets the maximum number of concurrent requests that each instance can receive. Defaults to 1.
      - `securityLevel` 'SECURITY_LEVEL_UNSPECIFIED' | 'SECURE_ALWAYS' | 'SECURE_OPTIONAL' — 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.
      - `timeoutSeconds` integer — 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.
      - `availableCpu` 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
      - `binaryAuthorizationPolicy` string — Optional. The binary authorization policy to be checked when deploying the Cloud Run service.
      - `vpcConnectorEgressSettings` 'VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED' | 'PRIVATE_RANGES_ONLY' | 'ALL_TRAFFIC' — The egress settings for the connector, controlling what traffic is diverted through it.
      - `serviceAccountEmail` string — The email of the service's service account. If empty, defaults to `{project_number}-compute@developer.gserviceaccount.com`.
      - `vpcConnector` string — The Serverless VPC Access connector that this cloud function can connect to. The format of this field is `projects/*/locations/*/connectors/*`.
      - `revision` string — Output only. The name of service revision.
      - `directVpcEgress` 'DIRECT_VPC_EGRESS_UNSPECIFIED' | 'VPC_EGRESS_PRIVATE_RANGES_ONLY' | 'VPC_EGRESS_ALL_TRAFFIC' — Optional. Egress settings for direct VPC. If not provided, it defaults to VPC_EGRESS_PRIVATE_RANGES_ONLY.
      - `service` string — Output only. Name of the service associated with a Function. The format of this field is `projects/{project}/locations/{region}/services/{service}`
      - `minInstanceCount` integer — 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.
      - `uri` string — Output only. URI of the Service deployed.
      - `ingressSettings` 'INGRESS_SETTINGS_UNSPECIFIED' | 'ALLOW_ALL' | 'ALLOW_INTERNAL_ONLY' | 'ALLOW_INTERNAL_AND_GCLB' — The ingress settings for the function, controlling what traffic can reach it.
  - `kmsKeyName` 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}`.
  - `buildConfig` BuildConfig — Describes the Build step of the function that builds a container from the given source.
    - `source` Source — The location of the function source code.
      - `gitUri` string — If provided, get the source from GitHub repository. This option is valid only for GCF 1st Gen function. Example: https://github.com///blob//
      - `storageSource` StorageSource — Location of the source in an archive file in Google Cloud Storage.
        - `object` string — Google Cloud Storage object containing the source. This object must be a gzipped archive file (`.tar.gz`) containing source to build.
        - `generation` string, int64 — Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used.
        - `bucket` string — Google Cloud Storage bucket containing the source (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
        - `sourceUploadUrl` 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.
      - `repoSource` RepoSource — Location of the source in a Google Cloud Source Repository.
        - `repoName` string — Name of the Cloud Source Repository.
        - `branchName` 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
        - `tagName` 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
        - `projectId` string — ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.
        - `commitSha` string — Explicit commit SHA to build.
        - `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)
    - `serviceAccount` string — Service account to be used for building the container. The format of this field is `projects/{projectId}/serviceAccounts/{serviceAccountEmail}`.
    - `entryPoint` 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`.
    - `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).
    - `sourceToken` string — An identifier for Firebase function sources. Disclaimer: This field is only supported for Firebase function deployments.
    - `workerPool` 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.
    - `build` string — Output only. The Cloud Build name of the latest successful deployment of the function.
    - `onDeployUpdatePolicy` OnDeployUpdatePolicy — Security patches are only applied when a function is redeployed.
      - `runtimeVersion` string — Output only. contains the runtime version which was used during latest function deployment.
    - `dockerRepository` 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'.
    - `automaticUpdatePolicy` AutomaticUpdatePolicy — Security patches are applied automatically to the runtime without requiring the function to be redeployed.
    - `environmentVariables` object — User-provided build-time environment variables for the function
    - `dockerRegistry` 'DOCKER_REGISTRY_UNSPECIFIED' | 'CONTAINER_REGISTRY' | 'ARTIFACT_REGISTRY' — 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`.
    - `sourceProvenance` SourceProvenance — Provenance of the source. Ways to find the original source, or verify that some source was used for this build.
      - `resolvedStorageSource` StorageSource — Location of the source in an archive file in Google Cloud Storage.
        - `object` string — Google Cloud Storage object containing the source. This object must be a gzipped archive file (`.tar.gz`) containing source to build.
        - `generation` string, int64 — Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used.
        - `bucket` string — Google Cloud Storage bucket containing the source (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
        - `sourceUploadUrl` 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.
      - `resolvedRepoSource` RepoSource — Location of the source in a Google Cloud Source Repository.
        - `repoName` string — Name of the Cloud Source Repository.
        - `branchName` 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
        - `tagName` 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
        - `projectId` string — ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.
        - `commitSha` string — Explicit commit SHA to build.
        - `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)
      - `gitUri` string — A copy of the build's `source.git_uri`, if exists, with any commits resolved.
  - `environment` 'ENVIRONMENT_UNSPECIFIED' | 'GEN_1' | 'GEN_2' — Describe whether the function is 1st Gen or 2nd Gen.
  - `url` string — Output only. The deployed url for the function.
  - `satisfiesPzs` boolean — Output only. Reserved for future use.
  - `serviceConfig` ServiceConfig — Describes the Service being deployed. Currently Supported : Cloud Run (fully managed).
    - `environmentVariables` object — Environment variables that shall be available during function execution.
    - `secretEnvironmentVariables` SecretEnvVar[] — Secret environment variables configuration.
      - `projectId` 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.
      - `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.
      - `secret` string — Name of the secret in secret manager (not the full resource name).
      - `key` string — Name of the environment variable.
    - `availableMemory` 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.
    - `allTrafficOnLatestRevision` boolean — 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.
    - `secretVolumes` SecretVolume[] — Secret volumes configuration.
      - `secret` string — Name of the secret in secret manager (not the full resource name).
      - `versions` 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.
        - `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`.
      - `projectId` 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.
      - `mountPath` 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
    - `directVpcNetworkInterface` DirectVpcNetworkInterface[] — Optional. The Direct VPC network interface for the Cloud Function. Currently only a single Direct VPC is supported.
      - `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.
    - `maxInstanceCount` integer — 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.
    - `maxInstanceRequestConcurrency` integer — Sets the maximum number of concurrent requests that each instance can receive. Defaults to 1.
    - `securityLevel` 'SECURITY_LEVEL_UNSPECIFIED' | 'SECURE_ALWAYS' | 'SECURE_OPTIONAL' — 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.
    - `timeoutSeconds` integer — 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.
    - `availableCpu` 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
    - `binaryAuthorizationPolicy` string — Optional. The binary authorization policy to be checked when deploying the Cloud Run service.
    - `vpcConnectorEgressSettings` 'VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED' | 'PRIVATE_RANGES_ONLY' | 'ALL_TRAFFIC' — The egress settings for the connector, controlling what traffic is diverted through it.
    - `serviceAccountEmail` string — The email of the service's service account. If empty, defaults to `{project_number}-compute@developer.gserviceaccount.com`.
    - `vpcConnector` string — The Serverless VPC Access connector that this cloud function can connect to. The format of this field is `projects/*/locations/*/connectors/*`.
    - `revision` string — Output only. The name of service revision.
    - `directVpcEgress` 'DIRECT_VPC_EGRESS_UNSPECIFIED' | 'VPC_EGRESS_PRIVATE_RANGES_ONLY' | 'VPC_EGRESS_ALL_TRAFFIC' — Optional. Egress settings for direct VPC. If not provided, it defaults to VPC_EGRESS_PRIVATE_RANGES_ONLY.
    - `service` string — Output only. Name of the service associated with a Function. The format of this field is `projects/{project}/locations/{region}/services/{service}`
    - `minInstanceCount` integer — 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.
    - `uri` string — Output only. URI of the Service deployed.
    - `ingressSettings` 'INGRESS_SETTINGS_UNSPECIFIED' | 'ALLOW_ALL' | 'ALLOW_INTERNAL_ONLY' | 'ALLOW_INTERNAL_AND_GCLB' — The ingress settings for the function, controlling what traffic can reach it.
  - `description` string — User-provided description of a function.
  - `labels` object — Labels associated with this Cloud Function.
  - `state` 'STATE_UNSPECIFIED' | 'ACTIVE' | 'FAILED' | 'DEPLOYING' | 'DELETING' | 'UNKNOWN' | 'DETACHING' | 'DETACH_FAILED' — Output only. State of the function.
  - `stateMessages` GoogleCloudFunctionsV2StateMessage[] — Output only. State Messages for this Cloud Function.
    - `severity` 'SEVERITY_UNSPECIFIED' | 'ERROR' | 'WARNING' | 'INFO' — Severity of the state message.
    - `message` string — The message.
    - `type` string — One-word CamelCase type of the state message.
  - `name` string — A user-defined name of the function. Function names must be unique globally and match pattern `projects/*/locations/*/functions/*`
  - `satisfiesPzi` boolean — Output only. Reserved for future use.
  - `eventTrigger` EventTrigger — Describes EventTrigger, used to request events to be sent from another service.
    - `pubsubTopic` 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.
    - `retryPolicy` 'RETRY_POLICY_UNSPECIFIED' | 'RETRY_POLICY_DO_NOT_RETRY' | 'RETRY_POLICY_RETRY' — Optional. If unset, then defaults to ignoring failures (i.e. not retrying them).
    - `trigger` string — Output only. The resource name of the Eventarc trigger. The format of this field is `projects/{project}/locations/{region}/triggers/{trigger}`.
    - `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.
    - `triggerRegion` 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.
    - `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.
    - `eventType` string — Required. The type of event to observe. For example: `google.cloud.audit.log.v1.written` or `google.cloud.pubsub.topic.v1.messagePublished`.
    - `eventFilters` EventFilter[] — Criteria used to filter events.
      - `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`.
      - `attribute` string — Required. The name of a CloudEvents attribute.
      - `value` string — Required. The value for the attribute.
    - `serviceAccountEmail` 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`.
  - `updateTime` string, google-datetime — Output only. The last update timestamp of a Cloud Function.
  - `createTime` string, google-datetime — Output only. The create timestamp of a Cloud Function. This is only applicable to 2nd Gen functions.

## Response `200`

Successful response

---

[API](https://skmtc.dev/google/apis/cloudfunctions.md) · [All operations](https://skmtc.dev/google/apis/cloudfunctions/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/google/cloudfunctions/revisions/3063be097e80/schema)
