public static final class CfnCachePolicy.CachePolicyConfigProperty.Builder
extends java.lang.Object
CfnCachePolicy.CachePolicyConfigProperty
Constructor and Description |
---|
Builder() |
public CfnCachePolicy.CachePolicyConfigProperty.Builder defaultTtl(java.lang.Number defaultTtl)
CfnCachePolicy.CachePolicyConfigProperty.getDefaultTtl()
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. This parameter is required.
CloudFront uses this value as the object’s time to live (TTL) only when the origin does not send Cache-Control
or Expires
headers 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 MinTTL
is more than 86400 seconds, then the default value for this field is the same as the value of MinTTL
.
this
public CfnCachePolicy.CachePolicyConfigProperty.Builder maxTtl(java.lang.Number maxTtl)
CfnCachePolicy.CachePolicyConfigProperty.getMaxTtl()
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. This parameter is required.
CloudFront uses this value only when the origin sends Cache-Control
or Expires
headers 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 MinTTL
or DefaultTTL
is more than 31536000 seconds, then the default value for this field is the same as the value of DefaultTTL
.
this
public CfnCachePolicy.CachePolicyConfigProperty.Builder minTtl(java.lang.Number minTtl)
CfnCachePolicy.CachePolicyConfigProperty.getMinTtl()
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. This parameter is required.
For more information, see Managing How Long Content Stays in an Edge Cache (Expiration) in the Amazon CloudFront Developer Guide .this
public CfnCachePolicy.CachePolicyConfigProperty.Builder name(java.lang.String name)
CfnCachePolicy.CachePolicyConfigProperty.getName()
name
- A unique name to identify the cache policy. This parameter is required.this
public CfnCachePolicy.CachePolicyConfigProperty.Builder parametersInCacheKeyAndForwardedToOrigin(IResolvable parametersInCacheKeyAndForwardedToOrigin)
CfnCachePolicy.CachePolicyConfigProperty.getParametersInCacheKeyAndForwardedToOrigin()
parametersInCacheKeyAndForwardedToOrigin
- The HTTP headers, cookies, and URL query strings to include in the cache key. This parameter is required.
The values included in the cache key are automatically included in requests that CloudFront sends to the origin.this
public CfnCachePolicy.CachePolicyConfigProperty.Builder parametersInCacheKeyAndForwardedToOrigin(CfnCachePolicy.ParametersInCacheKeyAndForwardedToOriginProperty parametersInCacheKeyAndForwardedToOrigin)
CfnCachePolicy.CachePolicyConfigProperty.getParametersInCacheKeyAndForwardedToOrigin()
parametersInCacheKeyAndForwardedToOrigin
- The HTTP headers, cookies, and URL query strings to include in the cache key. This parameter is required.
The values included in the cache key are automatically included in requests that CloudFront sends to the origin.this
public CfnCachePolicy.CachePolicyConfigProperty.Builder comment(java.lang.String comment)
CfnCachePolicy.CachePolicyConfigProperty.getComment()
comment
- A comment to describe the cache policy.
The comment cannot be longer than 128 characters.this
public CfnCachePolicy.CachePolicyConfigProperty build()
CfnCachePolicy.CachePolicyConfigProperty
java.lang.NullPointerException
- if any required attribute was not provided