@Generated(value="jsii-pacmak/1.73.0 (build 6faeda3)", date="2023-01-31T18:36:57.079Z") public enum FunctionEventType extends java.lang.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(java.lang.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.
|
public static final FunctionEventType VIEWER_REQUEST
public static final FunctionEventType VIEWER_RESPONSE
public static FunctionEventType[] values()
for (FunctionEventType c : FunctionEventType.values()) System.out.println(c);
public static FunctionEventType valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null