Interface AddBehaviorOptions
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Subinterfaces:
BehaviorOptions
- All Known Implementing Classes:
AddBehaviorOptions.Jsii$Proxy,BehaviorOptions.Jsii$Proxy
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());
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forAddBehaviorOptionsstatic final classAn implementation forAddBehaviorOptions -
Method Summary
Modifier and TypeMethodDescriptionstatic AddBehaviorOptions.Builderbuilder()default AllowedMethodsHTTP methods to allow for this behavior.default CachedMethodsHTTP methods to cache for this behavior.default ICachePolicyRefThe cache policy for this behavior.default BooleanWhether you want CloudFront to automatically compress certain files for this cache behavior.default List<EdgeLambda> The Lambda@Edge functions to invoke before serving the contents.default BooleanEnables your CloudFront distribution to receive gRPC requests and to proxy them directly to your origins.default List<FunctionAssociation> The CloudFront functions to invoke before serving the contents.default IOriginRequestPolicyRefThe origin request policy for this behavior.default IRealtimeLogConfigRefThe real-time log configuration to be attached to this cache behavior.default IResponseHeadersPolicyRefThe response headers policy for this behavior.default BooleanSet this to true to indicate you want to distribute media files in the Microsoft Smooth Streaming format using this behavior.default List<IKeyGroupRef> A list of Key Groups that CloudFront can use to validate signed URLs or signed cookies.default ViewerProtocolPolicyThe protocol that viewers can use to access the files controlled by this behavior.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getAllowedMethods
HTTP methods to allow for this behavior.Default: AllowedMethods.ALLOW_GET_HEAD
-
getCachedMethods
HTTP methods to cache for this behavior.Default: CachedMethods.CACHE_GET_HEAD
-
getCachePolicy
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.
Default: CachePolicy.CACHING_OPTIMIZED
- See Also:
-
getCompress
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.
Default: true
-
getEdgeLambdas
The Lambda@Edge functions to invoke before serving the contents.Default: - no Lambda functions will be invoked
- See Also:
-
getEnableGrpc
Enables your CloudFront distribution to receive gRPC requests and to proxy them directly to your origins.If the
enableGrpcis set to true, the following restrictions apply:- The
allowedMethodsproperty must beAllowedMethods.ALLOW_ALLto include POST method because gRPC only supports POST method. - The
httpVersionproperty must beHttpVersion.HTTP2orHttpVersion.HTTP2_AND_3because gRPC only supports versions including HTTP/2. - The
edgeLambdasproperty can't be specified because gRPC is not supported with Lambda@Edge.
Default: false
- See Also:
- The
-
getFunctionAssociations
The CloudFront functions to invoke before serving the contents.Default: - no functions will be invoked
-
getOriginRequestPolicy
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.
Default: - none
-
getRealtimeLogConfig
The real-time log configuration to be attached to this cache behavior.Default: - none
-
getResponseHeadersPolicy
The response headers policy for this behavior.The response headers policy determines which headers are included in responses
Default: - none
-
getSmoothStreaming
Set this to true to indicate you want to distribute media files in the Microsoft Smooth Streaming format using this behavior.Default: false
-
getTrustedKeyGroups
A list of Key Groups that CloudFront can use to validate signed URLs or signed cookies.Default: - no KeyGroups are associated with cache behavior
- See Also:
-
getViewerProtocolPolicy
The protocol that viewers can use to access the files controlled by this behavior.Default: ViewerProtocolPolicy.ALLOW_ALL
-
builder
- Returns:
- a
AddBehaviorOptions.BuilderofAddBehaviorOptions
-