Class CfnDistribution.FunctionAssociationProperty.Builder
java.lang.Object
software.amazon.awscdk.services.cloudfront.CfnDistribution.FunctionAssociationProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnDistribution.FunctionAssociationProperty>
- Enclosing interface:
CfnDistribution.FunctionAssociationProperty
@Stability(Stable)
public static final class CfnDistribution.FunctionAssociationProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnDistribution.FunctionAssociationProperty>
A builder for
CfnDistribution.FunctionAssociationProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.Sets the value ofCfnDistribution.FunctionAssociationProperty.getEventType()functionArn(String functionArn) Sets the value ofCfnDistribution.FunctionAssociationProperty.getFunctionArn()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
eventType
@Stability(Stable) public CfnDistribution.FunctionAssociationProperty.Builder eventType(String eventType) Sets the value ofCfnDistribution.FunctionAssociationProperty.getEventType()- Parameters:
eventType- The event type of the function, eitherviewer-requestorviewer-response. You cannot use origin-facing event types (origin-requestandorigin-response) with a CloudFront function.- Returns:
this
-
functionArn
@Stability(Stable) public CfnDistribution.FunctionAssociationProperty.Builder functionArn(String functionArn) Sets the value ofCfnDistribution.FunctionAssociationProperty.getFunctionArn()- Parameters:
functionArn- The Amazon Resource Name (ARN) of the function.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnDistribution.FunctionAssociationProperty>- Returns:
- a new instance of
CfnDistribution.FunctionAssociationProperty - Throws:
NullPointerException- if any required attribute was not provided
-