Class CfnCachePolicyPropsMixin.CachePolicyConfigProperty.Builder
java.lang.Object
software.amazon.awscdk.cfnpropertymixins.services.cloudfront.CfnCachePolicyPropsMixin.CachePolicyConfigProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnCachePolicyPropsMixin.CachePolicyConfigProperty>
- Enclosing interface:
CfnCachePolicyPropsMixin.CachePolicyConfigProperty
@Stability(Stable)
public static final class CfnCachePolicyPropsMixin.CachePolicyConfigProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnCachePolicyPropsMixin.CachePolicyConfigProperty>
A builder for
CfnCachePolicyPropsMixin.CachePolicyConfigProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.Sets the value ofCfnCachePolicyPropsMixin.CachePolicyConfigProperty.getComment()defaultTtl(Number defaultTtl) Sets the value ofCfnCachePolicyPropsMixin.CachePolicyConfigProperty.getDefaultTtl()Sets the value ofCfnCachePolicyPropsMixin.CachePolicyConfigProperty.getMaxTtl()Sets the value ofCfnCachePolicyPropsMixin.CachePolicyConfigProperty.getMinTtl()Sets the value ofCfnCachePolicyPropsMixin.CachePolicyConfigProperty.getName()parametersInCacheKeyAndForwardedToOrigin(CfnCachePolicyPropsMixin.ParametersInCacheKeyAndForwardedToOriginProperty parametersInCacheKeyAndForwardedToOrigin) parametersInCacheKeyAndForwardedToOrigin(IResolvable parametersInCacheKeyAndForwardedToOrigin)
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
comment
@Stability(Stable) public CfnCachePolicyPropsMixin.CachePolicyConfigProperty.Builder comment(String comment) Sets the value ofCfnCachePolicyPropsMixin.CachePolicyConfigProperty.getComment()- Parameters:
comment- A comment to describe the cache policy. The comment cannot be longer than 128 characters.- Returns:
this
-
defaultTtl
@Stability(Stable) public CfnCachePolicyPropsMixin.CachePolicyConfigProperty.Builder defaultTtl(Number defaultTtl) Sets the value ofCfnCachePolicyPropsMixin.CachePolicyConfigProperty.getDefaultTtl()- Parameters:
defaultTtl- The default amount of time, in seconds, that you want objects to stay in the CloudFront cache before CloudFront sends another request to the origin to see if the object has been updated. CloudFront uses this value as the object's time to live (TTL) only when the origin does not sendCache-ControlorExpiresheaders with the object. For more information, see Managing How Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront Developer Guide .The default value for this field is 86400 seconds (one day). If the value of
MinTTLis more than 86400 seconds, then the default value for this field is the same as the value ofMinTTL.- Returns:
this
-
maxTtl
@Stability(Stable) public CfnCachePolicyPropsMixin.CachePolicyConfigProperty.Builder maxTtl(Number maxTtl) Sets the value ofCfnCachePolicyPropsMixin.CachePolicyConfigProperty.getMaxTtl()- Parameters:
maxTtl- The maximum amount of time, in seconds, that objects stay in the CloudFront cache before CloudFront sends another request to the origin to see if the object has been updated. CloudFront uses this value only when the origin sendsCache-ControlorExpiresheaders with the object. For more information, see Managing How Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront Developer Guide .The default value for this field is 31536000 seconds (one year). If the value of
MinTTLorDefaultTTLis more than 31536000 seconds, then the default value for this field is the same as the value ofDefaultTTL.- Returns:
this
-
minTtl
@Stability(Stable) public CfnCachePolicyPropsMixin.CachePolicyConfigProperty.Builder minTtl(Number minTtl) Sets the value ofCfnCachePolicyPropsMixin.CachePolicyConfigProperty.getMinTtl()- Parameters:
minTtl- The minimum amount of time, in seconds, that you want objects to stay in the CloudFront cache before CloudFront sends another request to the origin to see if the object has been updated. For more information, see Managing How Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront Developer Guide .- Returns:
this
-
name
@Stability(Stable) public CfnCachePolicyPropsMixin.CachePolicyConfigProperty.Builder name(String name) Sets the value ofCfnCachePolicyPropsMixin.CachePolicyConfigProperty.getName()- Parameters:
name- A unique name to identify the cache policy.- Returns:
this
-
parametersInCacheKeyAndForwardedToOrigin
@Stability(Stable) public CfnCachePolicyPropsMixin.CachePolicyConfigProperty.Builder parametersInCacheKeyAndForwardedToOrigin(IResolvable parametersInCacheKeyAndForwardedToOrigin) Sets the value ofCfnCachePolicyPropsMixin.CachePolicyConfigProperty.getParametersInCacheKeyAndForwardedToOrigin()- Parameters:
parametersInCacheKeyAndForwardedToOrigin- The HTTP headers, cookies, and URL query strings to include in the cache key. The values included in the cache key are also included in requests that CloudFront sends to the origin.- Returns:
this
-
parametersInCacheKeyAndForwardedToOrigin
@Stability(Stable) public CfnCachePolicyPropsMixin.CachePolicyConfigProperty.Builder parametersInCacheKeyAndForwardedToOrigin(CfnCachePolicyPropsMixin.ParametersInCacheKeyAndForwardedToOriginProperty parametersInCacheKeyAndForwardedToOrigin) Sets the value ofCfnCachePolicyPropsMixin.CachePolicyConfigProperty.getParametersInCacheKeyAndForwardedToOrigin()- Parameters:
parametersInCacheKeyAndForwardedToOrigin- The HTTP headers, cookies, and URL query strings to include in the cache key. The values included in the cache key are also included in requests that CloudFront sends to the origin.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnCachePolicyPropsMixin.CachePolicyConfigProperty>- Returns:
- a new instance of
CfnCachePolicyPropsMixin.CachePolicyConfigProperty - Throws:
NullPointerException- if any required attribute was not provided
-