Interface BehaviorOptions
- All Superinterfaces:
AddBehaviorOptions
,software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
BehaviorOptions.Jsii$Proxy
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:43.440Z")
@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
Nested ClassesModifier 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, 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
-