@Generated(value="jsii-pacmak/1.50.0 (build d1830a4)", date="2022-01-11T17:58:48.607Z") @Stability(value=Stable) public interface AddBehaviorOptions extends software.amazon.jsii.JsiiSerializable
Example:
// Add a behavior to a Distribution after initial creation.
Bucket myBucket;
Distribution myWebDistribution;
myWebDistribution.addBehavior("/images/*.jpg", new S3Origin(myBucket), AddBehaviorOptions.builder()
.viewerProtocolPolicy(ViewerProtocolPolicy.REDIRECT_TO_HTTPS)
.build());
| Modifier and Type | Interface and Description |
|---|---|
static class |
AddBehaviorOptions.Builder
A builder for
AddBehaviorOptions |
static class |
AddBehaviorOptions.Jsii$Proxy
An implementation for
AddBehaviorOptions |
| Modifier and Type | Method and Description |
|---|---|
static AddBehaviorOptions.Builder |
builder() |
default AllowedMethods |
getAllowedMethods()
HTTP methods to allow for this behavior.
|
default CachedMethods |
getCachedMethods()
HTTP methods to cache for this behavior.
|
default ICachePolicy |
getCachePolicy()
The cache policy for this behavior.
|
default Boolean |
getCompress()
Whether you want CloudFront to automatically compress certain files for this cache behavior.
|
default List<EdgeLambda> |
getEdgeLambdas()
The Lambda@Edge functions to invoke before serving the contents.
|
default List<FunctionAssociation> |
getFunctionAssociations()
The CloudFront functions to invoke before serving the contents.
|
default IOriginRequestPolicy |
getOriginRequestPolicy()
The origin request policy for this behavior.
|
default IResponseHeadersPolicy |
getResponseHeadersPolicy()
The response headers policy for this behavior.
|
default Boolean |
getSmoothStreaming()
Set this to true to indicate you want to distribute media files in the Microsoft Smooth Streaming format using this behavior.
|
default List<IKeyGroup> |
getTrustedKeyGroups()
A list of Key Groups that CloudFront can use to validate signed URLs or signed cookies.
|
default ViewerProtocolPolicy |
getViewerProtocolPolicy()
The protocol that viewers can use to access the files controlled by this behavior.
|
@Stability(value=Stable) @Nullable default AllowedMethods getAllowedMethods()
Default: AllowedMethods.ALLOW_GET_HEAD
@Stability(value=Stable) @Nullable default CachedMethods getCachedMethods()
Default: CachedMethods.CACHE_GET_HEAD
@Stability(value=Stable) @Nullable default ICachePolicy getCachePolicy()
The cache policy determines what values are included in the cache key, and the time-to-live (TTL) values for the cache.
Default: CachePolicy.CACHING_OPTIMIZED
https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html.@Stability(value=Stable) @Nullable default Boolean getCompress()
See https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/ServingCompressedFiles.html#compressed-content-cloudfront-file-types for file types CloudFront will compress.
Default: true
@Stability(value=Stable) @Nullable default List<EdgeLambda> getEdgeLambdas()
Default: - no Lambda functions will be invoked
https://aws.amazon.com/lambda/edge@Stability(value=Stable) @Nullable default List<FunctionAssociation> getFunctionAssociations()
Default: - no functions will be invoked
@Stability(value=Stable) @Nullable default IOriginRequestPolicy getOriginRequestPolicy()
The origin request policy determines which values (e.g., headers, cookies) are included in requests that CloudFront sends to the origin.
Default: - none
@Stability(value=Stable) @Nullable default IResponseHeadersPolicy getResponseHeadersPolicy()
The response headers policy determines which headers are included in responses
Default: - none
@Stability(value=Stable) @Nullable default Boolean getSmoothStreaming()
Default: false
@Stability(value=Stable) @Nullable default List<IKeyGroup> getTrustedKeyGroups()
Default: - no KeyGroups are associated with cache behavior
https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html@Stability(value=Stable) @Nullable default ViewerProtocolPolicy getViewerProtocolPolicy()
Default: ViewerProtocolPolicy.ALLOW_ALL
@Stability(value=Stable) static AddBehaviorOptions.Builder builder()
AddBehaviorOptions.Builder of AddBehaviorOptionsCopyright © 2022. All rights reserved.