Class CloudfunctionsFunctionConfig.Builder
- java.lang.Object
-
- com.hashicorp.cdktf.providers.google.cloudfunctions_function.CloudfunctionsFunctionConfig.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<CloudfunctionsFunctionConfig>
- Enclosing interface:
- CloudfunctionsFunctionConfig
@Stability(Stable) public static final class CloudfunctionsFunctionConfig.Builder extends Object implements software.amazon.jsii.Builder<CloudfunctionsFunctionConfig>
A builder forCloudfunctionsFunctionConfig
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
-
-
-
Method Detail
-
name
@Stability(Stable) public CloudfunctionsFunctionConfig.Builder name(String name)
Sets the value ofCloudfunctionsFunctionConfig.getName()- Parameters:
name- A user-defined name of the function. Function names must be unique globally. This parameter is required. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/cloudfunctions_function#name CloudfunctionsFunction#name}- Returns:
this
-
runtime
@Stability(Stable) public CloudfunctionsFunctionConfig.Builder runtime(String runtime)
Sets the value ofCloudfunctionsFunctionConfig.getRuntime()- Parameters:
runtime- The runtime in which the function is going to run. Eg. "nodejs12", "nodejs14", "python37", "go111". This parameter is required. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/cloudfunctions_function#runtime CloudfunctionsFunction#runtime}- Returns:
this
-
availableMemoryMb
@Stability(Stable) public CloudfunctionsFunctionConfig.Builder availableMemoryMb(Number availableMemoryMb)
Sets the value ofCloudfunctionsFunctionConfig.getAvailableMemoryMb()- Parameters:
availableMemoryMb- Memory (in MB), available to the function. Default value is 256. Possible values include 128, 256, 512, 1024, etc. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/cloudfunctions_function#available_memory_mb CloudfunctionsFunction#available_memory_mb}- Returns:
this
-
buildEnvironmentVariables
@Stability(Stable) public CloudfunctionsFunctionConfig.Builder buildEnvironmentVariables(Map<String,String> buildEnvironmentVariables)
Sets the value ofCloudfunctionsFunctionConfig.getBuildEnvironmentVariables()- Parameters:
buildEnvironmentVariables- A set of key/value environment variable pairs available during build time. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/cloudfunctions_function#build_environment_variables CloudfunctionsFunction#build_environment_variables}- Returns:
this
-
buildServiceAccount
@Stability(Stable) public CloudfunctionsFunctionConfig.Builder buildServiceAccount(String buildServiceAccount)
Sets the value ofCloudfunctionsFunctionConfig.getBuildServiceAccount()- Parameters:
buildServiceAccount- The fully-qualified name of the service account to be used for the build step of deploying this function. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/cloudfunctions_function#build_service_account CloudfunctionsFunction#build_service_account}- Returns:
this
-
buildWorkerPool
@Stability(Stable) public CloudfunctionsFunctionConfig.Builder buildWorkerPool(String buildWorkerPool)
Sets the value ofCloudfunctionsFunctionConfig.getBuildWorkerPool()- Parameters:
buildWorkerPool- Name of the Cloud Build Custom Worker Pool that should be used to build the function. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/cloudfunctions_function#build_worker_pool CloudfunctionsFunction#build_worker_pool}- Returns:
this
-
description
@Stability(Stable) public CloudfunctionsFunctionConfig.Builder description(String description)
Sets the value ofCloudfunctionsFunctionConfig.getDescription()- Parameters:
description- Description of the function. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/cloudfunctions_function#description CloudfunctionsFunction#description}- Returns:
this
-
dockerRegistry
@Stability(Stable) public CloudfunctionsFunctionConfig.Builder dockerRegistry(String dockerRegistry)
Sets the value ofCloudfunctionsFunctionConfig.getDockerRegistry()- Parameters:
dockerRegistry- Docker Registry to use for storing the function's Docker images. Allowed values are ARTIFACT_REGISTRY (default) and CONTAINER_REGISTRY. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/cloudfunctions_function#docker_registry CloudfunctionsFunction#docker_registry}- Returns:
this
-
dockerRepository
@Stability(Stable) public CloudfunctionsFunctionConfig.Builder dockerRepository(String dockerRepository)
Sets the value ofCloudfunctionsFunctionConfig.getDockerRepository()- Parameters:
dockerRepository- User managed repository created in Artifact Registry optionally with a customer managed encryption key. If specified, deployments will use Artifact Registry for storing images built with Cloud Build. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/cloudfunctions_function#docker_repository CloudfunctionsFunction#docker_repository}- Returns:
this
-
entryPoint
@Stability(Stable) public CloudfunctionsFunctionConfig.Builder entryPoint(String entryPoint)
Sets the value ofCloudfunctionsFunctionConfig.getEntryPoint()- Parameters:
entryPoint- Name of the function that will be executed when the Google Cloud Function is triggered. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/cloudfunctions_function#entry_point CloudfunctionsFunction#entry_point}- Returns:
this
-
environmentVariables
@Stability(Stable) public CloudfunctionsFunctionConfig.Builder environmentVariables(Map<String,String> environmentVariables)
Sets the value ofCloudfunctionsFunctionConfig.getEnvironmentVariables()- Parameters:
environmentVariables- A set of key/value environment variable pairs to assign to the function. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/cloudfunctions_function#environment_variables CloudfunctionsFunction#environment_variables}- Returns:
this
-
eventTrigger
@Stability(Stable) public CloudfunctionsFunctionConfig.Builder eventTrigger(CloudfunctionsFunctionEventTrigger eventTrigger)
Sets the value ofCloudfunctionsFunctionConfig.getEventTrigger()- Parameters:
eventTrigger- event_trigger block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/cloudfunctions_function#event_trigger CloudfunctionsFunction#event_trigger}- Returns:
this
-
httpsTriggerSecurityLevel
@Stability(Stable) public CloudfunctionsFunctionConfig.Builder httpsTriggerSecurityLevel(String httpsTriggerSecurityLevel)
Sets the value ofCloudfunctionsFunctionConfig.getHttpsTriggerSecurityLevel()- Parameters:
httpsTriggerSecurityLevel- The security level for the function. Defaults to SECURE_OPTIONAL. Valid only if trigger_http is used. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/cloudfunctions_function#https_trigger_security_level CloudfunctionsFunction#https_trigger_security_level}- Returns:
this
-
httpsTriggerUrl
@Stability(Stable) public CloudfunctionsFunctionConfig.Builder httpsTriggerUrl(String httpsTriggerUrl)
Sets the value ofCloudfunctionsFunctionConfig.getHttpsTriggerUrl()- Parameters:
httpsTriggerUrl- URL which triggers function execution. Returned only if trigger_http is used. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/cloudfunctions_function#https_trigger_url CloudfunctionsFunction#https_trigger_url}- Returns:
this
-
id
@Stability(Stable) public CloudfunctionsFunctionConfig.Builder id(String id)
Sets the value ofCloudfunctionsFunctionConfig.getId()- Parameters:
id- Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/cloudfunctions_function#id CloudfunctionsFunction#id}. Please be aware that the id field is automatically added to all resources in Terraform providers using a Terraform provider SDK version below 2. If you experience problems setting this value it might not be settable. Please take a look at the provider documentation to ensure it should be settable.- Returns:
this
-
ingressSettings
@Stability(Stable) public CloudfunctionsFunctionConfig.Builder ingressSettings(String ingressSettings)
Sets the value ofCloudfunctionsFunctionConfig.getIngressSettings()- Parameters:
ingressSettings- String value that controls what traffic can reach the function. Allowed values are ALLOW_ALL and ALLOW_INTERNAL_ONLY. Changes to this field will recreate the cloud function. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/cloudfunctions_function#ingress_settings CloudfunctionsFunction#ingress_settings}- Returns:
this
-
kmsKeyName
@Stability(Stable) public CloudfunctionsFunctionConfig.Builder kmsKeyName(String kmsKeyName)
Sets the value ofCloudfunctionsFunctionConfig.getKmsKeyName()- Parameters:
kmsKeyName- Resource name of a KMS crypto key (managed by the user) used to encrypt/decrypt function resources. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/cloudfunctions_function#kms_key_name CloudfunctionsFunction#kms_key_name}- Returns:
this
-
labels
@Stability(Stable) public CloudfunctionsFunctionConfig.Builder labels(Map<String,String> labels)
Sets the value ofCloudfunctionsFunctionConfig.getLabels()- Parameters:
labels- A set of key/value label pairs to assign to the function. Label keys must follow the requirements at https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements. **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/cloudfunctions_function#labels CloudfunctionsFunction#labels}- Returns:
this
-
maxInstances
@Stability(Stable) public CloudfunctionsFunctionConfig.Builder maxInstances(Number maxInstances)
Sets the value ofCloudfunctionsFunctionConfig.getMaxInstances()- Parameters:
maxInstances- The limit on the maximum number of function instances that may coexist at a given time. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/cloudfunctions_function#max_instances CloudfunctionsFunction#max_instances}- Returns:
this
-
minInstances
@Stability(Stable) public CloudfunctionsFunctionConfig.Builder minInstances(Number minInstances)
Sets the value ofCloudfunctionsFunctionConfig.getMinInstances()- Parameters:
minInstances- The limit on the minimum number of function instances that may coexist at a given time. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/cloudfunctions_function#min_instances CloudfunctionsFunction#min_instances}- Returns:
this
-
project
@Stability(Stable) public CloudfunctionsFunctionConfig.Builder project(String project)
Sets the value ofCloudfunctionsFunctionConfig.getProject()- Parameters:
project- Project of the function. If it is not provided, the provider project is used. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/cloudfunctions_function#project CloudfunctionsFunction#project}- Returns:
this
-
region
@Stability(Stable) public CloudfunctionsFunctionConfig.Builder region(String region)
Sets the value ofCloudfunctionsFunctionConfig.getRegion()- Parameters:
region- Region of function. If it is not provided, the provider region is used. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/cloudfunctions_function#region CloudfunctionsFunction#region}- Returns:
this
-
secretEnvironmentVariables
@Stability(Stable) public CloudfunctionsFunctionConfig.Builder secretEnvironmentVariables(com.hashicorp.cdktf.IResolvable secretEnvironmentVariables)
Sets the value ofCloudfunctionsFunctionConfig.getSecretEnvironmentVariables()- Parameters:
secretEnvironmentVariables- secret_environment_variables block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/cloudfunctions_function#secret_environment_variables CloudfunctionsFunction#secret_environment_variables}- Returns:
this
-
secretEnvironmentVariables
@Stability(Stable) public CloudfunctionsFunctionConfig.Builder secretEnvironmentVariables(List<? extends CloudfunctionsFunctionSecretEnvironmentVariables> secretEnvironmentVariables)
Sets the value ofCloudfunctionsFunctionConfig.getSecretEnvironmentVariables()- Parameters:
secretEnvironmentVariables- secret_environment_variables block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/cloudfunctions_function#secret_environment_variables CloudfunctionsFunction#secret_environment_variables}- Returns:
this
-
secretVolumes
@Stability(Stable) public CloudfunctionsFunctionConfig.Builder secretVolumes(com.hashicorp.cdktf.IResolvable secretVolumes)
Sets the value ofCloudfunctionsFunctionConfig.getSecretVolumes()- Parameters:
secretVolumes- secret_volumes block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/cloudfunctions_function#secret_volumes CloudfunctionsFunction#secret_volumes}- Returns:
this
-
secretVolumes
@Stability(Stable) public CloudfunctionsFunctionConfig.Builder secretVolumes(List<? extends CloudfunctionsFunctionSecretVolumes> secretVolumes)
Sets the value ofCloudfunctionsFunctionConfig.getSecretVolumes()- Parameters:
secretVolumes- secret_volumes block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/cloudfunctions_function#secret_volumes CloudfunctionsFunction#secret_volumes}- Returns:
this
-
serviceAccountEmail
@Stability(Stable) public CloudfunctionsFunctionConfig.Builder serviceAccountEmail(String serviceAccountEmail)
Sets the value ofCloudfunctionsFunctionConfig.getServiceAccountEmail()- Parameters:
serviceAccountEmail- If provided, the self-provided service account to run the function with. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/cloudfunctions_function#service_account_email CloudfunctionsFunction#service_account_email}- Returns:
this
-
sourceArchiveBucket
@Stability(Stable) public CloudfunctionsFunctionConfig.Builder sourceArchiveBucket(String sourceArchiveBucket)
Sets the value ofCloudfunctionsFunctionConfig.getSourceArchiveBucket()- Parameters:
sourceArchiveBucket- The GCS bucket containing the zip archive which contains the function. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/cloudfunctions_function#source_archive_bucket CloudfunctionsFunction#source_archive_bucket}- Returns:
this
-
sourceArchiveObject
@Stability(Stable) public CloudfunctionsFunctionConfig.Builder sourceArchiveObject(String sourceArchiveObject)
Sets the value ofCloudfunctionsFunctionConfig.getSourceArchiveObject()- Parameters:
sourceArchiveObject- The source archive object (file) in archive bucket. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/cloudfunctions_function#source_archive_object CloudfunctionsFunction#source_archive_object}- Returns:
this
-
sourceRepository
@Stability(Stable) public CloudfunctionsFunctionConfig.Builder sourceRepository(CloudfunctionsFunctionSourceRepository sourceRepository)
Sets the value ofCloudfunctionsFunctionConfig.getSourceRepository()- Parameters:
sourceRepository- source_repository block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/cloudfunctions_function#source_repository CloudfunctionsFunction#source_repository}- Returns:
this
-
timeout
@Stability(Stable) public CloudfunctionsFunctionConfig.Builder timeout(Number timeout)
Sets the value ofCloudfunctionsFunctionConfig.getTimeout()- Parameters:
timeout- Timeout (in seconds) for the function. Default value is 60 seconds. Cannot be more than 540 seconds. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/cloudfunctions_function#timeout CloudfunctionsFunction#timeout}- Returns:
this
-
timeouts
@Stability(Stable) public CloudfunctionsFunctionConfig.Builder timeouts(CloudfunctionsFunctionTimeouts timeouts)
Sets the value ofCloudfunctionsFunctionConfig.getTimeouts()- Parameters:
timeouts- timeouts block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/cloudfunctions_function#timeouts CloudfunctionsFunction#timeouts}- Returns:
this
-
triggerHttp
@Stability(Stable) public CloudfunctionsFunctionConfig.Builder triggerHttp(Boolean triggerHttp)
Sets the value ofCloudfunctionsFunctionConfig.getTriggerHttp()- Parameters:
triggerHttp- Boolean variable. Any HTTP request (of a supported type) to the endpoint will trigger function execution. Supported HTTP request types are: POST, PUT, GET, DELETE, and OPTIONS. Endpoint is returned as https_trigger_url. Cannot be used with trigger_bucket and trigger_topic. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/cloudfunctions_function#trigger_http CloudfunctionsFunction#trigger_http}- Returns:
this
-
triggerHttp
@Stability(Stable) public CloudfunctionsFunctionConfig.Builder triggerHttp(com.hashicorp.cdktf.IResolvable triggerHttp)
Sets the value ofCloudfunctionsFunctionConfig.getTriggerHttp()- Parameters:
triggerHttp- Boolean variable. Any HTTP request (of a supported type) to the endpoint will trigger function execution. Supported HTTP request types are: POST, PUT, GET, DELETE, and OPTIONS. Endpoint is returned as https_trigger_url. Cannot be used with trigger_bucket and trigger_topic. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/cloudfunctions_function#trigger_http CloudfunctionsFunction#trigger_http}- Returns:
this
-
vpcConnector
@Stability(Stable) public CloudfunctionsFunctionConfig.Builder vpcConnector(String vpcConnector)
Sets the value ofCloudfunctionsFunctionConfig.getVpcConnector()- Parameters:
vpcConnector- 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/*. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/cloudfunctions_function#vpc_connector CloudfunctionsFunction#vpc_connector} Note: The above comment contained a comment block ending sequence (* followed by /). We have introduced a space between to prevent syntax errors. Please ignore the space.- Returns:
this
-
vpcConnectorEgressSettings
@Stability(Stable) public CloudfunctionsFunctionConfig.Builder vpcConnectorEgressSettings(String vpcConnectorEgressSettings)
Sets the value ofCloudfunctionsFunctionConfig.getVpcConnectorEgressSettings()- Parameters:
vpcConnectorEgressSettings- The egress settings for the connector, controlling what traffic is diverted through it. Allowed values are ALL_TRAFFIC and PRIVATE_RANGES_ONLY. Defaults to PRIVATE_RANGES_ONLY. If unset, this field preserves the previously set value. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/cloudfunctions_function#vpc_connector_egress_settings CloudfunctionsFunction#vpc_connector_egress_settings}- Returns:
this
-
connection
@Stability(Experimental) public CloudfunctionsFunctionConfig.Builder connection(com.hashicorp.cdktf.SSHProvisionerConnection connection)
Sets the value ofTerraformMetaArguments.getConnection()- Parameters:
connection- the value to be set.- Returns:
this
-
connection
@Stability(Experimental) public CloudfunctionsFunctionConfig.Builder connection(com.hashicorp.cdktf.WinrmProvisionerConnection connection)
Sets the value ofTerraformMetaArguments.getConnection()- Parameters:
connection- the value to be set.- Returns:
this
-
count
@Stability(Experimental) public CloudfunctionsFunctionConfig.Builder count(Number count)
Sets the value ofTerraformMetaArguments.getCount()- Parameters:
count- the value to be set.- Returns:
this
-
count
@Stability(Experimental) public CloudfunctionsFunctionConfig.Builder count(com.hashicorp.cdktf.TerraformCount count)
Sets the value ofTerraformMetaArguments.getCount()- Parameters:
count- the value to be set.- Returns:
this
-
dependsOn
@Stability(Experimental) public CloudfunctionsFunctionConfig.Builder dependsOn(List<? extends com.hashicorp.cdktf.ITerraformDependable> dependsOn)
Sets the value ofTerraformMetaArguments.getDependsOn()- Parameters:
dependsOn- the value to be set.- Returns:
this
-
forEach
@Stability(Experimental) public CloudfunctionsFunctionConfig.Builder forEach(com.hashicorp.cdktf.ITerraformIterator forEach)
Sets the value ofTerraformMetaArguments.getForEach()- Parameters:
forEach- the value to be set.- Returns:
this
-
lifecycle
@Stability(Experimental) public CloudfunctionsFunctionConfig.Builder lifecycle(com.hashicorp.cdktf.TerraformResourceLifecycle lifecycle)
Sets the value ofTerraformMetaArguments.getLifecycle()- Parameters:
lifecycle- the value to be set.- Returns:
this
-
provider
@Stability(Experimental) public CloudfunctionsFunctionConfig.Builder provider(com.hashicorp.cdktf.TerraformProvider provider)
Sets the value ofTerraformMetaArguments.getProvider()- Parameters:
provider- the value to be set.- Returns:
this
-
provisioners
@Stability(Experimental) public CloudfunctionsFunctionConfig.Builder provisioners(List<? extends Object> provisioners)
Sets the value ofTerraformMetaArguments.getProvisioners()- Parameters:
provisioners- the value to be set.- Returns:
this
-
build
@Stability(Stable) public CloudfunctionsFunctionConfig build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CloudfunctionsFunctionConfig>- Returns:
- a new instance of
CloudfunctionsFunctionConfig - Throws:
NullPointerException- if any required attribute was not provided
-
-