public static final class AddBehaviorOptions.Builder
extends java.lang.Object
AddBehaviorOptions
Constructor and Description |
---|
Builder() |
public AddBehaviorOptions.Builder allowedMethods(AllowedMethods allowedMethods)
AddBehaviorOptions.getAllowedMethods()
allowedMethods
- HTTP methods to allow for this behavior.this
public AddBehaviorOptions.Builder cachedMethods(CachedMethods cachedMethods)
AddBehaviorOptions.getCachedMethods()
cachedMethods
- HTTP methods to cache for this behavior.this
public AddBehaviorOptions.Builder cachePolicy(ICachePolicy cachePolicy)
AddBehaviorOptions.getCachePolicy()
cachePolicy
- The cache policy for this behavior.
The cache policy determines what values are included in the cache key,
and the time-to-live (TTL) values for the cache.this
public AddBehaviorOptions.Builder compress(java.lang.Boolean compress)
AddBehaviorOptions.getCompress()
compress
- Whether you want CloudFront to automatically compress certain files for this cache behavior.
See https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/ServingCompressedFiles.html#compressed-content-cloudfront-file-types
for file types CloudFront will compress.this
public AddBehaviorOptions.Builder edgeLambdas(java.util.List<? extends EdgeLambda> edgeLambdas)
AddBehaviorOptions.getEdgeLambdas()
edgeLambdas
- The Lambda@Edge functions to invoke before serving the contents.this
public AddBehaviorOptions.Builder functionAssociations(java.util.List<? extends FunctionAssociation> functionAssociations)
AddBehaviorOptions.getFunctionAssociations()
functionAssociations
- The CloudFront functions to invoke before serving the contents.this
public AddBehaviorOptions.Builder originRequestPolicy(IOriginRequestPolicy originRequestPolicy)
AddBehaviorOptions.getOriginRequestPolicy()
originRequestPolicy
- The origin request policy for this behavior.
The origin request policy determines which values (e.g., headers, cookies)
are included in requests that CloudFront sends to the origin.this
public AddBehaviorOptions.Builder responseHeadersPolicy(IResponseHeadersPolicy responseHeadersPolicy)
AddBehaviorOptions.getResponseHeadersPolicy()
responseHeadersPolicy
- The response headers policy for this behavior.
The response headers policy determines which headers are included in responsesthis
public AddBehaviorOptions.Builder smoothStreaming(java.lang.Boolean smoothStreaming)
AddBehaviorOptions.getSmoothStreaming()
smoothStreaming
- Set this to true to indicate you want to distribute media files in the Microsoft Smooth Streaming format using this behavior.this
public AddBehaviorOptions.Builder trustedKeyGroups(java.util.List<? extends IKeyGroup> trustedKeyGroups)
AddBehaviorOptions.getTrustedKeyGroups()
trustedKeyGroups
- A list of Key Groups that CloudFront can use to validate signed URLs or signed cookies.this
public AddBehaviorOptions.Builder viewerProtocolPolicy(ViewerProtocolPolicy viewerProtocolPolicy)
AddBehaviorOptions.getViewerProtocolPolicy()
viewerProtocolPolicy
- The protocol that viewers can use to access the files controlled by this behavior.this
public AddBehaviorOptions build()
AddBehaviorOptions
java.lang.NullPointerException
- if any required attribute was not provided