Constructor and Description |
---|
Builder() |
public Behavior.Builder allowedMethods(CloudFrontAllowedMethods allowedMethods)
Behavior.getAllowedMethods()
allowedMethods
- The method this CloudFront distribution responds do.this
public Behavior.Builder cachedMethods(CloudFrontAllowedCachedMethods cachedMethods)
Behavior.getCachedMethods()
cachedMethods
- Which methods are cached by CloudFront by default.this
public Behavior.Builder compress(java.lang.Boolean compress)
Behavior.getCompress()
compress
- If CloudFront should automatically compress some content types.this
public Behavior.Builder defaultTtl(Duration defaultTtl)
Behavior.getDefaultTtl()
defaultTtl
- The default amount of time CloudFront will cache an object.
This value applies only when your custom origin does not add HTTP headers,
such as Cache-Control max-age, Cache-Control s-maxage, and Expires to objects.this
public Behavior.Builder forwardedValues(CfnDistribution.ForwardedValuesProperty forwardedValues)
Behavior.getForwardedValues()
forwardedValues
- The values CloudFront will forward to the origin when making a request.this
public Behavior.Builder functionAssociations(java.util.List<? extends FunctionAssociation> functionAssociations)
Behavior.getFunctionAssociations()
functionAssociations
- The CloudFront functions to invoke before serving the contents.this
public Behavior.Builder isDefaultBehavior(java.lang.Boolean isDefaultBehavior)
Behavior.getIsDefaultBehavior()
isDefaultBehavior
- If this behavior is the default behavior for the distribution.
You must specify exactly one default distribution per CloudFront distribution.
The default behavior is allowed to omit the "path" property.this
public Behavior.Builder lambdaFunctionAssociations(java.util.List<? extends LambdaFunctionAssociation> lambdaFunctionAssociations)
Behavior.getLambdaFunctionAssociations()
lambdaFunctionAssociations
- Declares associated lambda@edge functions for this distribution behaviour.this
public Behavior.Builder maxTtl(Duration maxTtl)
Behavior.getMaxTtl()
maxTtl
- The max amount of time you want objects to stay in the cache before CloudFront queries your origin.this
public Behavior.Builder minTtl(Duration minTtl)
Behavior.getMinTtl()
minTtl
- The minimum amount of time that you want objects to stay in the cache before CloudFront queries your origin.this
public Behavior.Builder pathPattern(java.lang.String pathPattern)
Behavior.getPathPattern()
pathPattern
- The path this behavior responds to.
Required for all non-default behaviors. (The default behavior implicitly has "*" as the path pattern. )this
public Behavior.Builder trustedKeyGroups(java.util.List<? extends IKeyGroup> trustedKeyGroups)
Behavior.getTrustedKeyGroups()
trustedKeyGroups
- A list of Key Groups that CloudFront can use to validate signed URLs or signed cookies.this
@Deprecated public Behavior.Builder trustedSigners(java.util.List<java.lang.String> trustedSigners)
Behavior.getTrustedSigners()
trustedSigners
- Trusted signers is how CloudFront allows you to serve private content.
The signers are the account IDs that are allowed to sign cookies/presigned URLs for this distribution.
If you pass a non empty value, all requests for this behavior must be signed (no public access will be allowed)
this
public Behavior.Builder viewerProtocolPolicy(ViewerProtocolPolicy viewerProtocolPolicy)
Behavior.getViewerProtocolPolicy()
viewerProtocolPolicy
- The viewer policy for this behavior.this