@Generated(value="jsii-pacmak/1.50.0 (build d1830a4)", date="2022-01-11T17:58:48.807Z") @Stability(value=Stable) public enum FunctionEventType extends Enum<FunctionEventType>
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();
| Enum Constant and Description |
|---|
VIEWER_REQUEST
The viewer-request specifies the incoming request.
|
VIEWER_RESPONSE
The viewer-response specifies the outgoing response.
|
| Modifier and Type | Method and Description |
|---|---|
static FunctionEventType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static FunctionEventType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
@Stability(value=Stable) public static final FunctionEventType VIEWER_REQUEST
@Stability(value=Stable) public static final FunctionEventType VIEWER_RESPONSE
public static FunctionEventType[] values()
for (FunctionEventType c : FunctionEventType.values()) System.out.println(c);
public static FunctionEventType valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2022. All rights reserved.