Class CfnFunctionProps.Builder
java.lang.Object
software.amazon.awscdk.services.cloudfront.CfnFunctionProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnFunctionProps>
- Enclosing interface:
- CfnFunctionProps
@Stability(Stable)
public static final class CfnFunctionProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnFunctionProps>
A builder for
CfnFunctionProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionautoPublish(Boolean autoPublish) Sets the value ofCfnFunctionProps.getAutoPublish()autoPublish(IResolvable autoPublish) Sets the value ofCfnFunctionProps.getAutoPublish()build()Builds the configured instance.functionCode(String functionCode) Sets the value ofCfnFunctionProps.getFunctionCode()functionConfig(IResolvable functionConfig) Sets the value ofCfnFunctionProps.getFunctionConfig()functionConfig(CfnFunction.FunctionConfigProperty functionConfig) Sets the value ofCfnFunctionProps.getFunctionConfig()functionMetadata(IResolvable functionMetadata) Sets the value ofCfnFunctionProps.getFunctionMetadata()functionMetadata(CfnFunction.FunctionMetadataProperty functionMetadata) Sets the value ofCfnFunctionProps.getFunctionMetadata()Sets the value ofCfnFunctionProps.getName()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
functionCode
Sets the value ofCfnFunctionProps.getFunctionCode()- Parameters:
functionCode- The function code. This parameter is required. For more information about writing a CloudFront function, see Writing function code for CloudFront Functions in the Amazon CloudFront Developer Guide .- Returns:
this
-
functionConfig
Sets the value ofCfnFunctionProps.getFunctionConfig()- Parameters:
functionConfig- Contains configuration information about a CloudFront function. This parameter is required.- Returns:
this
-
functionConfig
@Stability(Stable) public CfnFunctionProps.Builder functionConfig(CfnFunction.FunctionConfigProperty functionConfig) Sets the value ofCfnFunctionProps.getFunctionConfig()- Parameters:
functionConfig- Contains configuration information about a CloudFront function. This parameter is required.- Returns:
this
-
name
Sets the value ofCfnFunctionProps.getName()- Parameters:
name- A name to identify the function. This parameter is required.- Returns:
this
-
autoPublish
Sets the value ofCfnFunctionProps.getAutoPublish()- Parameters:
autoPublish- A flag that determines whether to automatically publish the function to theLIVEstage when it’s created. To automatically publish to theLIVEstage, set this property totrue.- Returns:
this
-
autoPublish
Sets the value ofCfnFunctionProps.getAutoPublish()- Parameters:
autoPublish- A flag that determines whether to automatically publish the function to theLIVEstage when it’s created. To automatically publish to theLIVEstage, set this property totrue.- Returns:
this
-
functionMetadata
Sets the value ofCfnFunctionProps.getFunctionMetadata()- Parameters:
functionMetadata- Contains metadata about a CloudFront function.- Returns:
this
-
functionMetadata
@Stability(Stable) public CfnFunctionProps.Builder functionMetadata(CfnFunction.FunctionMetadataProperty functionMetadata) Sets the value ofCfnFunctionProps.getFunctionMetadata()- Parameters:
functionMetadata- Contains metadata about a CloudFront function.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnFunctionProps>- Returns:
- a new instance of
CfnFunctionProps - Throws:
NullPointerException- if any required attribute was not provided
-