Class NetworkServicesEdgeCacheOriginConfig.Builder
- java.lang.Object
-
- com.hashicorp.cdktf.providers.google.network_services_edge_cache_origin.NetworkServicesEdgeCacheOriginConfig.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<NetworkServicesEdgeCacheOriginConfig>
- Enclosing interface:
- NetworkServicesEdgeCacheOriginConfig
@Stability(Stable) public static final class NetworkServicesEdgeCacheOriginConfig.Builder extends Object implements software.amazon.jsii.Builder<NetworkServicesEdgeCacheOriginConfig>
A builder forNetworkServicesEdgeCacheOriginConfig
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
-
-
-
Method Detail
-
name
@Stability(Stable) public NetworkServicesEdgeCacheOriginConfig.Builder name(String name)
Sets the value ofNetworkServicesEdgeCacheOriginConfig.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-64 characters long, and match the regular expression [a-zA-Z][a-zA-Z0-9_-]* which means the first character must be a letter, and all following characters must be a dash, underscore, letter or digit. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/network_services_edge_cache_origin#name NetworkServicesEdgeCacheOrigin#name}- Returns:
this
-
originAddress
@Stability(Stable) public NetworkServicesEdgeCacheOriginConfig.Builder originAddress(String originAddress)
Sets the value ofNetworkServicesEdgeCacheOriginConfig.getOriginAddress()- Parameters:
originAddress- A fully qualified domain name (FQDN) or IP address reachable over the public Internet, or the address of a Google Cloud Storage bucket. This parameter is required. This address will be used as the origin for cache requests - e.g. FQDN: media-backend.example.com, IPv4: 35.218.1.1, IPv6: 2607:f8b0:4012:809::200e, Cloud Storage: gs://bucketname When providing an FQDN (hostname), it must be publicly resolvable (e.g. via Google public DNS) and IP addresses must be publicly routable. It must not contain a protocol (e.g., https://) and it must not contain any slashes. If a Cloud Storage bucket is provided, it must be in the canonical "gs://bucketname" format. Other forms, such as "storage.googleapis.com", will be rejected. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/network_services_edge_cache_origin#origin_address NetworkServicesEdgeCacheOrigin#origin_address}- Returns:
this
-
awsV4Authentication
@Stability(Stable) public NetworkServicesEdgeCacheOriginConfig.Builder awsV4Authentication(NetworkServicesEdgeCacheOriginAwsV4Authentication awsV4Authentication)
Sets the value ofNetworkServicesEdgeCacheOriginConfig.getAwsV4Authentication()- Parameters:
awsV4Authentication- aws_v4_authentication block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/network_services_edge_cache_origin#aws_v4_authentication NetworkServicesEdgeCacheOrigin#aws_v4_authentication}- Returns:
this
-
description
@Stability(Stable) public NetworkServicesEdgeCacheOriginConfig.Builder description(String description)
Sets the value ofNetworkServicesEdgeCacheOriginConfig.getDescription()- Parameters:
description- A human-readable description of the resource. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/network_services_edge_cache_origin#description NetworkServicesEdgeCacheOrigin#description}- Returns:
this
-
failoverOrigin
@Stability(Stable) public NetworkServicesEdgeCacheOriginConfig.Builder failoverOrigin(String failoverOrigin)
Sets the value ofNetworkServicesEdgeCacheOriginConfig.getFailoverOrigin()- Parameters:
failoverOrigin- The Origin resource to try when the current origin cannot be reached. After maxAttempts is reached, the configured failoverOrigin will be used to fulfil the request. The value of timeout.maxAttemptsTimeout dictates the timeout across all origins. A reference to a Topic resource. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/network_services_edge_cache_origin#failover_origin NetworkServicesEdgeCacheOrigin#failover_origin}- Returns:
this
-
id
@Stability(Stable) public NetworkServicesEdgeCacheOriginConfig.Builder id(String id)
Sets the value ofNetworkServicesEdgeCacheOriginConfig.getId()- Parameters:
id- Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/network_services_edge_cache_origin#id NetworkServicesEdgeCacheOrigin#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
-
labels
@Stability(Stable) public NetworkServicesEdgeCacheOriginConfig.Builder labels(Map<String,String> labels)
Sets the value ofNetworkServicesEdgeCacheOriginConfig.getLabels()- Parameters:
labels- Set of label tags associated with the EdgeCache resource. **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/network_services_edge_cache_origin#labels NetworkServicesEdgeCacheOrigin#labels}- Returns:
this
-
maxAttempts
@Stability(Stable) public NetworkServicesEdgeCacheOriginConfig.Builder maxAttempts(Number maxAttempts)
Sets the value ofNetworkServicesEdgeCacheOriginConfig.getMaxAttempts()- Parameters:
maxAttempts- The maximum number of attempts to cache fill from this origin. Another attempt is made when a cache fill fails with one of the retryConditions. Once maxAttempts to this origin have failed the failoverOrigin will be used, if one is specified. That failoverOrigin may specify its own maxAttempts, retryConditions and failoverOrigin to control its own cache fill failures. The total number of allowed attempts to cache fill across this and failover origins is limited to four. The total time allowed for cache fill attempts across this and failover origins can be controlled with maxAttemptsTimeout. The last valid, non-retried response from all origins will be returned to the client. If no origin returns a valid response, an HTTP 502 will be returned to the client. Defaults to 1. Must be a value greater than 0 and less than 4. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/network_services_edge_cache_origin#max_attempts NetworkServicesEdgeCacheOrigin#max_attempts}- Returns:
this
-
originOverrideAction
@Stability(Stable) public NetworkServicesEdgeCacheOriginConfig.Builder originOverrideAction(NetworkServicesEdgeCacheOriginOriginOverrideAction originOverrideAction)
Sets the value ofNetworkServicesEdgeCacheOriginConfig.getOriginOverrideAction()- Parameters:
originOverrideAction- origin_override_action block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/network_services_edge_cache_origin#origin_override_action NetworkServicesEdgeCacheOrigin#origin_override_action}- Returns:
this
-
originRedirect
@Stability(Stable) public NetworkServicesEdgeCacheOriginConfig.Builder originRedirect(NetworkServicesEdgeCacheOriginOriginRedirect originRedirect)
Sets the value ofNetworkServicesEdgeCacheOriginConfig.getOriginRedirect()- Parameters:
originRedirect- origin_redirect block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/network_services_edge_cache_origin#origin_redirect NetworkServicesEdgeCacheOrigin#origin_redirect}- Returns:
this
-
port
@Stability(Stable) public NetworkServicesEdgeCacheOriginConfig.Builder port(Number port)
Sets the value ofNetworkServicesEdgeCacheOriginConfig.getPort()- Parameters:
port- The port to connect to the origin on. Defaults to port 443 for HTTP2 and HTTPS protocols, and port 80 for HTTP. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/network_services_edge_cache_origin#port NetworkServicesEdgeCacheOrigin#port}- Returns:
this
-
project
@Stability(Stable) public NetworkServicesEdgeCacheOriginConfig.Builder project(String project)
Sets the value ofNetworkServicesEdgeCacheOriginConfig.getProject()- Parameters:
project- Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/network_services_edge_cache_origin#project NetworkServicesEdgeCacheOrigin#project}.- Returns:
this
-
protocol
@Stability(Stable) public NetworkServicesEdgeCacheOriginConfig.Builder protocol(String protocol)
Sets the value ofNetworkServicesEdgeCacheOriginConfig.getProtocol()- Parameters:
protocol- The protocol to use to connect to the configured origin. Defaults to HTTP2, and it is strongly recommended that users use HTTP2 for both security & performance. When using HTTP2 or HTTPS as the protocol, a valid, publicly-signed, unexpired TLS (SSL) certificate must be presented by the origin server. Possible values: ["HTTP2", "HTTPS", "HTTP"] Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/network_services_edge_cache_origin#protocol NetworkServicesEdgeCacheOrigin#protocol}- Returns:
this
-
retryConditions
@Stability(Stable) public NetworkServicesEdgeCacheOriginConfig.Builder retryConditions(List<String> retryConditions)
Sets the value ofNetworkServicesEdgeCacheOriginConfig.getRetryConditions()- Parameters:
retryConditions- Specifies one or more retry conditions for the configured origin. If the failure mode during a connection attempt to the origin matches the configured retryCondition(s), the origin request will be retried up to maxAttempts times. The failoverOrigin, if configured, will then be used to satisfy the request. The default retryCondition is "CONNECT_FAILURE". retryConditions apply to this origin, and not subsequent failoverOrigin(s), which may specify their own retryConditions and maxAttempts. Valid values are: * CONNECT_FAILURE: Retry on failures connecting to origins, for example due to connection timeouts. * HTTP_5XX: Retry if the origin responds with any 5xx response code, or if the origin does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams. * GATEWAY_ERROR: Similar to 5xx, but only applies to response codes 502, 503 or 504. * RETRIABLE_4XX: Retry for retriable 4xx response codes, which include HTTP 409 (Conflict) and HTTP 429 (Too Many Requests) * NOT_FOUND: Retry if the origin returns a HTTP 404 (Not Found). This can be useful when generating video content, and the segment is not available yet. * FORBIDDEN: Retry if the origin returns a HTTP 403 (Forbidden). Possible values: ["CONNECT_FAILURE", "HTTP_5XX", "GATEWAY_ERROR", "RETRIABLE_4XX", "NOT_FOUND", "FORBIDDEN"] Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/network_services_edge_cache_origin#retry_conditions NetworkServicesEdgeCacheOrigin#retry_conditions}- Returns:
this
-
timeout
@Stability(Stable) public NetworkServicesEdgeCacheOriginConfig.Builder timeout(NetworkServicesEdgeCacheOriginTimeout timeout)
Sets the value ofNetworkServicesEdgeCacheOriginConfig.getTimeout()- Parameters:
timeout- timeout block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/network_services_edge_cache_origin#timeout NetworkServicesEdgeCacheOrigin#timeout}- Returns:
this
-
timeouts
@Stability(Stable) public NetworkServicesEdgeCacheOriginConfig.Builder timeouts(NetworkServicesEdgeCacheOriginTimeouts timeouts)
Sets the value ofNetworkServicesEdgeCacheOriginConfig.getTimeouts()- Parameters:
timeouts- timeouts block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/network_services_edge_cache_origin#timeouts NetworkServicesEdgeCacheOrigin#timeouts}- Returns:
this
-
connection
@Stability(Experimental) public NetworkServicesEdgeCacheOriginConfig.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 NetworkServicesEdgeCacheOriginConfig.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 NetworkServicesEdgeCacheOriginConfig.Builder count(Number count)
Sets the value ofTerraformMetaArguments.getCount()- Parameters:
count- the value to be set.- Returns:
this
-
count
@Stability(Experimental) public NetworkServicesEdgeCacheOriginConfig.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 NetworkServicesEdgeCacheOriginConfig.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 NetworkServicesEdgeCacheOriginConfig.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 NetworkServicesEdgeCacheOriginConfig.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 NetworkServicesEdgeCacheOriginConfig.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 NetworkServicesEdgeCacheOriginConfig.Builder provisioners(List<? extends Object> provisioners)
Sets the value ofTerraformMetaArguments.getProvisioners()- Parameters:
provisioners- the value to be set.- Returns:
this
-
build
@Stability(Stable) public NetworkServicesEdgeCacheOriginConfig build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<NetworkServicesEdgeCacheOriginConfig>- Returns:
- a new instance of
NetworkServicesEdgeCacheOriginConfig - Throws:
NullPointerException- if any required attribute was not provided
-
-