- 2.55.0 (latest)
- 2.54.0
- 2.53.0
- 2.51.0
- 2.50.0
- 2.49.0
- 2.48.0
- 2.47.0
- 2.46.0
- 2.45.0
- 2.44.0
- 2.43.0
- 2.42.0
- 2.41.0
- 2.39.0
- 2.38.0
- 2.37.0
- 2.36.0
- 2.35.0
- 2.34.0
- 2.33.0
- 2.32.0
- 2.31.0
- 2.30.0
- 2.29.0
- 2.26.0
- 2.25.0
- 2.24.0
- 2.23.0
- 2.22.0
- 2.21.0
- 2.20.0
- 2.19.0
- 2.18.0
- 2.17.0
- 2.16.0
- 2.15.0
- 2.14.0
- 2.13.0
- 2.11.0
- 2.10.0
- 2.9.0
- 2.8.0
- 2.7.0
- 2.6.0
- 2.5.4
- 2.4.3
- 2.3.6
public static final class CloudFunction.Builder extends GeneratedMessageV3.Builder<CloudFunction.Builder> implements CloudFunctionOrBuilder
Describes a Cloud Function that contains user computation executed in response to an event. It encapsulates function and triggers configurations.
Protobuf type google.cloud.functions.v1.CloudFunction
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > CloudFunction.BuilderImplements
CloudFunctionOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns | |
---|---|
Type | Description |
Descriptor |
Methods
addAllSecretEnvironmentVariables(Iterable<? extends SecretEnvVar> values)
public CloudFunction.Builder addAllSecretEnvironmentVariables(Iterable<? extends SecretEnvVar> values)
Secret environment variables configuration.
repeated .google.cloud.functions.v1.SecretEnvVar secret_environment_variables = 29;
Parameter | |
---|---|
Name | Description |
values | Iterable<? extends com.google.cloud.functions.v1.SecretEnvVar> |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder |
addAllSecretVolumes(Iterable<? extends SecretVolume> values)
public CloudFunction.Builder addAllSecretVolumes(Iterable<? extends SecretVolume> values)
Secret volumes configuration.
repeated .google.cloud.functions.v1.SecretVolume secret_volumes = 30;
Parameter | |
---|---|
Name | Description |
values | Iterable<? extends com.google.cloud.functions.v1.SecretVolume> |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder |
addSecretEnvironmentVariables(SecretEnvVar value)
public CloudFunction.Builder addSecretEnvironmentVariables(SecretEnvVar value)
Secret environment variables configuration.
repeated .google.cloud.functions.v1.SecretEnvVar secret_environment_variables = 29;
Parameter | |
---|---|
Name | Description |
value | SecretEnvVar |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder |
addSecretEnvironmentVariables(SecretEnvVar.Builder builderForValue)
public CloudFunction.Builder addSecretEnvironmentVariables(SecretEnvVar.Builder builderForValue)
Secret environment variables configuration.
repeated .google.cloud.functions.v1.SecretEnvVar secret_environment_variables = 29;
Parameter | |
---|---|
Name | Description |
builderForValue | SecretEnvVar.Builder |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder |
addSecretEnvironmentVariables(int index, SecretEnvVar value)
public CloudFunction.Builder addSecretEnvironmentVariables(int index, SecretEnvVar value)
Secret environment variables configuration.
repeated .google.cloud.functions.v1.SecretEnvVar secret_environment_variables = 29;
Parameters | |
---|---|
Name | Description |
index | int |
value | SecretEnvVar |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder |
addSecretEnvironmentVariables(int index, SecretEnvVar.Builder builderForValue)
public CloudFunction.Builder addSecretEnvironmentVariables(int index, SecretEnvVar.Builder builderForValue)
Secret environment variables configuration.
repeated .google.cloud.functions.v1.SecretEnvVar secret_environment_variables = 29;
Parameters | |
---|---|
Name | Description |
index | int |
builderForValue | SecretEnvVar.Builder |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder |
addSecretEnvironmentVariablesBuilder()
public SecretEnvVar.Builder addSecretEnvironmentVariablesBuilder()
Secret environment variables configuration.
repeated .google.cloud.functions.v1.SecretEnvVar secret_environment_variables = 29;
Returns | |
---|---|
Type | Description |
SecretEnvVar.Builder |
addSecretEnvironmentVariablesBuilder(int index)
public SecretEnvVar.Builder addSecretEnvironmentVariablesBuilder(int index)
Secret environment variables configuration.
repeated .google.cloud.functions.v1.SecretEnvVar secret_environment_variables = 29;
Parameter | |
---|---|
Name | Description |
index | int |
Returns | |
---|---|
Type | Description |
SecretEnvVar.Builder |
addSecretVolumes(SecretVolume value)
public CloudFunction.Builder addSecretVolumes(SecretVolume value)
Secret volumes configuration.
repeated .google.cloud.functions.v1.SecretVolume secret_volumes = 30;
Parameter | |
---|---|
Name | Description |
value | SecretVolume |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder |
addSecretVolumes(SecretVolume.Builder builderForValue)
public CloudFunction.Builder addSecretVolumes(SecretVolume.Builder builderForValue)
Secret volumes configuration.
repeated .google.cloud.functions.v1.SecretVolume secret_volumes = 30;
Parameter | |
---|---|
Name | Description |
builderForValue | SecretVolume.Builder |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder |
addSecretVolumes(int index, SecretVolume value)
public CloudFunction.Builder addSecretVolumes(int index, SecretVolume value)
Secret volumes configuration.
repeated .google.cloud.functions.v1.SecretVolume secret_volumes = 30;
Parameters | |
---|---|
Name | Description |
index | int |
value | SecretVolume |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder |
addSecretVolumes(int index, SecretVolume.Builder builderForValue)
public CloudFunction.Builder addSecretVolumes(int index, SecretVolume.Builder builderForValue)
Secret volumes configuration.
repeated .google.cloud.functions.v1.SecretVolume secret_volumes = 30;
Parameters | |
---|---|
Name | Description |
index | int |
builderForValue | SecretVolume.Builder |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder |
addSecretVolumesBuilder()
public SecretVolume.Builder addSecretVolumesBuilder()
Secret volumes configuration.
repeated .google.cloud.functions.v1.SecretVolume secret_volumes = 30;
Returns | |
---|---|
Type | Description |
SecretVolume.Builder |
addSecretVolumesBuilder(int index)
public SecretVolume.Builder addSecretVolumesBuilder(int index)
Secret volumes configuration.
repeated .google.cloud.functions.v1.SecretVolume secret_volumes = 30;
Parameter | |
---|---|
Name | Description |
index | int |
Returns | |
---|---|
Type | Description |
SecretVolume.Builder |
build()
public CloudFunction build()
Returns | |
---|---|
Type | Description |
CloudFunction |
buildPartial()
public CloudFunction buildPartial()
Returns | |
---|---|
Type | Description |
CloudFunction |
clear()
public CloudFunction.Builder clear()
Returns | |
---|---|
Type | Description |
CloudFunction.Builder |
clearAvailableMemoryMb()
public CloudFunction.Builder clearAvailableMemoryMb()
The amount of memory in MB available for a function. Defaults to 256MB.
int32 available_memory_mb = 10;
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
clearBuildEnvironmentVariables()
public CloudFunction.Builder clearBuildEnvironmentVariables()
Returns | |
---|---|
Type | Description |
CloudFunction.Builder |
clearBuildId()
public CloudFunction.Builder clearBuildId()
Output only. The Cloud Build ID of the latest successful deployment of the function.
string build_id = 27 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
clearBuildName()
public CloudFunction.Builder clearBuildName()
Output only. The Cloud Build Name of the function deployment.
projects/<project-number>/locations/<region>/builds/<build-id>
.
string build_name = 33 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
clearBuildWorkerPool()
public CloudFunction.Builder clearBuildWorkerPool()
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-<project_number>@gcf-admin-robot.iam.gserviceaccount.com
) must
be granted the role Cloud Build Custom Workers Builder
(roles/cloudbuild.customworkers.builder
) in the project.
string build_worker_pool = 26;
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
clearDescription()
public CloudFunction.Builder clearDescription()
User-provided description of a function.
string description = 2;
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
clearDockerRegistry()
public CloudFunction.Builder clearDockerRegistry()
Docker Registry to use for this deployment.
If docker_repository
field is specified, this field is automatically
set as ARTIFACT_REGISTRY
.
If unspecified, it currently defaults to CONTAINER_REGISTRY
.
This field may be overridden by the backend for eligible deployments.
.google.cloud.functions.v1.CloudFunction.DockerRegistry docker_registry = 35;
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
clearDockerRepository()
public CloudFunction.Builder clearDockerRepository()
User managed repository created in Artifact Registry optionally with a customer managed encryption key. If specified, deployments will use Artifact Registry. If unspecified and the deployment is eligible to use Artifact Registry, GCF will create and use a repository named 'gcf-artifacts' for every deployed region. This is the repository to which the function docker image is pushed after it is built by Cloud Build.
It must match the pattern
projects/{project}/locations/{location}/repositories/{repository}
.
Cross-project repositories are not supported. Cross-location repositories are not supported. Repository format must be 'DOCKER'.
string docker_repository = 34 [(.google.api.resource_reference) = { ... }
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
clearEntryPoint()
public CloudFunction.Builder clearEntryPoint()
The name of the function (as defined in source code) that is executed.
Defaults to the resource name suffix, if not specified. For
backward compatibility, if function with given name is not found, the
system tries to use the function named "function".
For Node.js, this is the name of a function exported by the module
as specified in source_location
.
string entry_point = 8;
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
clearEnvironmentVariables()
public CloudFunction.Builder clearEnvironmentVariables()
Returns | |
---|---|
Type | Description |
CloudFunction.Builder |
clearEventTrigger()
public CloudFunction.Builder clearEventTrigger()
A source that fires events in response to a condition in another service.
.google.cloud.functions.v1.EventTrigger event_trigger = 6;
Returns | |
---|---|
Type | Description |
CloudFunction.Builder |
clearHttpsTrigger()
public CloudFunction.Builder clearHttpsTrigger()
An HTTPS endpoint type of source that can be triggered via URL.
.google.cloud.functions.v1.HttpsTrigger https_trigger = 5;
Returns | |
---|---|
Type | Description |
CloudFunction.Builder |
clearIngressSettings()
public CloudFunction.Builder clearIngressSettings()
The ingress settings for the function, controlling what traffic can reach it.
.google.cloud.functions.v1.CloudFunction.IngressSettings ingress_settings = 24;
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
clearKmsKeyName()
public CloudFunction.Builder clearKmsKeyName()
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}
.
If specified, you must also provide an artifact registry repository using
the docker_repository
field that was created with the same KMS crypto
key.
The following service accounts need to be granted the role 'Cloud KMS CryptoKey Encrypter/Decrypter (roles/cloudkms.cryptoKeyEncrypterDecrypter)' on the Key/KeyRing/Project/Organization (least access preferred).
- Google Cloud Functions service account (service-{project_number}@gcf-admin-robot.iam.gserviceaccount.com) - Required to protect the function's image.
Google Storage service account (service-{project_number}@gs-project-accounts.iam.gserviceaccount.com) - Required to protect the function's source code. If this service account does not exist, deploying a function without a KMS key or retrieving the service agent name provisions it. For more information, see https://cloud.google.com/storage/docs/projects#service-agents and https://cloud.google.com/storage/docs/getting-service-agent#gsutil.
Google Cloud Functions delegates access to service agents to protect function resources in internal projects that are not accessible by the end user.
string kms_key_name = 25 [(.google.api.resource_reference) = { ... }
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
clearLabels()
public CloudFunction.Builder clearLabels()
Returns | |
---|---|
Type | Description |
CloudFunction.Builder |
clearMaxInstances()
public CloudFunction.Builder clearMaxInstances()
The limit on the maximum number of function instances that can coexist at a given time.
In some cases, such as rapid traffic surges, Cloud Functions can for a short period of time create more instances than the specified max instances limit. If your function cannot tolerate this temporary behavior, you might want to factor in a safety margin and set a lower max instances value than your function can tolerate.
See the Max Instances Guide for more details.
int32 max_instances = 20;
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
clearMinInstances()
public CloudFunction.Builder clearMinInstances()
A lower bound for the number function instances that can coexist at a given time.
int32 min_instances = 32;
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
clearName()
public CloudFunction.Builder clearName()
A user-defined name of the function. Function names must be unique
globally and match pattern projects/*/locations/*/functions/*
string name = 1;
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
clearNetwork()
public CloudFunction.Builder clearNetwork()
The Serverless VPC Access connector that this cloud function can connect
to. It can be either the fully qualified URI, or the short name of the
connector resource. If the connector name is used, the connector must
belong to the same project as the function. Otherwise, it must belong to a
project within the same organization. The format of this field is either
projects/{project}/global/networks/{network}
or {network}
, where
{project}
is a project id where the network is defined, and {network}
is the short name of the network.
This field is mutually exclusive with vpc_connector
and will be replaced
by it.
See the VPC documentation for more information on connecting Cloud projects.
string network = 18;
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
clearRuntime()
public CloudFunction.Builder clearRuntime()
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.
string runtime = 19;
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
clearSecretEnvironmentVariables()
public CloudFunction.Builder clearSecretEnvironmentVariables()
Secret environment variables configuration.
repeated .google.cloud.functions.v1.SecretEnvVar secret_environment_variables = 29;
Returns | |
---|---|
Type | Description |
CloudFunction.Builder |
clearSecretVolumes()
public CloudFunction.Builder clearSecretVolumes()
Secret volumes configuration.
repeated .google.cloud.functions.v1.SecretVolume secret_volumes = 30;
Returns | |
---|---|
Type | Description |
CloudFunction.Builder |
clearServiceAccountEmail()
public CloudFunction.Builder clearServiceAccountEmail()
The email of the function's service account. If empty, defaults to
{project_id}@appspot.gserviceaccount.com
.
string service_account_email = 11;
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
clearSourceArchiveUrl()
public CloudFunction.Builder clearSourceArchiveUrl()
The Google Cloud Storage URL, starting with gs://
, pointing to the zip
archive which contains the function.
string source_archive_url = 3;
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
clearSourceCode()
public CloudFunction.Builder clearSourceCode()
Returns | |
---|---|
Type | Description |
CloudFunction.Builder |
clearSourceRepository()
public CloudFunction.Builder clearSourceRepository()
Beta Feature
The source repository where a function is hosted.
.google.cloud.functions.v1.SourceRepository source_repository = 4;
Returns | |
---|---|
Type | Description |
CloudFunction.Builder |
clearSourceToken()
public CloudFunction.Builder clearSourceToken()
Input only. An identifier for Firebase function sources. Disclaimer: This field is only supported for Firebase function deployments.
string source_token = 31 [(.google.api.field_behavior) = INPUT_ONLY];
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
clearSourceUploadUrl()
public CloudFunction.Builder clearSourceUploadUrl()
The Google Cloud Storage-signed URL used for source uploading, generated by calling [google.cloud.functions.v1.GenerateUploadUrl].
The signature is validated on write methods (Create, Update) The signature is stripped from the Function object on read methods (Get, List)
string source_upload_url = 16;
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
clearStatus()
public CloudFunction.Builder clearStatus()
Output only. Status of the function deployment.
.google.cloud.functions.v1.CloudFunctionStatus status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
clearTimeout()
public CloudFunction.Builder clearTimeout()
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.
.google.protobuf.Duration timeout = 9;
Returns | |
---|---|
Type | Description |
CloudFunction.Builder |
clearTrigger()
public CloudFunction.Builder clearTrigger()
Returns | |
---|---|
Type | Description |
CloudFunction.Builder |
clearUpdateTime()
public CloudFunction.Builder clearUpdateTime()
Output only. The last update timestamp of a Cloud Function.
.google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
CloudFunction.Builder |
clearVersionId()
public CloudFunction.Builder clearVersionId()
Output only. The version identifier of the Cloud Function. Each deployment attempt results in a new version of a function being created.
int64 version_id = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
clearVpcConnector()
public CloudFunction.Builder clearVpcConnector()
The VPC Network Connector that this cloud function can connect to. It can
be either the fully qualified URI, or the short name of the network
connector resource. The format of this field is
projects/*/locations/*/connectors/*
This field is mutually exclusive with network
field and will eventually
replace it.
See the VPC documentation for more information on connecting Cloud projects.
string vpc_connector = 22;
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
clearVpcConnectorEgressSettings()
public CloudFunction.Builder clearVpcConnectorEgressSettings()
The egress settings for the connector, controlling what traffic is diverted through it.
.google.cloud.functions.v1.CloudFunction.VpcConnectorEgressSettings vpc_connector_egress_settings = 23;
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
containsBuildEnvironmentVariables(String key)
public boolean containsBuildEnvironmentVariables(String key)
Build environment variables that shall be available during build time.
map<string, string> build_environment_variables = 28;
Parameter | |
---|---|
Name | Description |
key | String |
Returns | |
---|---|
Type | Description |
boolean |
containsEnvironmentVariables(String key)
public boolean containsEnvironmentVariables(String key)
Environment variables that shall be available during function execution.
map<string, string> environment_variables = 17;
Parameter | |
---|---|
Name | Description |
key | String |
Returns | |
---|---|
Type | Description |
boolean |
containsLabels(String key)
public boolean containsLabels(String key)
Labels associated with this Cloud Function.
map<string, string> labels = 15;
Parameter | |
---|---|
Name | Description |
key | String |
Returns | |
---|---|
Type | Description |
boolean |
getAvailableMemoryMb()
public int getAvailableMemoryMb()
The amount of memory in MB available for a function. Defaults to 256MB.
int32 available_memory_mb = 10;
Returns | |
---|---|
Type | Description |
int | The availableMemoryMb. |
getBuildEnvironmentVariables()
public Map<String,String> getBuildEnvironmentVariables()
Use #getBuildEnvironmentVariablesMap() instead.
Returns | |
---|---|
Type | Description |
Map<String,String> |
getBuildEnvironmentVariablesCount()
public int getBuildEnvironmentVariablesCount()
Build environment variables that shall be available during build time.
map<string, string> build_environment_variables = 28;
Returns | |
---|---|
Type | Description |
int |
getBuildEnvironmentVariablesMap()
public Map<String,String> getBuildEnvironmentVariablesMap()
Build environment variables that shall be available during build time.
map<string, string> build_environment_variables = 28;
Returns | |
---|---|
Type | Description |
Map<String,String> |
getBuildEnvironmentVariablesOrDefault(String key, String defaultValue)
public String getBuildEnvironmentVariablesOrDefault(String key, String defaultValue)
Build environment variables that shall be available during build time.
map<string, string> build_environment_variables = 28;
Parameters | |
---|---|
Name | Description |
key | String |
defaultValue | String |
Returns | |
---|---|
Type | Description |
String |
getBuildEnvironmentVariablesOrThrow(String key)
public String getBuildEnvironmentVariablesOrThrow(String key)
Build environment variables that shall be available during build time.
map<string, string> build_environment_variables = 28;
Parameter | |
---|---|
Name | Description |
key | String |
Returns | |
---|---|
Type | Description |
String |
getBuildId()
public String getBuildId()
Output only. The Cloud Build ID of the latest successful deployment of the function.
string build_id = 27 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
String | The buildId. |
getBuildIdBytes()
public ByteString getBuildIdBytes()
Output only. The Cloud Build ID of the latest successful deployment of the function.
string build_id = 27 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
ByteString | The bytes for buildId. |
getBuildName()
public String getBuildName()
Output only. The Cloud Build Name of the function deployment.
projects/<project-number>/locations/<region>/builds/<build-id>
.
string build_name = 33 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
String | The buildName. |
getBuildNameBytes()
public ByteString getBuildNameBytes()
Output only. The Cloud Build Name of the function deployment.
projects/<project-number>/locations/<region>/builds/<build-id>
.
string build_name = 33 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
ByteString | The bytes for buildName. |
getBuildWorkerPool()
public String getBuildWorkerPool()
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-<project_number>@gcf-admin-robot.iam.gserviceaccount.com
) must
be granted the role Cloud Build Custom Workers Builder
(roles/cloudbuild.customworkers.builder
) in the project.
string build_worker_pool = 26;
Returns | |
---|---|
Type | Description |
String | The buildWorkerPool. |
getBuildWorkerPoolBytes()
public ByteString getBuildWorkerPoolBytes()
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-<project_number>@gcf-admin-robot.iam.gserviceaccount.com
) must
be granted the role Cloud Build Custom Workers Builder
(roles/cloudbuild.customworkers.builder
) in the project.
string build_worker_pool = 26;
Returns | |
---|---|
Type | Description |
ByteString | The bytes for buildWorkerPool. |
getDefaultInstanceForType()
public CloudFunction getDefaultInstanceForType()
Returns | |
---|---|
Type | Description |
CloudFunction |
getDescription()
public String getDescription()
User-provided description of a function.
string description = 2;
Returns | |
---|---|
Type | Description |
String | The description. |
getDescriptionBytes()
public ByteString getDescriptionBytes()
User-provided description of a function.
string description = 2;
Returns | |
---|---|
Type | Description |
ByteString | The bytes for description. |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns | |
---|---|
Type | Description |
Descriptor |
getDockerRegistry()
public CloudFunction.DockerRegistry getDockerRegistry()
Docker Registry to use for this deployment.
If docker_repository
field is specified, this field is automatically
set as ARTIFACT_REGISTRY
.
If unspecified, it currently defaults to CONTAINER_REGISTRY
.
This field may be overridden by the backend for eligible deployments.
.google.cloud.functions.v1.CloudFunction.DockerRegistry docker_registry = 35;
Returns | |
---|---|
Type | Description |
CloudFunction.DockerRegistry | The dockerRegistry. |
getDockerRegistryValue()
public int getDockerRegistryValue()
Docker Registry to use for this deployment.
If docker_repository
field is specified, this field is automatically
set as ARTIFACT_REGISTRY
.
If unspecified, it currently defaults to CONTAINER_REGISTRY
.
This field may be overridden by the backend for eligible deployments.
.google.cloud.functions.v1.CloudFunction.DockerRegistry docker_registry = 35;
Returns | |
---|---|
Type | Description |
int | The enum numeric value on the wire for dockerRegistry. |
getDockerRepository()
public String getDockerRepository()
User managed repository created in Artifact Registry optionally with a customer managed encryption key. If specified, deployments will use Artifact Registry. If unspecified and the deployment is eligible to use Artifact Registry, GCF will create and use a repository named 'gcf-artifacts' for every deployed region. This is the repository to which the function docker image is pushed after it is built by Cloud Build.
It must match the pattern
projects/{project}/locations/{location}/repositories/{repository}
.
Cross-project repositories are not supported. Cross-location repositories are not supported. Repository format must be 'DOCKER'.
string docker_repository = 34 [(.google.api.resource_reference) = { ... }
Returns | |
---|---|
Type | Description |
String | The dockerRepository. |
getDockerRepositoryBytes()
public ByteString getDockerRepositoryBytes()
User managed repository created in Artifact Registry optionally with a customer managed encryption key. If specified, deployments will use Artifact Registry. If unspecified and the deployment is eligible to use Artifact Registry, GCF will create and use a repository named 'gcf-artifacts' for every deployed region. This is the repository to which the function docker image is pushed after it is built by Cloud Build.
It must match the pattern
projects/{project}/locations/{location}/repositories/{repository}
.
Cross-project repositories are not supported. Cross-location repositories are not supported. Repository format must be 'DOCKER'.
string docker_repository = 34 [(.google.api.resource_reference) = { ... }
Returns | |
---|---|
Type | Description |
ByteString | The bytes for dockerRepository. |
getEntryPoint()
public String getEntryPoint()
The name of the function (as defined in source code) that is executed.
Defaults to the resource name suffix, if not specified. For
backward compatibility, if function with given name is not found, the
system tries to use the function named "function".
For Node.js, this is the name of a function exported by the module
as specified in source_location
.
string entry_point = 8;
Returns | |
---|---|
Type | Description |
String | The entryPoint. |
getEntryPointBytes()
public ByteString getEntryPointBytes()
The name of the function (as defined in source code) that is executed.
Defaults to the resource name suffix, if not specified. For
backward compatibility, if function with given name is not found, the
system tries to use the function named "function".
For Node.js, this is the name of a function exported by the module
as specified in source_location
.
string entry_point = 8;
Returns | |
---|---|
Type | Description |
ByteString | The bytes for entryPoint. |
getEnvironmentVariables()
public Map<String,String> getEnvironmentVariables()
Use #getEnvironmentVariablesMap() instead.
Returns | |
---|---|
Type | Description |
Map<String,String> |
getEnvironmentVariablesCount()
public int getEnvironmentVariablesCount()
Environment variables that shall be available during function execution.
map<string, string> environment_variables = 17;
Returns | |
---|---|
Type | Description |
int |
getEnvironmentVariablesMap()
public Map<String,String> getEnvironmentVariablesMap()
Environment variables that shall be available during function execution.
map<string, string> environment_variables = 17;
Returns | |
---|---|
Type | Description |
Map<String,String> |
getEnvironmentVariablesOrDefault(String key, String defaultValue)
public String getEnvironmentVariablesOrDefault(String key, String defaultValue)
Environment variables that shall be available during function execution.
map<string, string> environment_variables = 17;
Parameters | |
---|---|
Name | Description |
key | String |
defaultValue | String |
Returns | |
---|---|
Type | Description |
String |
getEnvironmentVariablesOrThrow(String key)
public String getEnvironmentVariablesOrThrow(String key)
Environment variables that shall be available during function execution.
map<string, string> environment_variables = 17;
Parameter | |
---|---|
Name | Description |
key | String |
Returns | |
---|---|
Type | Description |
String |
getEventTrigger()
public EventTrigger getEventTrigger()
A source that fires events in response to a condition in another service.
.google.cloud.functions.v1.EventTrigger event_trigger = 6;
Returns | |
---|---|
Type | Description |
EventTrigger | The eventTrigger. |
getEventTriggerBuilder()
public EventTrigger.Builder getEventTriggerBuilder()
A source that fires events in response to a condition in another service.
.google.cloud.functions.v1.EventTrigger event_trigger = 6;
Returns | |
---|---|
Type | Description |
EventTrigger.Builder |
getEventTriggerOrBuilder()
public EventTriggerOrBuilder getEventTriggerOrBuilder()
A source that fires events in response to a condition in another service.
.google.cloud.functions.v1.EventTrigger event_trigger = 6;
Returns | |
---|---|
Type | Description |
EventTriggerOrBuilder |
getHttpsTrigger()
public HttpsTrigger getHttpsTrigger()
An HTTPS endpoint type of source that can be triggered via URL.
.google.cloud.functions.v1.HttpsTrigger https_trigger = 5;
Returns | |
---|---|
Type | Description |
HttpsTrigger | The httpsTrigger. |
getHttpsTriggerBuilder()
public HttpsTrigger.Builder getHttpsTriggerBuilder()
An HTTPS endpoint type of source that can be triggered via URL.
.google.cloud.functions.v1.HttpsTrigger https_trigger = 5;
Returns | |
---|---|
Type | Description |
HttpsTrigger.Builder |
getHttpsTriggerOrBuilder()
public HttpsTriggerOrBuilder getHttpsTriggerOrBuilder()
An HTTPS endpoint type of source that can be triggered via URL.
.google.cloud.functions.v1.HttpsTrigger https_trigger = 5;
Returns | |
---|---|
Type | Description |
HttpsTriggerOrBuilder |
getIngressSettings()
public CloudFunction.IngressSettings getIngressSettings()
The ingress settings for the function, controlling what traffic can reach it.
.google.cloud.functions.v1.CloudFunction.IngressSettings ingress_settings = 24;
Returns | |
---|---|
Type | Description |
CloudFunction.IngressSettings | The ingressSettings. |
getIngressSettingsValue()
public int getIngressSettingsValue()
The ingress settings for the function, controlling what traffic can reach it.
.google.cloud.functions.v1.CloudFunction.IngressSettings ingress_settings = 24;
Returns | |
---|---|
Type | Description |
int | The enum numeric value on the wire for ingressSettings. |
getKmsKeyName()
public String getKmsKeyName()
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}
.
If specified, you must also provide an artifact registry repository using
the docker_repository
field that was created with the same KMS crypto
key.
The following service accounts need to be granted the role 'Cloud KMS CryptoKey Encrypter/Decrypter (roles/cloudkms.cryptoKeyEncrypterDecrypter)' on the Key/KeyRing/Project/Organization (least access preferred).
- Google Cloud Functions service account (service-{project_number}@gcf-admin-robot.iam.gserviceaccount.com) - Required to protect the function's image.
Google Storage service account (service-{project_number}@gs-project-accounts.iam.gserviceaccount.com) - Required to protect the function's source code. If this service account does not exist, deploying a function without a KMS key or retrieving the service agent name provisions it. For more information, see https://cloud.google.com/storage/docs/projects#service-agents and https://cloud.google.com/storage/docs/getting-service-agent#gsutil.
Google Cloud Functions delegates access to service agents to protect function resources in internal projects that are not accessible by the end user.
string kms_key_name = 25 [(.google.api.resource_reference) = { ... }
Returns | |
---|---|
Type | Description |
String | The kmsKeyName. |
getKmsKeyNameBytes()
public ByteString getKmsKeyNameBytes()
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}
.
If specified, you must also provide an artifact registry repository using
the docker_repository
field that was created with the same KMS crypto
key.
The following service accounts need to be granted the role 'Cloud KMS CryptoKey Encrypter/Decrypter (roles/cloudkms.cryptoKeyEncrypterDecrypter)' on the Key/KeyRing/Project/Organization (least access preferred).
- Google Cloud Functions service account (service-{project_number}@gcf-admin-robot.iam.gserviceaccount.com) - Required to protect the function's image.
Google Storage service account (service-{project_number}@gs-project-accounts.iam.gserviceaccount.com) - Required to protect the function's source code. If this service account does not exist, deploying a function without a KMS key or retrieving the service agent name provisions it. For more information, see https://cloud.google.com/storage/docs/projects#service-agents and https://cloud.google.com/storage/docs/getting-service-agent#gsutil.
Google Cloud Functions delegates access to service agents to protect function resources in internal projects that are not accessible by the end user.
string kms_key_name = 25 [(.google.api.resource_reference) = { ... }
Returns | |
---|---|
Type | Description |
ByteString | The bytes for kmsKeyName. |
getLabels()
public Map<String,String> getLabels()
Use #getLabelsMap() instead.
Returns | |
---|---|
Type | Description |
Map<String,String> |
getLabelsCount()
public int getLabelsCount()
Labels associated with this Cloud Function.
map<string, string> labels = 15;
Returns | |
---|---|
Type | Description |
int |
getLabelsMap()
public Map<String,String> getLabelsMap()
Labels associated with this Cloud Function.
map<string, string> labels = 15;
Returns | |
---|---|
Type | Description |
Map<String,String> |
getLabelsOrDefault(String key, String defaultValue)
public String getLabelsOrDefault(String key, String defaultValue)
Labels associated with this Cloud Function.
map<string, string> labels = 15;
Parameters | |
---|---|
Name | Description |
key | String |
defaultValue | String |
Returns | |
---|---|
Type | Description |
String |
getLabelsOrThrow(String key)
public String getLabelsOrThrow(String key)
Labels associated with this Cloud Function.
map<string, string> labels = 15;
Parameter | |
---|---|
Name | Description |
key | String |
Returns | |
---|---|
Type | Description |
String |
getMaxInstances()
public int getMaxInstances()
The limit on the maximum number of function instances that can coexist at a given time.
In some cases, such as rapid traffic surges, Cloud Functions can for a short period of time create more instances than the specified max instances limit. If your function cannot tolerate this temporary behavior, you might want to factor in a safety margin and set a lower max instances value than your function can tolerate.
See the Max Instances Guide for more details.
int32 max_instances = 20;
Returns | |
---|---|
Type | Description |
int | The maxInstances. |
getMinInstances()
public int getMinInstances()
A lower bound for the number function instances that can coexist at a given time.
int32 min_instances = 32;
Returns | |
---|---|
Type | Description |
int | The minInstances. |
getMutableBuildEnvironmentVariables()
public Map<String,String> getMutableBuildEnvironmentVariables()
Use alternate mutation accessors instead.
Returns | |
---|---|
Type | Description |
Map<String,String> |
getMutableEnvironmentVariables()
public Map<String,String> getMutableEnvironmentVariables()
Use alternate mutation accessors instead.
Returns | |
---|---|
Type | Description |
Map<String,String> |
getMutableLabels()
public Map<String,String> getMutableLabels()
Use alternate mutation accessors instead.
Returns | |
---|---|
Type | Description |
Map<String,String> |
getName()
public String getName()
A user-defined name of the function. Function names must be unique
globally and match pattern projects/*/locations/*/functions/*
string name = 1;
Returns | |
---|---|
Type | Description |
String | The name. |
getNameBytes()
public ByteString getNameBytes()
A user-defined name of the function. Function names must be unique
globally and match pattern projects/*/locations/*/functions/*
string name = 1;
Returns | |
---|---|
Type | Description |
ByteString | The bytes for name. |
getNetwork()
public String getNetwork()
The Serverless VPC Access connector that this cloud function can connect
to. It can be either the fully qualified URI, or the short name of the
connector resource. If the connector name is used, the connector must
belong to the same project as the function. Otherwise, it must belong to a
project within the same organization. The format of this field is either
projects/{project}/global/networks/{network}
or {network}
, where
{project}
is a project id where the network is defined, and {network}
is the short name of the network.
This field is mutually exclusive with vpc_connector
and will be replaced
by it.
See the VPC documentation for more information on connecting Cloud projects.
string network = 18;
Returns | |
---|---|
Type | Description |
String | The network. |
getNetworkBytes()
public ByteString getNetworkBytes()
The Serverless VPC Access connector that this cloud function can connect
to. It can be either the fully qualified URI, or the short name of the
connector resource. If the connector name is used, the connector must
belong to the same project as the function. Otherwise, it must belong to a
project within the same organization. The format of this field is either
projects/{project}/global/networks/{network}
or {network}
, where
{project}
is a project id where the network is defined, and {network}
is the short name of the network.
This field is mutually exclusive with vpc_connector
and will be replaced
by it.
See the VPC documentation for more information on connecting Cloud projects.
string network = 18;
Returns | |
---|---|
Type | Description |
ByteString | The bytes for network. |
getRuntime()
public String getRuntime()
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.
string runtime = 19;
Returns | |
---|---|
Type | Description |
String | The runtime. |
getRuntimeBytes()
public ByteString getRuntimeBytes()
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.
string runtime = 19;
Returns | |
---|---|
Type | Description |
ByteString | The bytes for runtime. |
getSecretEnvironmentVariables(int index)
public SecretEnvVar getSecretEnvironmentVariables(int index)
Secret environment variables configuration.
repeated .google.cloud.functions.v1.SecretEnvVar secret_environment_variables = 29;
Parameter | |
---|---|
Name | Description |
index | int |
Returns | |
---|---|
Type | Description |
SecretEnvVar |
getSecretEnvironmentVariablesBuilder(int index)
public SecretEnvVar.Builder getSecretEnvironmentVariablesBuilder(int index)
Secret environment variables configuration.
repeated .google.cloud.functions.v1.SecretEnvVar secret_environment_variables = 29;
Parameter | |
---|---|
Name | Description |
index | int |
Returns | |
---|---|
Type | Description |
SecretEnvVar.Builder |
getSecretEnvironmentVariablesBuilderList()
public List<SecretEnvVar.Builder> getSecretEnvironmentVariablesBuilderList()
Secret environment variables configuration.
repeated .google.cloud.functions.v1.SecretEnvVar secret_environment_variables = 29;
Returns | |
---|---|
Type | Description |
List<Builder> |
getSecretEnvironmentVariablesCount()
public int getSecretEnvironmentVariablesCount()
Secret environment variables configuration.
repeated .google.cloud.functions.v1.SecretEnvVar secret_environment_variables = 29;
Returns | |
---|---|
Type | Description |
int |
getSecretEnvironmentVariablesList()
public List<SecretEnvVar> getSecretEnvironmentVariablesList()
Secret environment variables configuration.
repeated .google.cloud.functions.v1.SecretEnvVar secret_environment_variables = 29;
Returns | |
---|---|
Type | Description |
List<SecretEnvVar> |
getSecretEnvironmentVariablesOrBuilder(int index)
public SecretEnvVarOrBuilder getSecretEnvironmentVariablesOrBuilder(int index)
Secret environment variables configuration.
repeated .google.cloud.functions.v1.SecretEnvVar secret_environment_variables = 29;
Parameter | |
---|---|
Name | Description |
index | int |
Returns | |
---|---|
Type | Description |
SecretEnvVarOrBuilder |
getSecretEnvironmentVariablesOrBuilderList()
public List<? extends SecretEnvVarOrBuilder> getSecretEnvironmentVariablesOrBuilderList()
Secret environment variables configuration.
repeated .google.cloud.functions.v1.SecretEnvVar secret_environment_variables = 29;
Returns | |
---|---|
Type | Description |
List<? extends com.google.cloud.functions.v1.SecretEnvVarOrBuilder> |
getSecretVolumes(int index)
public SecretVolume getSecretVolumes(int index)
Secret volumes configuration.
repeated .google.cloud.functions.v1.SecretVolume secret_volumes = 30;
Parameter | |
---|---|
Name | Description |
index | int |
Returns | |
---|---|
Type | Description |
SecretVolume |
getSecretVolumesBuilder(int index)
public SecretVolume.Builder getSecretVolumesBuilder(int index)
Secret volumes configuration.
repeated .google.cloud.functions.v1.SecretVolume secret_volumes = 30;
Parameter | |
---|---|
Name | Description |
index | int |
Returns | |
---|---|
Type | Description |
SecretVolume.Builder |
getSecretVolumesBuilderList()
public List<SecretVolume.Builder> getSecretVolumesBuilderList()
Secret volumes configuration.
repeated .google.cloud.functions.v1.SecretVolume secret_volumes = 30;
Returns | |
---|---|
Type | Description |
List<Builder> |
getSecretVolumesCount()
public int getSecretVolumesCount()
Secret volumes configuration.
repeated .google.cloud.functions.v1.SecretVolume secret_volumes = 30;
Returns | |
---|---|
Type | Description |
int |
getSecretVolumesList()
public List<SecretVolume> getSecretVolumesList()
Secret volumes configuration.
repeated .google.cloud.functions.v1.SecretVolume secret_volumes = 30;
Returns | |
---|---|
Type | Description |
List<SecretVolume> |
getSecretVolumesOrBuilder(int index)
public SecretVolumeOrBuilder getSecretVolumesOrBuilder(int index)
Secret volumes configuration.
repeated .google.cloud.functions.v1.SecretVolume secret_volumes = 30;
Parameter | |
---|---|
Name | Description |
index | int |
Returns | |
---|---|
Type | Description |
SecretVolumeOrBuilder |
getSecretVolumesOrBuilderList()
public List<? extends SecretVolumeOrBuilder> getSecretVolumesOrBuilderList()
Secret volumes configuration.
repeated .google.cloud.functions.v1.SecretVolume secret_volumes = 30;
Returns | |
---|---|
Type | Description |
List<? extends com.google.cloud.functions.v1.SecretVolumeOrBuilder> |
getServiceAccountEmail()
public String getServiceAccountEmail()
The email of the function's service account. If empty, defaults to
{project_id}@appspot.gserviceaccount.com
.
string service_account_email = 11;
Returns | |
---|---|
Type | Description |
String | The serviceAccountEmail. |
getServiceAccountEmailBytes()
public ByteString getServiceAccountEmailBytes()
The email of the function's service account. If empty, defaults to
{project_id}@appspot.gserviceaccount.com
.
string service_account_email = 11;
Returns | |
---|---|
Type | Description |
ByteString | The bytes for serviceAccountEmail. |
getSourceArchiveUrl()
public String getSourceArchiveUrl()
The Google Cloud Storage URL, starting with gs://
, pointing to the zip
archive which contains the function.
string source_archive_url = 3;
Returns | |
---|---|
Type | Description |
String | The sourceArchiveUrl. |
getSourceArchiveUrlBytes()
public ByteString getSourceArchiveUrlBytes()
The Google Cloud Storage URL, starting with gs://
, pointing to the zip
archive which contains the function.
string source_archive_url = 3;
Returns | |
---|---|
Type | Description |
ByteString | The bytes for sourceArchiveUrl. |
getSourceCodeCase()
public CloudFunction.SourceCodeCase getSourceCodeCase()
Returns | |
---|---|
Type | Description |
CloudFunction.SourceCodeCase |
getSourceRepository()
public SourceRepository getSourceRepository()
Beta Feature
The source repository where a function is hosted.
.google.cloud.functions.v1.SourceRepository source_repository = 4;
Returns | |
---|---|
Type | Description |
SourceRepository | The sourceRepository. |
getSourceRepositoryBuilder()
public SourceRepository.Builder getSourceRepositoryBuilder()
Beta Feature
The source repository where a function is hosted.
.google.cloud.functions.v1.SourceRepository source_repository = 4;
Returns | |
---|---|
Type | Description |
SourceRepository.Builder |
getSourceRepositoryOrBuilder()
public SourceRepositoryOrBuilder getSourceRepositoryOrBuilder()
Beta Feature
The source repository where a function is hosted.
.google.cloud.functions.v1.SourceRepository source_repository = 4;
Returns | |
---|---|
Type | Description |
SourceRepositoryOrBuilder |
getSourceToken()
public String getSourceToken()
Input only. An identifier for Firebase function sources. Disclaimer: This field is only supported for Firebase function deployments.
string source_token = 31 [(.google.api.field_behavior) = INPUT_ONLY];
Returns | |
---|---|
Type | Description |
String | The sourceToken. |
getSourceTokenBytes()
public ByteString getSourceTokenBytes()
Input only. An identifier for Firebase function sources. Disclaimer: This field is only supported for Firebase function deployments.
string source_token = 31 [(.google.api.field_behavior) = INPUT_ONLY];
Returns | |
---|---|
Type | Description |
ByteString | The bytes for sourceToken. |
getSourceUploadUrl()
public String getSourceUploadUrl()
The Google Cloud Storage-signed URL used for source uploading, generated by calling [google.cloud.functions.v1.GenerateUploadUrl].
The signature is validated on write methods (Create, Update) The signature is stripped from the Function object on read methods (Get, List)
string source_upload_url = 16;
Returns | |
---|---|
Type | Description |
String | The sourceUploadUrl. |
getSourceUploadUrlBytes()
public ByteString getSourceUploadUrlBytes()
The Google Cloud Storage-signed URL used for source uploading, generated by calling [google.cloud.functions.v1.GenerateUploadUrl].
The signature is validated on write methods (Create, Update) The signature is stripped from the Function object on read methods (Get, List)
string source_upload_url = 16;
Returns | |
---|---|
Type | Description |
ByteString | The bytes for sourceUploadUrl. |
getStatus()
public CloudFunctionStatus getStatus()
Output only. Status of the function deployment.
.google.cloud.functions.v1.CloudFunctionStatus status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
CloudFunctionStatus | The status. |
getStatusValue()
public int getStatusValue()
Output only. Status of the function deployment.
.google.cloud.functions.v1.CloudFunctionStatus status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
int | The enum numeric value on the wire for status. |
getTimeout()
public Duration getTimeout()
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.
.google.protobuf.Duration timeout = 9;
Returns | |
---|---|
Type | Description |
Duration | The timeout. |
getTimeoutBuilder()
public Duration.Builder getTimeoutBuilder()
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.
.google.protobuf.Duration timeout = 9;
Returns | |
---|---|
Type | Description |
Builder |
getTimeoutOrBuilder()
public DurationOrBuilder getTimeoutOrBuilder()
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.
.google.protobuf.Duration timeout = 9;
Returns | |
---|---|
Type | Description |
DurationOrBuilder |
getTriggerCase()
public CloudFunction.TriggerCase getTriggerCase()
Returns | |
---|---|
Type | Description |
CloudFunction.TriggerCase |
getUpdateTime()
public Timestamp getUpdateTime()
Output only. The last update timestamp of a Cloud Function.
.google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
Timestamp | The updateTime. |
getUpdateTimeBuilder()
public Timestamp.Builder getUpdateTimeBuilder()
Output only. The last update timestamp of a Cloud Function.
.google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
Builder |
getUpdateTimeOrBuilder()
public TimestampOrBuilder getUpdateTimeOrBuilder()
Output only. The last update timestamp of a Cloud Function.
.google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
TimestampOrBuilder |
getVersionId()
public long getVersionId()
Output only. The version identifier of the Cloud Function. Each deployment attempt results in a new version of a function being created.
int64 version_id = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
long | The versionId. |
getVpcConnector()
public String getVpcConnector()
The VPC Network Connector that this cloud function can connect to. It can
be either the fully qualified URI, or the short name of the network
connector resource. The format of this field is
projects/*/locations/*/connectors/*
This field is mutually exclusive with network
field and will eventually
replace it.
See the VPC documentation for more information on connecting Cloud projects.
string vpc_connector = 22;
Returns | |
---|---|
Type | Description |
String | The vpcConnector. |
getVpcConnectorBytes()
public ByteString getVpcConnectorBytes()
The VPC Network Connector that this cloud function can connect to. It can
be either the fully qualified URI, or the short name of the network
connector resource. The format of this field is
projects/*/locations/*/connectors/*
This field is mutually exclusive with network
field and will eventually
replace it.
See the VPC documentation for more information on connecting Cloud projects.
string vpc_connector = 22;
Returns | |
---|---|
Type | Description |
ByteString | The bytes for vpcConnector. |
getVpcConnectorEgressSettings()
public CloudFunction.VpcConnectorEgressSettings getVpcConnectorEgressSettings()
The egress settings for the connector, controlling what traffic is diverted through it.
.google.cloud.functions.v1.CloudFunction.VpcConnectorEgressSettings vpc_connector_egress_settings = 23;
Returns | |
---|---|
Type | Description |
CloudFunction.VpcConnectorEgressSettings | The vpcConnectorEgressSettings. |
getVpcConnectorEgressSettingsValue()
public int getVpcConnectorEgressSettingsValue()
The egress settings for the connector, controlling what traffic is diverted through it.
.google.cloud.functions.v1.CloudFunction.VpcConnectorEgressSettings vpc_connector_egress_settings = 23;
Returns | |
---|---|
Type | Description |
int | The enum numeric value on the wire for vpcConnectorEgressSettings. |
hasEventTrigger()
public boolean hasEventTrigger()
A source that fires events in response to a condition in another service.
.google.cloud.functions.v1.EventTrigger event_trigger = 6;
Returns | |
---|---|
Type | Description |
boolean | Whether the eventTrigger field is set. |
hasHttpsTrigger()
public boolean hasHttpsTrigger()
An HTTPS endpoint type of source that can be triggered via URL.
.google.cloud.functions.v1.HttpsTrigger https_trigger = 5;
Returns | |
---|---|
Type | Description |
boolean | Whether the httpsTrigger field is set. |
hasSourceArchiveUrl()
public boolean hasSourceArchiveUrl()
The Google Cloud Storage URL, starting with gs://
, pointing to the zip
archive which contains the function.
string source_archive_url = 3;
Returns | |
---|---|
Type | Description |
boolean | Whether the sourceArchiveUrl field is set. |
hasSourceRepository()
public boolean hasSourceRepository()
Beta Feature
The source repository where a function is hosted.
.google.cloud.functions.v1.SourceRepository source_repository = 4;
Returns | |
---|---|
Type | Description |
boolean | Whether the sourceRepository field is set. |
hasSourceUploadUrl()
public boolean hasSourceUploadUrl()
The Google Cloud Storage-signed URL used for source uploading, generated by calling [google.cloud.functions.v1.GenerateUploadUrl].
The signature is validated on write methods (Create, Update) The signature is stripped from the Function object on read methods (Get, List)
string source_upload_url = 16;
Returns | |
---|---|
Type | Description |
boolean | Whether the sourceUploadUrl field is set. |
hasTimeout()
public boolean hasTimeout()
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.
.google.protobuf.Duration timeout = 9;
Returns | |
---|---|
Type | Description |
boolean | Whether the timeout field is set. |
hasUpdateTime()
public boolean hasUpdateTime()
Output only. The last update timestamp of a Cloud Function.
.google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns | |
---|---|
Type | Description |
boolean | Whether the updateTime field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns | |
---|---|
Type | Description |
FieldAccessorTable |
internalGetMapField(int number)
protected MapField internalGetMapField(int number)
Parameter | |
---|---|
Name | Description |
number | int |
Returns | |
---|---|
Type | Description |
MapField |
internalGetMutableMapField(int number)
protected MapField internalGetMutableMapField(int number)
Parameter | |
---|---|
Name | Description |
number | int |
Returns | |
---|---|
Type | Description |
MapField |
isInitialized()
public final boolean isInitialized()
Returns | |
---|---|
Type | Description |
boolean |
mergeEventTrigger(EventTrigger value)
public CloudFunction.Builder mergeEventTrigger(EventTrigger value)
A source that fires events in response to a condition in another service.
.google.cloud.functions.v1.EventTrigger event_trigger = 6;
Parameter | |
---|---|
Name | Description |
value | EventTrigger |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder |
mergeFrom(CloudFunction other)
public CloudFunction.Builder mergeFrom(CloudFunction other)
Parameter | |
---|---|
Name | Description |
other | CloudFunction |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public CloudFunction.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
input | CodedInputStream |
extensionRegistry | ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder |
Exceptions | |
---|---|
Type | Description |
IOException |
mergeFrom(Message other)
public CloudFunction.Builder mergeFrom(Message other)
Parameter | |
---|---|
Name | Description |
other | Message |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder |
mergeHttpsTrigger(HttpsTrigger value)
public CloudFunction.Builder mergeHttpsTrigger(HttpsTrigger value)
An HTTPS endpoint type of source that can be triggered via URL.
.google.cloud.functions.v1.HttpsTrigger https_trigger = 5;
Parameter | |
---|---|
Name | Description |
value | HttpsTrigger |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder |
mergeSourceRepository(SourceRepository value)
public CloudFunction.Builder mergeSourceRepository(SourceRepository value)
Beta Feature
The source repository where a function is hosted.
.google.cloud.functions.v1.SourceRepository source_repository = 4;
Parameter | |
---|---|
Name | Description |
value | SourceRepository |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder |
mergeTimeout(Duration value)
public CloudFunction.Builder mergeTimeout(Duration value)
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.
.google.protobuf.Duration timeout = 9;
Parameter | |
---|---|
Name | Description |
value | Duration |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final CloudFunction.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter | |
---|---|
Name | Description |
unknownFields | UnknownFieldSet |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder |
mergeUpdateTime(Timestamp value)
public CloudFunction.Builder mergeUpdateTime(Timestamp value)
Output only. The last update timestamp of a Cloud Function.
.google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter | |
---|---|
Name | Description |
value | Timestamp |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder |
putAllBuildEnvironmentVariables(Map<String,String> values)
public CloudFunction.Builder putAllBuildEnvironmentVariables(Map<String,String> values)
Build environment variables that shall be available during build time.
map<string, string> build_environment_variables = 28;
Parameter | |
---|---|
Name | Description |
values | Map<String,String> |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder |
putAllEnvironmentVariables(Map<String,String> values)
public CloudFunction.Builder putAllEnvironmentVariables(Map<String,String> values)
Environment variables that shall be available during function execution.
map<string, string> environment_variables = 17;
Parameter | |
---|---|
Name | Description |
values | Map<String,String> |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder |
putAllLabels(Map<String,String> values)
public CloudFunction.Builder putAllLabels(Map<String,String> values)
Labels associated with this Cloud Function.
map<string, string> labels = 15;
Parameter | |
---|---|
Name | Description |
values | Map<String,String> |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder |
putBuildEnvironmentVariables(String key, String value)
public CloudFunction.Builder putBuildEnvironmentVariables(String key, String value)
Build environment variables that shall be available during build time.
map<string, string> build_environment_variables = 28;
Parameters | |
---|---|
Name | Description |
key | String |
value | String |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder |
putEnvironmentVariables(String key, String value)
public CloudFunction.Builder putEnvironmentVariables(String key, String value)
Environment variables that shall be available during function execution.
map<string, string> environment_variables = 17;
Parameters | |
---|---|
Name | Description |
key | String |
value | String |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder |
putLabels(String key, String value)
public CloudFunction.Builder putLabels(String key, String value)
Labels associated with this Cloud Function.
map<string, string> labels = 15;
Parameters | |
---|---|
Name | Description |
key | String |
value | String |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder |
removeBuildEnvironmentVariables(String key)
public CloudFunction.Builder removeBuildEnvironmentVariables(String key)
Build environment variables that shall be available during build time.
map<string, string> build_environment_variables = 28;
Parameter | |
---|---|
Name | Description |
key | String |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder |
removeEnvironmentVariables(String key)
public CloudFunction.Builder removeEnvironmentVariables(String key)
Environment variables that shall be available during function execution.
map<string, string> environment_variables = 17;
Parameter | |
---|---|
Name | Description |
key | String |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder |
removeLabels(String key)
public CloudFunction.Builder removeLabels(String key)
Labels associated with this Cloud Function.
map<string, string> labels = 15;
Parameter | |
---|---|
Name | Description |
key | String |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder |
removeSecretEnvironmentVariables(int index)
public CloudFunction.Builder removeSecretEnvironmentVariables(int index)
Secret environment variables configuration.
repeated .google.cloud.functions.v1.SecretEnvVar secret_environment_variables = 29;
Parameter | |
---|---|
Name | Description |
index | int |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder |
removeSecretVolumes(int index)
public CloudFunction.Builder removeSecretVolumes(int index)
Secret volumes configuration.
repeated .google.cloud.functions.v1.SecretVolume secret_volumes = 30;
Parameter | |
---|---|
Name | Description |
index | int |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder |
setAvailableMemoryMb(int value)
public CloudFunction.Builder setAvailableMemoryMb(int value)
The amount of memory in MB available for a function. Defaults to 256MB.
int32 available_memory_mb = 10;
Parameter | |
---|---|
Name | Description |
value | int The availableMemoryMb to set. |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
setBuildId(String value)
public CloudFunction.Builder setBuildId(String value)
Output only. The Cloud Build ID of the latest successful deployment of the function.
string build_id = 27 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter | |
---|---|
Name | Description |
value | String The buildId to set. |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
setBuildIdBytes(ByteString value)
public CloudFunction.Builder setBuildIdBytes(ByteString value)
Output only. The Cloud Build ID of the latest successful deployment of the function.
string build_id = 27 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter | |
---|---|
Name | Description |
value | ByteString The bytes for buildId to set. |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
setBuildName(String value)
public CloudFunction.Builder setBuildName(String value)
Output only. The Cloud Build Name of the function deployment.
projects/<project-number>/locations/<region>/builds/<build-id>
.
string build_name = 33 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter | |
---|---|
Name | Description |
value | String The buildName to set. |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
setBuildNameBytes(ByteString value)
public CloudFunction.Builder setBuildNameBytes(ByteString value)
Output only. The Cloud Build Name of the function deployment.
projects/<project-number>/locations/<region>/builds/<build-id>
.
string build_name = 33 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter | |
---|---|
Name | Description |
value | ByteString The bytes for buildName to set. |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
setBuildWorkerPool(String value)
public CloudFunction.Builder setBuildWorkerPool(String value)
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-<project_number>@gcf-admin-robot.iam.gserviceaccount.com
) must
be granted the role Cloud Build Custom Workers Builder
(roles/cloudbuild.customworkers.builder
) in the project.
string build_worker_pool = 26;
Parameter | |
---|---|
Name | Description |
value | String The buildWorkerPool to set. |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
setBuildWorkerPoolBytes(ByteString value)
public CloudFunction.Builder setBuildWorkerPoolBytes(ByteString value)
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-<project_number>@gcf-admin-robot.iam.gserviceaccount.com
) must
be granted the role Cloud Build Custom Workers Builder
(roles/cloudbuild.customworkers.builder
) in the project.
string build_worker_pool = 26;
Parameter | |
---|---|
Name | Description |
value | ByteString The bytes for buildWorkerPool to set. |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
setDescription(String value)
public CloudFunction.Builder setDescription(String value)
User-provided description of a function.
string description = 2;
Parameter | |
---|---|
Name | Description |
value | String The description to set. |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
setDescriptionBytes(ByteString value)
public CloudFunction.Builder setDescriptionBytes(ByteString value)
User-provided description of a function.
string description = 2;
Parameter | |
---|---|
Name | Description |
value | ByteString The bytes for description to set. |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
setDockerRegistry(CloudFunction.DockerRegistry value)
public CloudFunction.Builder setDockerRegistry(CloudFunction.DockerRegistry value)
Docker Registry to use for this deployment.
If docker_repository
field is specified, this field is automatically
set as ARTIFACT_REGISTRY
.
If unspecified, it currently defaults to CONTAINER_REGISTRY
.
This field may be overridden by the backend for eligible deployments.
.google.cloud.functions.v1.CloudFunction.DockerRegistry docker_registry = 35;
Parameter | |
---|---|
Name | Description |
value | CloudFunction.DockerRegistry The dockerRegistry to set. |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
setDockerRegistryValue(int value)
public CloudFunction.Builder setDockerRegistryValue(int value)
Docker Registry to use for this deployment.
If docker_repository
field is specified, this field is automatically
set as ARTIFACT_REGISTRY
.
If unspecified, it currently defaults to CONTAINER_REGISTRY
.
This field may be overridden by the backend for eligible deployments.
.google.cloud.functions.v1.CloudFunction.DockerRegistry docker_registry = 35;
Parameter | |
---|---|
Name | Description |
value | int The enum numeric value on the wire for dockerRegistry to set. |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
setDockerRepository(String value)
public CloudFunction.Builder setDockerRepository(String value)
User managed repository created in Artifact Registry optionally with a customer managed encryption key. If specified, deployments will use Artifact Registry. If unspecified and the deployment is eligible to use Artifact Registry, GCF will create and use a repository named 'gcf-artifacts' for every deployed region. This is the repository to which the function docker image is pushed after it is built by Cloud Build.
It must match the pattern
projects/{project}/locations/{location}/repositories/{repository}
.
Cross-project repositories are not supported. Cross-location repositories are not supported. Repository format must be 'DOCKER'.
string docker_repository = 34 [(.google.api.resource_reference) = { ... }
Parameter | |
---|---|
Name | Description |
value | String The dockerRepository to set. |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
setDockerRepositoryBytes(ByteString value)
public CloudFunction.Builder setDockerRepositoryBytes(ByteString value)
User managed repository created in Artifact Registry optionally with a customer managed encryption key. If specified, deployments will use Artifact Registry. If unspecified and the deployment is eligible to use Artifact Registry, GCF will create and use a repository named 'gcf-artifacts' for every deployed region. This is the repository to which the function docker image is pushed after it is built by Cloud Build.
It must match the pattern
projects/{project}/locations/{location}/repositories/{repository}
.
Cross-project repositories are not supported. Cross-location repositories are not supported. Repository format must be 'DOCKER'.
string docker_repository = 34 [(.google.api.resource_reference) = { ... }
Parameter | |
---|---|
Name | Description |
value | ByteString The bytes for dockerRepository to set. |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
setEntryPoint(String value)
public CloudFunction.Builder setEntryPoint(String value)
The name of the function (as defined in source code) that is executed.
Defaults to the resource name suffix, if not specified. For
backward compatibility, if function with given name is not found, the
system tries to use the function named "function".
For Node.js, this is the name of a function exported by the module
as specified in source_location
.
string entry_point = 8;
Parameter | |
---|---|
Name | Description |
value | String The entryPoint to set. |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
setEntryPointBytes(ByteString value)
public CloudFunction.Builder setEntryPointBytes(ByteString value)
The name of the function (as defined in source code) that is executed.
Defaults to the resource name suffix, if not specified. For
backward compatibility, if function with given name is not found, the
system tries to use the function named "function".
For Node.js, this is the name of a function exported by the module
as specified in source_location
.
string entry_point = 8;
Parameter | |
---|---|
Name | Description |
value | ByteString The bytes for entryPoint to set. |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
setEventTrigger(EventTrigger value)
public CloudFunction.Builder setEventTrigger(EventTrigger value)
A source that fires events in response to a condition in another service.
.google.cloud.functions.v1.EventTrigger event_trigger = 6;
Parameter | |
---|---|
Name | Description |
value | EventTrigger |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder |
setEventTrigger(EventTrigger.Builder builderForValue)
public CloudFunction.Builder setEventTrigger(EventTrigger.Builder builderForValue)
A source that fires events in response to a condition in another service.
.google.cloud.functions.v1.EventTrigger event_trigger = 6;
Parameter | |
---|---|
Name | Description |
builderForValue | EventTrigger.Builder |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder |
setHttpsTrigger(HttpsTrigger value)
public CloudFunction.Builder setHttpsTrigger(HttpsTrigger value)
An HTTPS endpoint type of source that can be triggered via URL.
.google.cloud.functions.v1.HttpsTrigger https_trigger = 5;
Parameter | |
---|---|
Name | Description |
value | HttpsTrigger |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder |
setHttpsTrigger(HttpsTrigger.Builder builderForValue)
public CloudFunction.Builder setHttpsTrigger(HttpsTrigger.Builder builderForValue)
An HTTPS endpoint type of source that can be triggered via URL.
.google.cloud.functions.v1.HttpsTrigger https_trigger = 5;
Parameter | |
---|---|
Name | Description |
builderForValue | HttpsTrigger.Builder |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder |
setIngressSettings(CloudFunction.IngressSettings value)
public CloudFunction.Builder setIngressSettings(CloudFunction.IngressSettings value)
The ingress settings for the function, controlling what traffic can reach it.
.google.cloud.functions.v1.CloudFunction.IngressSettings ingress_settings = 24;
Parameter | |
---|---|
Name | Description |
value | CloudFunction.IngressSettings The ingressSettings to set. |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
setIngressSettingsValue(int value)
public CloudFunction.Builder setIngressSettingsValue(int value)
The ingress settings for the function, controlling what traffic can reach it.
.google.cloud.functions.v1.CloudFunction.IngressSettings ingress_settings = 24;
Parameter | |
---|---|
Name | Description |
value | int The enum numeric value on the wire for ingressSettings to set. |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
setKmsKeyName(String value)
public CloudFunction.Builder setKmsKeyName(String value)
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}
.
If specified, you must also provide an artifact registry repository using
the docker_repository
field that was created with the same KMS crypto
key.
The following service accounts need to be granted the role 'Cloud KMS CryptoKey Encrypter/Decrypter (roles/cloudkms.cryptoKeyEncrypterDecrypter)' on the Key/KeyRing/Project/Organization (least access preferred).
- Google Cloud Functions service account (service-{project_number}@gcf-admin-robot.iam.gserviceaccount.com) - Required to protect the function's image.
Google Storage service account (service-{project_number}@gs-project-accounts.iam.gserviceaccount.com) - Required to protect the function's source code. If this service account does not exist, deploying a function without a KMS key or retrieving the service agent name provisions it. For more information, see https://cloud.google.com/storage/docs/projects#service-agents and https://cloud.google.com/storage/docs/getting-service-agent#gsutil.
Google Cloud Functions delegates access to service agents to protect function resources in internal projects that are not accessible by the end user.
string kms_key_name = 25 [(.google.api.resource_reference) = { ... }
Parameter | |
---|---|
Name | Description |
value | String The kmsKeyName to set. |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
setKmsKeyNameBytes(ByteString value)
public CloudFunction.Builder setKmsKeyNameBytes(ByteString value)
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}
.
If specified, you must also provide an artifact registry repository using
the docker_repository
field that was created with the same KMS crypto
key.
The following service accounts need to be granted the role 'Cloud KMS CryptoKey Encrypter/Decrypter (roles/cloudkms.cryptoKeyEncrypterDecrypter)' on the Key/KeyRing/Project/Organization (least access preferred).
- Google Cloud Functions service account (service-{project_number}@gcf-admin-robot.iam.gserviceaccount.com) - Required to protect the function's image.
Google Storage service account (service-{project_number}@gs-project-accounts.iam.gserviceaccount.com) - Required to protect the function's source code. If this service account does not exist, deploying a function without a KMS key or retrieving the service agent name provisions it. For more information, see https://cloud.google.com/storage/docs/projects#service-agents and https://cloud.google.com/storage/docs/getting-service-agent#gsutil.
Google Cloud Functions delegates access to service agents to protect function resources in internal projects that are not accessible by the end user.
string kms_key_name = 25 [(.google.api.resource_reference) = { ... }
Parameter | |
---|---|
Name | Description |
value | ByteString The bytes for kmsKeyName to set. |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
setMaxInstances(int value)
public CloudFunction.Builder setMaxInstances(int value)
The limit on the maximum number of function instances that can coexist at a given time.
In some cases, such as rapid traffic surges, Cloud Functions can for a short period of time create more instances than the specified max instances limit. If your function cannot tolerate this temporary behavior, you might want to factor in a safety margin and set a lower max instances value than your function can tolerate.
See the Max Instances Guide for more details.
int32 max_instances = 20;
Parameter | |
---|---|
Name | Description |
value | int The maxInstances to set. |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
setMinInstances(int value)
public CloudFunction.Builder setMinInstances(int value)
A lower bound for the number function instances that can coexist at a given time.
int32 min_instances = 32;
Parameter | |
---|---|
Name | Description |
value | int The minInstances to set. |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
setName(String value)
public CloudFunction.Builder setName(String value)
A user-defined name of the function. Function names must be unique
globally and match pattern projects/*/locations/*/functions/*
string name = 1;
Parameter | |
---|---|
Name | Description |
value | String The name to set. |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
setNameBytes(ByteString value)
public CloudFunction.Builder setNameBytes(ByteString value)
A user-defined name of the function. Function names must be unique
globally and match pattern projects/*/locations/*/functions/*
string name = 1;
Parameter | |
---|---|
Name | Description |
value | ByteString The bytes for name to set. |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
setNetwork(String value)
public CloudFunction.Builder setNetwork(String value)
The Serverless VPC Access connector that this cloud function can connect
to. It can be either the fully qualified URI, or the short name of the
connector resource. If the connector name is used, the connector must
belong to the same project as the function. Otherwise, it must belong to a
project within the same organization. The format of this field is either
projects/{project}/global/networks/{network}
or {network}
, where
{project}
is a project id where the network is defined, and {network}
is the short name of the network.
This field is mutually exclusive with vpc_connector
and will be replaced
by it.
See the VPC documentation for more information on connecting Cloud projects.
string network = 18;
Parameter | |
---|---|
Name | Description |
value | String The network to set. |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
setNetworkBytes(ByteString value)
public CloudFunction.Builder setNetworkBytes(ByteString value)
The Serverless VPC Access connector that this cloud function can connect
to. It can be either the fully qualified URI, or the short name of the
connector resource. If the connector name is used, the connector must
belong to the same project as the function. Otherwise, it must belong to a
project within the same organization. The format of this field is either
projects/{project}/global/networks/{network}
or {network}
, where
{project}
is a project id where the network is defined, and {network}
is the short name of the network.
This field is mutually exclusive with vpc_connector
and will be replaced
by it.
See the VPC documentation for more information on connecting Cloud projects.
string network = 18;
Parameter | |
---|---|
Name | Description |
value | ByteString The bytes for network to set. |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
setRuntime(String value)
public CloudFunction.Builder setRuntime(String value)
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.
string runtime = 19;
Parameter | |
---|---|
Name | Description |
value | String The runtime to set. |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
setRuntimeBytes(ByteString value)
public CloudFunction.Builder setRuntimeBytes(ByteString value)
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.
string runtime = 19;
Parameter | |
---|---|
Name | Description |
value | ByteString The bytes for runtime to set. |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
setSecretEnvironmentVariables(int index, SecretEnvVar value)
public CloudFunction.Builder setSecretEnvironmentVariables(int index, SecretEnvVar value)
Secret environment variables configuration.
repeated .google.cloud.functions.v1.SecretEnvVar secret_environment_variables = 29;
Parameters | |
---|---|
Name | Description |
index | int |
value | SecretEnvVar |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder |
setSecretEnvironmentVariables(int index, SecretEnvVar.Builder builderForValue)
public CloudFunction.Builder setSecretEnvironmentVariables(int index, SecretEnvVar.Builder builderForValue)
Secret environment variables configuration.
repeated .google.cloud.functions.v1.SecretEnvVar secret_environment_variables = 29;
Parameters | |
---|---|
Name | Description |
index | int |
builderForValue | SecretEnvVar.Builder |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder |
setSecretVolumes(int index, SecretVolume value)
public CloudFunction.Builder setSecretVolumes(int index, SecretVolume value)
Secret volumes configuration.
repeated .google.cloud.functions.v1.SecretVolume secret_volumes = 30;
Parameters | |
---|---|
Name | Description |
index | int |
value | SecretVolume |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder |
setSecretVolumes(int index, SecretVolume.Builder builderForValue)
public CloudFunction.Builder setSecretVolumes(int index, SecretVolume.Builder builderForValue)
Secret volumes configuration.
repeated .google.cloud.functions.v1.SecretVolume secret_volumes = 30;
Parameters | |
---|---|
Name | Description |
index | int |
builderForValue | SecretVolume.Builder |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder |
setServiceAccountEmail(String value)
public CloudFunction.Builder setServiceAccountEmail(String value)
The email of the function's service account. If empty, defaults to
{project_id}@appspot.gserviceaccount.com
.
string service_account_email = 11;
Parameter | |
---|---|
Name | Description |
value | String The serviceAccountEmail to set. |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
setServiceAccountEmailBytes(ByteString value)
public CloudFunction.Builder setServiceAccountEmailBytes(ByteString value)
The email of the function's service account. If empty, defaults to
{project_id}@appspot.gserviceaccount.com
.
string service_account_email = 11;
Parameter | |
---|---|
Name | Description |
value | ByteString The bytes for serviceAccountEmail to set. |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
setSourceArchiveUrl(String value)
public CloudFunction.Builder setSourceArchiveUrl(String value)
The Google Cloud Storage URL, starting with gs://
, pointing to the zip
archive which contains the function.
string source_archive_url = 3;
Parameter | |
---|---|
Name | Description |
value | String The sourceArchiveUrl to set. |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
setSourceArchiveUrlBytes(ByteString value)
public CloudFunction.Builder setSourceArchiveUrlBytes(ByteString value)
The Google Cloud Storage URL, starting with gs://
, pointing to the zip
archive which contains the function.
string source_archive_url = 3;
Parameter | |
---|---|
Name | Description |
value | ByteString The bytes for sourceArchiveUrl to set. |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
setSourceRepository(SourceRepository value)
public CloudFunction.Builder setSourceRepository(SourceRepository value)
Beta Feature
The source repository where a function is hosted.
.google.cloud.functions.v1.SourceRepository source_repository = 4;
Parameter | |
---|---|
Name | Description |
value | SourceRepository |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder |
setSourceRepository(SourceRepository.Builder builderForValue)
public CloudFunction.Builder setSourceRepository(SourceRepository.Builder builderForValue)
Beta Feature
The source repository where a function is hosted.
.google.cloud.functions.v1.SourceRepository source_repository = 4;
Parameter | |
---|---|
Name | Description |
builderForValue | SourceRepository.Builder |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder |
setSourceToken(String value)
public CloudFunction.Builder setSourceToken(String value)
Input only. An identifier for Firebase function sources. Disclaimer: This field is only supported for Firebase function deployments.
string source_token = 31 [(.google.api.field_behavior) = INPUT_ONLY];
Parameter | |
---|---|
Name | Description |
value | String The sourceToken to set. |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
setSourceTokenBytes(ByteString value)
public CloudFunction.Builder setSourceTokenBytes(ByteString value)
Input only. An identifier for Firebase function sources. Disclaimer: This field is only supported for Firebase function deployments.
string source_token = 31 [(.google.api.field_behavior) = INPUT_ONLY];
Parameter | |
---|---|
Name | Description |
value | ByteString The bytes for sourceToken to set. |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
setSourceUploadUrl(String value)
public CloudFunction.Builder setSourceUploadUrl(String value)
The Google Cloud Storage-signed URL used for source uploading, generated by calling [google.cloud.functions.v1.GenerateUploadUrl].
The signature is validated on write methods (Create, Update) The signature is stripped from the Function object on read methods (Get, List)
string source_upload_url = 16;
Parameter | |
---|---|
Name | Description |
value | String The sourceUploadUrl to set. |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
setSourceUploadUrlBytes(ByteString value)
public CloudFunction.Builder setSourceUploadUrlBytes(ByteString value)
The Google Cloud Storage-signed URL used for source uploading, generated by calling [google.cloud.functions.v1.GenerateUploadUrl].
The signature is validated on write methods (Create, Update) The signature is stripped from the Function object on read methods (Get, List)
string source_upload_url = 16;
Parameter | |
---|---|
Name | Description |
value | ByteString The bytes for sourceUploadUrl to set. |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
setStatus(CloudFunctionStatus value)
public CloudFunction.Builder setStatus(CloudFunctionStatus value)
Output only. Status of the function deployment.
.google.cloud.functions.v1.CloudFunctionStatus status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter | |
---|---|
Name | Description |
value | CloudFunctionStatus The status to set. |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
setStatusValue(int value)
public CloudFunction.Builder setStatusValue(int value)
Output only. Status of the function deployment.
.google.cloud.functions.v1.CloudFunctionStatus status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter | |
---|---|
Name | Description |
value | int The enum numeric value on the wire for status to set. |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
setTimeout(Duration value)
public CloudFunction.Builder setTimeout(Duration value)
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.
.google.protobuf.Duration timeout = 9;
Parameter | |
---|---|
Name | Description |
value | Duration |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder |
setTimeout(Duration.Builder builderForValue)
public CloudFunction.Builder setTimeout(Duration.Builder builderForValue)
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.
.google.protobuf.Duration timeout = 9;
Parameter | |
---|---|
Name | Description |
builderForValue | Builder |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder |
setUnknownFields(UnknownFieldSet unknownFields)
public final CloudFunction.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter | |
---|---|
Name | Description |
unknownFields | UnknownFieldSet |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder |
setUpdateTime(Timestamp value)
public CloudFunction.Builder setUpdateTime(Timestamp value)
Output only. The last update timestamp of a Cloud Function.
.google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter | |
---|---|
Name | Description |
value | Timestamp |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder |
setUpdateTime(Timestamp.Builder builderForValue)
public CloudFunction.Builder setUpdateTime(Timestamp.Builder builderForValue)
Output only. The last update timestamp of a Cloud Function.
.google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter | |
---|---|
Name | Description |
builderForValue | Builder |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder |
setVersionId(long value)
public CloudFunction.Builder setVersionId(long value)
Output only. The version identifier of the Cloud Function. Each deployment attempt results in a new version of a function being created.
int64 version_id = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter | |
---|---|
Name | Description |
value | long The versionId to set. |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
setVpcConnector(String value)
public CloudFunction.Builder setVpcConnector(String value)
The VPC Network Connector that this cloud function can connect to. It can
be either the fully qualified URI, or the short name of the network
connector resource. The format of this field is
projects/*/locations/*/connectors/*
This field is mutually exclusive with network
field and will eventually
replace it.
See the VPC documentation for more information on connecting Cloud projects.
string vpc_connector = 22;
Parameter | |
---|---|
Name | Description |
value | String The vpcConnector to set. |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
setVpcConnectorBytes(ByteString value)
public CloudFunction.Builder setVpcConnectorBytes(ByteString value)
The VPC Network Connector that this cloud function can connect to. It can
be either the fully qualified URI, or the short name of the network
connector resource. The format of this field is
projects/*/locations/*/connectors/*
This field is mutually exclusive with network
field and will eventually
replace it.
See the VPC documentation for more information on connecting Cloud projects.
string vpc_connector = 22;
Parameter | |
---|---|
Name | Description |
value | ByteString The bytes for vpcConnector to set. |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
setVpcConnectorEgressSettings(CloudFunction.VpcConnectorEgressSettings value)
public CloudFunction.Builder setVpcConnectorEgressSettings(CloudFunction.VpcConnectorEgressSettings value)
The egress settings for the connector, controlling what traffic is diverted through it.
.google.cloud.functions.v1.CloudFunction.VpcConnectorEgressSettings vpc_connector_egress_settings = 23;
Parameter | |
---|---|
Name | Description |
value | CloudFunction.VpcConnectorEgressSettings The vpcConnectorEgressSettings to set. |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |
setVpcConnectorEgressSettingsValue(int value)
public CloudFunction.Builder setVpcConnectorEgressSettingsValue(int value)
The egress settings for the connector, controlling what traffic is diverted through it.
.google.cloud.functions.v1.CloudFunction.VpcConnectorEgressSettings vpc_connector_egress_settings = 23;
Parameter | |
---|---|
Name | Description |
value | int The enum numeric value on the wire for vpcConnectorEgressSettings to set. |
Returns | |
---|---|
Type | Description |
CloudFunction.Builder | This builder for chaining. |