@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-05-19T23:09:30.321Z") @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 © 2023. All rights reserved.