Interface BehaviorOptions

All Superinterfaces:
AddBehaviorOptions, software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
BehaviorOptions.Jsii$Proxy

@Generated(value="jsii-pacmak/1.112.0 (build de1bc80)", date="2025-07-24T11:33:10.367Z") @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 }"))
         .runtime(FunctionRuntime.JS_2_0)
         .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();