Interface BehaviorOptions
- All Superinterfaces:
AddBehaviorOptions,software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
BehaviorOptions.Jsii$Proxy
@Generated(value="jsii-pacmak/1.89.0 (build 2f74b3e)",
date="2023-10-26T00:56:05.094Z")
@Stability(Stable)
public interface BehaviorOptions
extends software.amazon.jsii.JsiiSerializable, AddBehaviorOptions
Options for creating a new behavior.
Example:
Bucket s3Bucket;
// Add a cloudfront Function to a Distribution
Function cfFunction = Function.Builder.create(this, "Function")
.code(FunctionCode.fromInline("function handler(event) { return event.request }"))
.build();
Distribution.Builder.create(this, "distro")
.defaultBehavior(BehaviorOptions.builder()
.origin(new S3Origin(s3Bucket))
.functionAssociations(List.of(FunctionAssociation.builder()
.function(cfFunction)
.eventType(FunctionEventType.VIEWER_REQUEST)
.build()))
.build())
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forBehaviorOptionsstatic final classAn implementation forBehaviorOptions -
Method Summary
Modifier and TypeMethodDescriptionstatic BehaviorOptions.Builderbuilder()The origin that you want CloudFront to route requests to when they match this behavior.Methods inherited from interface software.amazon.awscdk.services.cloudfront.AddBehaviorOptions
getAllowedMethods, getCachedMethods, getCachePolicy, getCompress, getEdgeLambdas, getFunctionAssociations, getOriginRequestPolicy, getRealtimeLogConfig, getResponseHeadersPolicy, getSmoothStreaming, getTrustedKeyGroups, getViewerProtocolPolicyMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getOrigin
The origin that you want CloudFront to route requests to when they match this behavior. -
builder
- Returns:
- a
BehaviorOptions.BuilderofBehaviorOptions
-