Class EdgeLambda.Builder
java.lang.Object
software.amazon.awscdk.services.cloudfront.EdgeLambda.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<EdgeLambda>
- Enclosing interface:
- EdgeLambda
@Stability(Stable)
public static final class EdgeLambda.Builder
extends Object
implements software.amazon.jsii.Builder<EdgeLambda>
A builder for
EdgeLambda
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.eventType
(LambdaEdgeEventType eventType) Sets the value ofEdgeLambda.getEventType()
functionVersion
(IVersion functionVersion) Sets the value ofEdgeLambda.getFunctionVersion()
includeBody
(Boolean includeBody) Sets the value ofEdgeLambda.getIncludeBody()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
eventType
Sets the value ofEdgeLambda.getEventType()
- Parameters:
eventType
- The type of event in response to which should the function be invoked. This parameter is required.- Returns:
this
-
functionVersion
Sets the value ofEdgeLambda.getFunctionVersion()
- Parameters:
functionVersion
- The version of the Lambda function that will be invoked. This parameter is required. Note: it's not possible to use the '$LATEST' function version for Lambda@Edge!- Returns:
this
-
includeBody
Sets the value ofEdgeLambda.getIncludeBody()
- Parameters:
includeBody
- Allows a Lambda function to have read access to the body content. Only valid for "request" event types (ORIGIN_REQUEST
orVIEWER_REQUEST
). See https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-include-body-access.html- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<EdgeLambda>
- Returns:
- a new instance of
EdgeLambda
- Throws:
NullPointerException
- if any required attribute was not provided
-