Class AddBehaviorOptions.Builder
java.lang.Object
software.amazon.awscdk.services.cloudfront.AddBehaviorOptions.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<AddBehaviorOptions>
- Enclosing interface:
AddBehaviorOptions
@Stability(Stable)
public static final class AddBehaviorOptions.Builder
extends Object
implements software.amazon.jsii.Builder<AddBehaviorOptions>
A builder for
AddBehaviorOptions
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionallowedMethods
(AllowedMethods allowedMethods) Sets the value ofAddBehaviorOptions.getAllowedMethods()
build()
Builds the configured instance.cachedMethods
(CachedMethods cachedMethods) Sets the value ofAddBehaviorOptions.getCachedMethods()
cachePolicy
(ICachePolicy cachePolicy) Sets the value ofAddBehaviorOptions.getCachePolicy()
Sets the value ofAddBehaviorOptions.getCompress()
edgeLambdas
(List<? extends EdgeLambda> edgeLambdas) Sets the value ofAddBehaviorOptions.getEdgeLambdas()
functionAssociations
(List<? extends FunctionAssociation> functionAssociations) Sets the value ofAddBehaviorOptions.getFunctionAssociations()
originRequestPolicy
(IOriginRequestPolicy originRequestPolicy) Sets the value ofAddBehaviorOptions.getOriginRequestPolicy()
responseHeadersPolicy
(IResponseHeadersPolicy responseHeadersPolicy) Sets the value ofAddBehaviorOptions.getResponseHeadersPolicy()
smoothStreaming
(Boolean smoothStreaming) Sets the value ofAddBehaviorOptions.getSmoothStreaming()
trustedKeyGroups
(List<? extends IKeyGroup> trustedKeyGroups) Sets the value ofAddBehaviorOptions.getTrustedKeyGroups()
viewerProtocolPolicy
(ViewerProtocolPolicy viewerProtocolPolicy) Sets the value ofAddBehaviorOptions.getViewerProtocolPolicy()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
allowedMethods
Sets the value ofAddBehaviorOptions.getAllowedMethods()
- Parameters:
allowedMethods
- HTTP methods to allow for this behavior.- Returns:
this
-
cachedMethods
Sets the value ofAddBehaviorOptions.getCachedMethods()
- Parameters:
cachedMethods
- HTTP methods to cache for this behavior.- Returns:
this
-
cachePolicy
Sets the value ofAddBehaviorOptions.getCachePolicy()
- Parameters:
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.- Returns:
this
-
compress
Sets the value ofAddBehaviorOptions.getCompress()
- Parameters:
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.- Returns:
this
-
edgeLambdas
@Stability(Stable) public AddBehaviorOptions.Builder edgeLambdas(List<? extends EdgeLambda> edgeLambdas) Sets the value ofAddBehaviorOptions.getEdgeLambdas()
- Parameters:
edgeLambdas
- The Lambda@Edge functions to invoke before serving the contents.- Returns:
this
-
functionAssociations
@Stability(Stable) public AddBehaviorOptions.Builder functionAssociations(List<? extends FunctionAssociation> functionAssociations) Sets the value ofAddBehaviorOptions.getFunctionAssociations()
- Parameters:
functionAssociations
- The CloudFront functions to invoke before serving the contents.- Returns:
this
-
originRequestPolicy
@Stability(Stable) public AddBehaviorOptions.Builder originRequestPolicy(IOriginRequestPolicy originRequestPolicy) Sets the value ofAddBehaviorOptions.getOriginRequestPolicy()
- Parameters:
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.- Returns:
this
-
responseHeadersPolicy
@Stability(Stable) public AddBehaviorOptions.Builder responseHeadersPolicy(IResponseHeadersPolicy responseHeadersPolicy) Sets the value ofAddBehaviorOptions.getResponseHeadersPolicy()
- Parameters:
responseHeadersPolicy
- The response headers policy for this behavior. The response headers policy determines which headers are included in responses- Returns:
this
-
smoothStreaming
Sets the value ofAddBehaviorOptions.getSmoothStreaming()
- Parameters:
smoothStreaming
- Set this to true to indicate you want to distribute media files in the Microsoft Smooth Streaming format using this behavior.- Returns:
this
-
trustedKeyGroups
@Stability(Stable) public AddBehaviorOptions.Builder trustedKeyGroups(List<? extends IKeyGroup> trustedKeyGroups) Sets the value ofAddBehaviorOptions.getTrustedKeyGroups()
- Parameters:
trustedKeyGroups
- A list of Key Groups that CloudFront can use to validate signed URLs or signed cookies.- Returns:
this
-
viewerProtocolPolicy
@Stability(Stable) public AddBehaviorOptions.Builder viewerProtocolPolicy(ViewerProtocolPolicy viewerProtocolPolicy) Sets the value ofAddBehaviorOptions.getViewerProtocolPolicy()
- Parameters:
viewerProtocolPolicy
- The protocol that viewers can use to access the files controlled by this behavior.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<AddBehaviorOptions>
- Returns:
- a new instance of
AddBehaviorOptions
- Throws:
NullPointerException
- if any required attribute was not provided
-