Class FunctionProps.Builder
java.lang.Object
software.amazon.awscdk.services.cloudfront.FunctionProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<FunctionProps>
- Enclosing interface:
FunctionProps
@Stability(Stable)
public static final class FunctionProps.Builder
extends Object
implements software.amazon.jsii.Builder<FunctionProps>
A builder for
FunctionProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionautoPublish(Boolean autoPublish) Sets the value ofFunctionProps.getAutoPublish()build()Builds the configured instance.code(FunctionCode code) Sets the value ofFunctionProps.getCode()Sets the value ofFunctionProps.getComment()functionName(String functionName) Sets the value ofFunctionProps.getFunctionName()keyValueStore(IKeyValueStoreRef keyValueStore) Sets the value ofFunctionProps.getKeyValueStore()runtime(FunctionRuntime runtime) Sets the value ofFunctionProps.getRuntime()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
code
Sets the value ofFunctionProps.getCode()- Parameters:
code- The source code of the function. This parameter is required.- Returns:
this
-
autoPublish
Sets the value ofFunctionProps.getAutoPublish()- Parameters:
autoPublish- A flag that determines whether to automatically publish the function to the LIVE stage when it’s created.- Returns:
this
-
comment
Sets the value ofFunctionProps.getComment()- Parameters:
comment- A comment to describe the function.- Returns:
this
-
functionName
Sets the value ofFunctionProps.getFunctionName()- Parameters:
functionName- A name to identify the function.- Returns:
this
-
keyValueStore
Sets the value ofFunctionProps.getKeyValueStore()- Parameters:
keyValueStore- The Key Value Store to associate with this function. In order to associate a Key Value Store, theruntimemust becloudfront-js-2.0or newer.- Returns:
this
-
runtime
Sets the value ofFunctionProps.getRuntime()- Parameters:
runtime- The runtime environment for the function.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<FunctionProps>- Returns:
- a new instance of
FunctionProps - Throws:
NullPointerException- if any required attribute was not provided
-