Class ComputeRegionBackendServiceConfig.Builder
- java.lang.Object
-
- com.hashicorp.cdktf.providers.google.compute_region_backend_service.ComputeRegionBackendServiceConfig.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<ComputeRegionBackendServiceConfig>
- Enclosing interface:
- ComputeRegionBackendServiceConfig
@Stability(Stable) public static final class ComputeRegionBackendServiceConfig.Builder extends Object implements software.amazon.jsii.Builder<ComputeRegionBackendServiceConfig>
A builder forComputeRegionBackendServiceConfig
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
-
-
-
Method Detail
-
name
@Stability(Stable) public ComputeRegionBackendServiceConfig.Builder name(String name)
Sets the value ofComputeRegionBackendServiceConfig.getName()- Parameters:
name- Name of the resource. This parameter is required. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression '[a-z](%5B-a-z0-9%5D*%5Ba-z0-9%5D)?' which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_region_backend_service#name ComputeRegionBackendService#name}- Returns:
this
-
affinityCookieTtlSec
@Stability(Stable) public ComputeRegionBackendServiceConfig.Builder affinityCookieTtlSec(Number affinityCookieTtlSec)
Sets the value ofComputeRegionBackendServiceConfig.getAffinityCookieTtlSec()- Parameters:
affinityCookieTtlSec- Lifetime of cookies in seconds if session_affinity is GENERATED_COOKIE. If set to 0, the cookie is non-persistent and lasts only until the end of the browser session (or equivalent). The maximum allowed value for TTL is one day. When the load balancing scheme is INTERNAL, this field is not used. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_region_backend_service#affinity_cookie_ttl_sec ComputeRegionBackendService#affinity_cookie_ttl_sec}- Returns:
this
-
backend
@Stability(Stable) public ComputeRegionBackendServiceConfig.Builder backend(com.hashicorp.cdktf.IResolvable backend)
Sets the value ofComputeRegionBackendServiceConfig.getBackend()- Parameters:
backend- backend block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_region_backend_service#backend ComputeRegionBackendService#backend}- Returns:
this
-
backend
@Stability(Stable) public ComputeRegionBackendServiceConfig.Builder backend(List<? extends ComputeRegionBackendServiceBackend> backend)
Sets the value ofComputeRegionBackendServiceConfig.getBackend()- Parameters:
backend- backend block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_region_backend_service#backend ComputeRegionBackendService#backend}- Returns:
this
-
cdnPolicy
@Stability(Stable) public ComputeRegionBackendServiceConfig.Builder cdnPolicy(ComputeRegionBackendServiceCdnPolicy cdnPolicy)
Sets the value ofComputeRegionBackendServiceConfig.getCdnPolicy()- Parameters:
cdnPolicy- cdn_policy block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_region_backend_service#cdn_policy ComputeRegionBackendService#cdn_policy}- Returns:
this
-
circuitBreakers
@Stability(Stable) public ComputeRegionBackendServiceConfig.Builder circuitBreakers(ComputeRegionBackendServiceCircuitBreakers circuitBreakers)
Sets the value ofComputeRegionBackendServiceConfig.getCircuitBreakers()- Parameters:
circuitBreakers- circuit_breakers block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_region_backend_service#circuit_breakers ComputeRegionBackendService#circuit_breakers}- Returns:
this
-
connectionDrainingTimeoutSec
@Stability(Stable) public ComputeRegionBackendServiceConfig.Builder connectionDrainingTimeoutSec(Number connectionDrainingTimeoutSec)
Sets the value ofComputeRegionBackendServiceConfig.getConnectionDrainingTimeoutSec()- Parameters:
connectionDrainingTimeoutSec- Time for which instance will be drained (not accept new connections, but still work to finish started). From version 6.0.0 ConnectionDrainingTimeoutSec default value will be 300 to match default GCP value. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_region_backend_service#connection_draining_timeout_sec ComputeRegionBackendService#connection_draining_timeout_sec}- Returns:
this
-
consistentHash
@Stability(Stable) public ComputeRegionBackendServiceConfig.Builder consistentHash(ComputeRegionBackendServiceConsistentHash consistentHash)
Sets the value ofComputeRegionBackendServiceConfig.getConsistentHash()- Parameters:
consistentHash- consistent_hash block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_region_backend_service#consistent_hash ComputeRegionBackendService#consistent_hash}- Returns:
this
-
description
@Stability(Stable) public ComputeRegionBackendServiceConfig.Builder description(String description)
Sets the value ofComputeRegionBackendServiceConfig.getDescription()- Parameters:
description- An optional description of this resource. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_region_backend_service#description ComputeRegionBackendService#description}- Returns:
this
-
enableCdn
@Stability(Stable) public ComputeRegionBackendServiceConfig.Builder enableCdn(Boolean enableCdn)
Sets the value ofComputeRegionBackendServiceConfig.getEnableCdn()- Parameters:
enableCdn- If true, enable Cloud CDN for this RegionBackendService. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_region_backend_service#enable_cdn ComputeRegionBackendService#enable_cdn}- Returns:
this
-
enableCdn
@Stability(Stable) public ComputeRegionBackendServiceConfig.Builder enableCdn(com.hashicorp.cdktf.IResolvable enableCdn)
Sets the value ofComputeRegionBackendServiceConfig.getEnableCdn()- Parameters:
enableCdn- If true, enable Cloud CDN for this RegionBackendService. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_region_backend_service#enable_cdn ComputeRegionBackendService#enable_cdn}- Returns:
this
-
failoverPolicy
@Stability(Stable) public ComputeRegionBackendServiceConfig.Builder failoverPolicy(ComputeRegionBackendServiceFailoverPolicy failoverPolicy)
Sets the value ofComputeRegionBackendServiceConfig.getFailoverPolicy()- Parameters:
failoverPolicy- failover_policy block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_region_backend_service#failover_policy ComputeRegionBackendService#failover_policy}- Returns:
this
-
healthChecks
@Stability(Stable) public ComputeRegionBackendServiceConfig.Builder healthChecks(List<String> healthChecks)
Sets the value ofComputeRegionBackendServiceConfig.getHealthChecks()- Parameters:
healthChecks- The set of URLs to HealthCheck resources for health checking this RegionBackendService. Currently at most one health check can be specified. A health check must be specified unless the backend service uses an internet or serverless NEG as a backend. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_region_backend_service#health_checks ComputeRegionBackendService#health_checks}- Returns:
this
-
iap
@Stability(Stable) public ComputeRegionBackendServiceConfig.Builder iap(ComputeRegionBackendServiceIap iap)
Sets the value ofComputeRegionBackendServiceConfig.getIap()- Parameters:
iap- iap block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_region_backend_service#iap ComputeRegionBackendService#iap}- Returns:
this
-
id
@Stability(Stable) public ComputeRegionBackendServiceConfig.Builder id(String id)
Sets the value ofComputeRegionBackendServiceConfig.getId()- Parameters:
id- Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_region_backend_service#id ComputeRegionBackendService#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
-
loadBalancingScheme
@Stability(Stable) public ComputeRegionBackendServiceConfig.Builder loadBalancingScheme(String loadBalancingScheme)
Sets the value ofComputeRegionBackendServiceConfig.getLoadBalancingScheme()- Parameters:
loadBalancingScheme- Indicates what kind of load balancing this regional backend service will be used for. A backend service created for one type of load balancing cannot be used with the other(s). For more information, refer to [Choosing a load balancer](https://cloud.google.com/load-balancing/docs/backend-service). Default value: "INTERNAL" Possible values: ["EXTERNAL", "EXTERNAL_MANAGED", "INTERNAL", "INTERNAL_MANAGED"] Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_region_backend_service#load_balancing_scheme ComputeRegionBackendService#load_balancing_scheme}- Returns:
this
-
localityLbPolicy
@Stability(Stable) public ComputeRegionBackendServiceConfig.Builder localityLbPolicy(String localityLbPolicy)
Sets the value ofComputeRegionBackendServiceConfig.getLocalityLbPolicy()- Parameters:
localityLbPolicy- The load balancing algorithm used within the scope of the locality. The possible values are:. * 'ROUND_ROBIN': This is a simple policy in which each healthy backend is selected in round robin order. * 'LEAST_REQUEST': An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. * 'RING_HASH': The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. * 'RANDOM': The load balancer selects a random healthy host. * 'ORIGINAL_DESTINATION': Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. * 'MAGLEV': used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, refer to https://ai.google/research/pubs/pub44824 * 'WEIGHTED_MAGLEV': Per-instance weighted Load Balancing via health check reported weights. If set, the Backend Service must configure a non legacy HTTP-based Health Check, and health check replies are expected to contain non-standard HTTP response header field X-Load-Balancing-Endpoint-Weight to specify the per-instance weights. If set, Load Balancing is weight based on the per-instance weights reported in the last processed health check replies, as long as every instance either reported a valid weight or had UNAVAILABLE_WEIGHT. Otherwise, Load Balancing remains equal-weight. This field is applicable to either: * A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and loadBalancingScheme set to INTERNAL_MANAGED. * A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED. * A regional backend service with loadBalancingScheme set to EXTERNAL (External Network Load Balancing). Only MAGLEV and WEIGHTED_MAGLEV values are possible for External Network Load Balancing. The default is MAGLEV. If session_affinity is not NONE, and this field is not set to MAGLEV, WEIGHTED_MAGLEV, or RING_HASH, session affinity settings will not take effect. Only ROUND_ROBIN and RING_HASH are supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validate_for_proxyless field set to true. Possible values: ["ROUND_ROBIN", "LEAST_REQUEST", "RING_HASH", "RANDOM", "ORIGINAL_DESTINATION", "MAGLEV", "WEIGHTED_MAGLEV"] Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_region_backend_service#locality_lb_policy ComputeRegionBackendService#locality_lb_policy}- Returns:
this
-
logConfig
@Stability(Stable) public ComputeRegionBackendServiceConfig.Builder logConfig(ComputeRegionBackendServiceLogConfig logConfig)
Sets the value ofComputeRegionBackendServiceConfig.getLogConfig()- Parameters:
logConfig- log_config block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_region_backend_service#log_config ComputeRegionBackendService#log_config}- Returns:
this
-
network
@Stability(Stable) public ComputeRegionBackendServiceConfig.Builder network(String network)
Sets the value ofComputeRegionBackendServiceConfig.getNetwork()- Parameters:
network- The URL of the network to which this backend service belongs. This field can only be specified when the load balancing scheme is set to INTERNAL. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_region_backend_service#network ComputeRegionBackendService#network}- Returns:
this
-
outlierDetection
@Stability(Stable) public ComputeRegionBackendServiceConfig.Builder outlierDetection(ComputeRegionBackendServiceOutlierDetection outlierDetection)
Sets the value ofComputeRegionBackendServiceConfig.getOutlierDetection()- Parameters:
outlierDetection- outlier_detection block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_region_backend_service#outlier_detection ComputeRegionBackendService#outlier_detection}- Returns:
this
-
portName
@Stability(Stable) public ComputeRegionBackendServiceConfig.Builder portName(String portName)
Sets the value ofComputeRegionBackendServiceConfig.getPortName()- Parameters:
portName- A named port on a backend instance group representing the port for communication to the backend VMs in that group. Required when the loadBalancingScheme is EXTERNAL, EXTERNAL_MANAGED, INTERNAL_MANAGED, or INTERNAL_SELF_MANAGED and the backends are instance groups. The named port must be defined on each backend instance group. This parameter has no meaning if the backends are NEGs. API sets a default of "http" if not given. Must be omitted when the loadBalancingScheme is INTERNAL (Internal TCP/UDP Load Balancing). Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_region_backend_service#port_name ComputeRegionBackendService#port_name}- Returns:
this
-
project
@Stability(Stable) public ComputeRegionBackendServiceConfig.Builder project(String project)
Sets the value ofComputeRegionBackendServiceConfig.getProject()- Parameters:
project- Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_region_backend_service#project ComputeRegionBackendService#project}.- Returns:
this
-
protocol
@Stability(Stable) public ComputeRegionBackendServiceConfig.Builder protocol(String protocol)
Sets the value ofComputeRegionBackendServiceConfig.getProtocol()- Parameters:
protocol- The protocol this RegionBackendService uses to communicate with backends. The default is HTTP. **NOTE**: HTTP2 is only valid for beta HTTP/2 load balancer types and may result in errors if used with the GA API. Possible values: ["HTTP", "HTTPS", "HTTP2", "SSL", "TCP", "UDP", "GRPC", "UNSPECIFIED"] Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_region_backend_service#protocol ComputeRegionBackendService#protocol}- Returns:
this
-
region
@Stability(Stable) public ComputeRegionBackendServiceConfig.Builder region(String region)
Sets the value ofComputeRegionBackendServiceConfig.getRegion()- Parameters:
region- The Region in which the created backend service should reside. 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/compute_region_backend_service#region ComputeRegionBackendService#region}- Returns:
this
-
sessionAffinity
@Stability(Stable) public ComputeRegionBackendServiceConfig.Builder sessionAffinity(String sessionAffinity)
Sets the value ofComputeRegionBackendServiceConfig.getSessionAffinity()- Parameters:
sessionAffinity- Type of session affinity to use. The default is NONE. Session affinity is not applicable if the protocol is UDP. Possible values: ["NONE", "CLIENT_IP", "CLIENT_IP_PORT_PROTO", "CLIENT_IP_PROTO", "GENERATED_COOKIE", "HEADER_FIELD", "HTTP_COOKIE", "CLIENT_IP_NO_DESTINATION"] Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_region_backend_service#session_affinity ComputeRegionBackendService#session_affinity}- Returns:
this
-
timeouts
@Stability(Stable) public ComputeRegionBackendServiceConfig.Builder timeouts(ComputeRegionBackendServiceTimeouts timeouts)
Sets the value ofComputeRegionBackendServiceConfig.getTimeouts()- Parameters:
timeouts- timeouts block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_region_backend_service#timeouts ComputeRegionBackendService#timeouts}- Returns:
this
-
timeoutSec
@Stability(Stable) public ComputeRegionBackendServiceConfig.Builder timeoutSec(Number timeoutSec)
Sets the value ofComputeRegionBackendServiceConfig.getTimeoutSec()- Parameters:
timeoutSec- The backend service timeout has a different meaning depending on the type of load balancer. For more information see, [Backend service settings](https://cloud.google.com/compute/docs/reference/rest/v1/backendServices). The default is 30 seconds. The full range of timeout values allowed goes from 1 through 2,147,483,647 seconds. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_region_backend_service#timeout_sec ComputeRegionBackendService#timeout_sec}- Returns:
this
-
connection
@Stability(Experimental) public ComputeRegionBackendServiceConfig.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 ComputeRegionBackendServiceConfig.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 ComputeRegionBackendServiceConfig.Builder count(Number count)
Sets the value ofTerraformMetaArguments.getCount()- Parameters:
count- the value to be set.- Returns:
this
-
count
@Stability(Experimental) public ComputeRegionBackendServiceConfig.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 ComputeRegionBackendServiceConfig.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 ComputeRegionBackendServiceConfig.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 ComputeRegionBackendServiceConfig.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 ComputeRegionBackendServiceConfig.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 ComputeRegionBackendServiceConfig.Builder provisioners(List<? extends Object> provisioners)
Sets the value ofTerraformMetaArguments.getProvisioners()- Parameters:
provisioners- the value to be set.- Returns:
this
-
build
@Stability(Stable) public ComputeRegionBackendServiceConfig build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<ComputeRegionBackendServiceConfig>- Returns:
- a new instance of
ComputeRegionBackendServiceConfig - Throws:
NullPointerException- if any required attribute was not provided
-
-