@Generated(value="jsii-pacmak/1.50.0 (build d1830a4)", date="2022-01-11T17:58:48.613Z") @Stability(value=Stable) public interface BehaviorOptions extends software.amazon.jsii.JsiiSerializable, AddBehaviorOptions
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();
| Modifier and Type | Interface and Description |
|---|---|
static class |
BehaviorOptions.Builder
A builder for
BehaviorOptions |
static class |
BehaviorOptions.Jsii$Proxy
An implementation for
BehaviorOptions |
| Modifier and Type | Method and Description |
|---|---|
static BehaviorOptions.Builder |
builder() |
IOrigin |
getOrigin()
The origin that you want CloudFront to route requests to when they match this behavior.
|
getAllowedMethods, getCachedMethods, getCachePolicy, getCompress, getEdgeLambdas, getFunctionAssociations, getOriginRequestPolicy, getResponseHeadersPolicy, getSmoothStreaming, getTrustedKeyGroups, getViewerProtocolPolicy@Stability(value=Stable) @NotNull IOrigin getOrigin()
@Stability(value=Stable) static BehaviorOptions.Builder builder()
builder in interface AddBehaviorOptionsBehaviorOptions.Builder of BehaviorOptionsCopyright © 2022. All rights reserved.