Interface BehaviorOptions
- All Superinterfaces:
AddBehaviorOptions
,software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
BehaviorOptions.Jsii$Proxy
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-11-06T23:25:05.426Z")
@Stability(Stable)
public interface BehaviorOptions
extends software.amazon.jsii.JsiiSerializable, AddBehaviorOptions
Options for creating a new behavior.
Example:
// Adding an existing Lambda@Edge function created in a different stack // to a CloudFront distribution. Bucket s3Bucket; IVersion functionVersion = Version.fromVersionArn(this, "Version", "arn:aws:lambda:us-east-1:123456789012:function:functionName:1"); Distribution.Builder.create(this, "distro") .defaultBehavior(BehaviorOptions.builder() .origin(new S3Origin(s3Bucket)) .edgeLambdas(List.of(EdgeLambda.builder() .functionVersion(functionVersion) .eventType(LambdaEdgeEventType.VIEWER_REQUEST) .build())) .build()) .build();
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forBehaviorOptions
static final class
An implementation forBehaviorOptions
-
Method Summary
Modifier and TypeMethodDescriptionstatic BehaviorOptions.Builder
builder()
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, getViewerProtocolPolicy
Methods 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.Builder
ofBehaviorOptions
-