Class ComputeBackendServiceCdnPolicy.Builder
- java.lang.Object
-
- com.hashicorp.cdktf.providers.google.compute_backend_service.ComputeBackendServiceCdnPolicy.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<ComputeBackendServiceCdnPolicy>
- Enclosing interface:
- ComputeBackendServiceCdnPolicy
@Stability(Stable) public static final class ComputeBackendServiceCdnPolicy.Builder extends Object implements software.amazon.jsii.Builder<ComputeBackendServiceCdnPolicy>
A builder forComputeBackendServiceCdnPolicy
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
-
-
-
Method Detail
-
bypassCacheOnRequestHeaders
@Stability(Stable) public ComputeBackendServiceCdnPolicy.Builder bypassCacheOnRequestHeaders(com.hashicorp.cdktf.IResolvable bypassCacheOnRequestHeaders)
Sets the value ofComputeBackendServiceCdnPolicy.getBypassCacheOnRequestHeaders()- Parameters:
bypassCacheOnRequestHeaders- bypass_cache_on_request_headers block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_backend_service#bypass_cache_on_request_headers ComputeBackendService#bypass_cache_on_request_headers}- Returns:
this
-
bypassCacheOnRequestHeaders
@Stability(Stable) public ComputeBackendServiceCdnPolicy.Builder bypassCacheOnRequestHeaders(List<? extends ComputeBackendServiceCdnPolicyBypassCacheOnRequestHeaders> bypassCacheOnRequestHeaders)
Sets the value ofComputeBackendServiceCdnPolicy.getBypassCacheOnRequestHeaders()- Parameters:
bypassCacheOnRequestHeaders- bypass_cache_on_request_headers block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_backend_service#bypass_cache_on_request_headers ComputeBackendService#bypass_cache_on_request_headers}- Returns:
this
-
cacheKeyPolicy
@Stability(Stable) public ComputeBackendServiceCdnPolicy.Builder cacheKeyPolicy(ComputeBackendServiceCdnPolicyCacheKeyPolicy cacheKeyPolicy)
Sets the value ofComputeBackendServiceCdnPolicy.getCacheKeyPolicy()- Parameters:
cacheKeyPolicy- cache_key_policy block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_backend_service#cache_key_policy ComputeBackendService#cache_key_policy}- Returns:
this
-
cacheMode
@Stability(Stable) public ComputeBackendServiceCdnPolicy.Builder cacheMode(String cacheMode)
Sets the value ofComputeBackendServiceCdnPolicy.getCacheMode()- Parameters:
cacheMode- Specifies the cache setting for all responses from this backend. The possible values are: USE_ORIGIN_HEADERS, FORCE_CACHE_ALL and CACHE_ALL_STATIC Possible values: ["USE_ORIGIN_HEADERS", "FORCE_CACHE_ALL", "CACHE_ALL_STATIC"] Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_backend_service#cache_mode ComputeBackendService#cache_mode}- Returns:
this
-
clientTtl
@Stability(Stable) public ComputeBackendServiceCdnPolicy.Builder clientTtl(Number clientTtl)
Sets the value ofComputeBackendServiceCdnPolicy.getClientTtl()- Parameters:
clientTtl- Specifies the maximum allowed TTL for cached content served by this origin. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_backend_service#client_ttl ComputeBackendService#client_ttl}- Returns:
this
-
defaultTtl
@Stability(Stable) public ComputeBackendServiceCdnPolicy.Builder defaultTtl(Number defaultTtl)
Sets the value ofComputeBackendServiceCdnPolicy.getDefaultTtl()- Parameters:
defaultTtl- Specifies the default TTL for cached content served by this origin for responses that do not have an existing valid TTL (max-age or s-max-age). Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_backend_service#default_ttl ComputeBackendService#default_ttl}- Returns:
this
-
maxTtl
@Stability(Stable) public ComputeBackendServiceCdnPolicy.Builder maxTtl(Number maxTtl)
Sets the value ofComputeBackendServiceCdnPolicy.getMaxTtl()- Parameters:
maxTtl- Specifies the maximum allowed TTL for cached content served by this origin. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_backend_service#max_ttl ComputeBackendService#max_ttl}- Returns:
this
-
negativeCaching
@Stability(Stable) public ComputeBackendServiceCdnPolicy.Builder negativeCaching(Boolean negativeCaching)
Sets the value ofComputeBackendServiceCdnPolicy.getNegativeCaching()- Parameters:
negativeCaching- Negative caching allows per-status code TTLs to be set, in order to apply fine-grained caching for common errors or redirects. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_backend_service#negative_caching ComputeBackendService#negative_caching}- Returns:
this
-
negativeCaching
@Stability(Stable) public ComputeBackendServiceCdnPolicy.Builder negativeCaching(com.hashicorp.cdktf.IResolvable negativeCaching)
Sets the value ofComputeBackendServiceCdnPolicy.getNegativeCaching()- Parameters:
negativeCaching- Negative caching allows per-status code TTLs to be set, in order to apply fine-grained caching for common errors or redirects. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_backend_service#negative_caching ComputeBackendService#negative_caching}- Returns:
this
-
negativeCachingPolicy
@Stability(Stable) public ComputeBackendServiceCdnPolicy.Builder negativeCachingPolicy(com.hashicorp.cdktf.IResolvable negativeCachingPolicy)
Sets the value ofComputeBackendServiceCdnPolicy.getNegativeCachingPolicy()- Parameters:
negativeCachingPolicy- negative_caching_policy block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_backend_service#negative_caching_policy ComputeBackendService#negative_caching_policy}- Returns:
this
-
negativeCachingPolicy
@Stability(Stable) public ComputeBackendServiceCdnPolicy.Builder negativeCachingPolicy(List<? extends ComputeBackendServiceCdnPolicyNegativeCachingPolicy> negativeCachingPolicy)
Sets the value ofComputeBackendServiceCdnPolicy.getNegativeCachingPolicy()- Parameters:
negativeCachingPolicy- negative_caching_policy block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_backend_service#negative_caching_policy ComputeBackendService#negative_caching_policy}- Returns:
this
-
serveWhileStale
@Stability(Stable) public ComputeBackendServiceCdnPolicy.Builder serveWhileStale(Number serveWhileStale)
Sets the value ofComputeBackendServiceCdnPolicy.getServeWhileStale()- Parameters:
serveWhileStale- Serve existing content from the cache (if available) when revalidating content with the origin, or when an error is encountered when refreshing the cache. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_backend_service#serve_while_stale ComputeBackendService#serve_while_stale}- Returns:
this
-
signedUrlCacheMaxAgeSec
@Stability(Stable) public ComputeBackendServiceCdnPolicy.Builder signedUrlCacheMaxAgeSec(Number signedUrlCacheMaxAgeSec)
Sets the value ofComputeBackendServiceCdnPolicy.getSignedUrlCacheMaxAgeSec()- Parameters:
signedUrlCacheMaxAgeSec- Maximum number of seconds the response to a signed URL request will be considered fresh, defaults to 1hr (3600s). After this time period, the response will be revalidated before being served. When serving responses to signed URL requests, Cloud CDN will internally behave as though all responses from this backend had a "Cache-Control: public, max-age=[TTL]" header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_backend_service#signed_url_cache_max_age_sec ComputeBackendService#signed_url_cache_max_age_sec}- Returns:
this
-
build
@Stability(Stable) public ComputeBackendServiceCdnPolicy build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<ComputeBackendServiceCdnPolicy>- Returns:
- a new instance of
ComputeBackendServiceCdnPolicy - Throws:
NullPointerException- if any required attribute was not provided
-
-