Class CfnFunction.Builder
java.lang.Object
software.amazon.awscdk.services.cloudfront.CfnFunction.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnFunction>
- Enclosing class:
CfnFunction
@Stability(Stable)
public static final class CfnFunction.Builder
extends Object
implements software.amazon.jsii.Builder<CfnFunction>
A fluent builder for
CfnFunction
.-
Method Summary
Modifier and TypeMethodDescriptionautoPublish
(Boolean autoPublish) A flag that determines whether to automatically publish the function to theLIVE
stage when it’s created.autoPublish
(IResolvable autoPublish) A flag that determines whether to automatically publish the function to theLIVE
stage when it’s created.build()
static CfnFunction.Builder
functionCode
(String functionCode) The function code.functionConfig
(IResolvable functionConfig) Contains configuration information about a CloudFront function.functionConfig
(CfnFunction.FunctionConfigProperty functionConfig) Contains configuration information about a CloudFront function.functionMetadata
(IResolvable functionMetadata) Contains metadata about a CloudFront function.functionMetadata
(CfnFunction.FunctionMetadataProperty functionMetadata) Contains metadata about a CloudFront function.A name to identify the function.
-
Method Details
-
create
- Parameters:
scope
-- scope in which this resource is defined.
id
-- scoped id of the resource.
- Returns:
- a new instance of
CfnFunction.Builder
.
-
functionCode
The function code.For more information about writing a CloudFront function, see Writing function code for CloudFront Functions in the Amazon CloudFront Developer Guide .
- Parameters:
functionCode
- The function code. This parameter is required.- Returns:
this
-
functionConfig
Contains configuration information about a CloudFront function.- Parameters:
functionConfig
- Contains configuration information about a CloudFront function. This parameter is required.- Returns:
this
-
functionConfig
@Stability(Stable) public CfnFunction.Builder functionConfig(CfnFunction.FunctionConfigProperty functionConfig) Contains configuration information about a CloudFront function.- Parameters:
functionConfig
- Contains configuration information about a CloudFront function. This parameter is required.- Returns:
this
-
name
A name to identify the function.- Parameters:
name
- A name to identify the function. This parameter is required.- Returns:
this
-
autoPublish
A flag that determines whether to automatically publish the function to theLIVE
stage when it’s created.To automatically publish to the
LIVE
stage, set this property totrue
.- Parameters:
autoPublish
- A flag that determines whether to automatically publish the function to theLIVE
stage when it’s created. This parameter is required.- Returns:
this
-
autoPublish
A flag that determines whether to automatically publish the function to theLIVE
stage when it’s created.To automatically publish to the
LIVE
stage, set this property totrue
.- Parameters:
autoPublish
- A flag that determines whether to automatically publish the function to theLIVE
stage when it’s created. This parameter is required.- Returns:
this
-
functionMetadata
Contains metadata about a CloudFront function.- Parameters:
functionMetadata
- Contains metadata about a CloudFront function. This parameter is required.- Returns:
this
-
functionMetadata
@Stability(Stable) public CfnFunction.Builder functionMetadata(CfnFunction.FunctionMetadataProperty functionMetadata) Contains metadata about a CloudFront function.- Parameters:
functionMetadata
- Contains metadata about a CloudFront function. This parameter is required.- Returns:
this
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnFunction>
- Returns:
- a newly built instance of
CfnFunction
.
-