Class CfnFunctionDefinition.FunctionConfigurationProperty.Builder
java.lang.Object
software.amazon.awscdk.services.greengrass.CfnFunctionDefinition.FunctionConfigurationProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnFunctionDefinition.FunctionConfigurationProperty>
- Enclosing interface:
CfnFunctionDefinition.FunctionConfigurationProperty
@Stability(Stable)
public static final class CfnFunctionDefinition.FunctionConfigurationProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnFunctionDefinition.FunctionConfigurationProperty>
A builder for
CfnFunctionDefinition.FunctionConfigurationProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.encodingType
(String encodingType) Sets the value ofCfnFunctionDefinition.FunctionConfigurationProperty.getEncodingType()
environment
(IResolvable environment) Sets the value ofCfnFunctionDefinition.FunctionConfigurationProperty.getEnvironment()
environment
(CfnFunctionDefinition.EnvironmentProperty environment) Sets the value ofCfnFunctionDefinition.FunctionConfigurationProperty.getEnvironment()
Sets the value ofCfnFunctionDefinition.FunctionConfigurationProperty.getExecArgs()
executable
(String executable) Sets the value ofCfnFunctionDefinition.FunctionConfigurationProperty.getExecutable()
memorySize
(Number memorySize) Sets the value ofCfnFunctionDefinition.FunctionConfigurationProperty.getMemorySize()
Sets the value ofCfnFunctionDefinition.FunctionConfigurationProperty.getPinned()
pinned
(IResolvable pinned) Sets the value ofCfnFunctionDefinition.FunctionConfigurationProperty.getPinned()
Sets the value ofCfnFunctionDefinition.FunctionConfigurationProperty.getTimeout()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
encodingType
@Stability(Stable) public CfnFunctionDefinition.FunctionConfigurationProperty.Builder encodingType(String encodingType) Sets the value ofCfnFunctionDefinition.FunctionConfigurationProperty.getEncodingType()
- Parameters:
encodingType
- The expected encoding type of the input payload for the function. Valid values arejson
(default) andbinary
.- Returns:
this
-
environment
@Stability(Stable) public CfnFunctionDefinition.FunctionConfigurationProperty.Builder environment(IResolvable environment) Sets the value ofCfnFunctionDefinition.FunctionConfigurationProperty.getEnvironment()
- Parameters:
environment
- The environment configuration of the function.- Returns:
this
-
environment
@Stability(Stable) public CfnFunctionDefinition.FunctionConfigurationProperty.Builder environment(CfnFunctionDefinition.EnvironmentProperty environment) Sets the value ofCfnFunctionDefinition.FunctionConfigurationProperty.getEnvironment()
- Parameters:
environment
- The environment configuration of the function.- Returns:
this
-
execArgs
@Stability(Stable) public CfnFunctionDefinition.FunctionConfigurationProperty.Builder execArgs(String execArgs) Sets the value ofCfnFunctionDefinition.FunctionConfigurationProperty.getExecArgs()
- Parameters:
execArgs
- The execution arguments.- Returns:
this
-
executable
@Stability(Stable) public CfnFunctionDefinition.FunctionConfigurationProperty.Builder executable(String executable) Sets the value ofCfnFunctionDefinition.FunctionConfigurationProperty.getExecutable()
- Parameters:
executable
- The name of the function executable.- Returns:
this
-
memorySize
@Stability(Stable) public CfnFunctionDefinition.FunctionConfigurationProperty.Builder memorySize(Number memorySize) Sets the value ofCfnFunctionDefinition.FunctionConfigurationProperty.getMemorySize()
- Parameters:
memorySize
- The memory size (in KB) required by the function.This property applies only to Lambda functions that run in a Greengrass container.
- Returns:
this
-
pinned
@Stability(Stable) public CfnFunctionDefinition.FunctionConfigurationProperty.Builder pinned(Boolean pinned) Sets the value ofCfnFunctionDefinition.FunctionConfigurationProperty.getPinned()
- Parameters:
pinned
- Indicates whether the function is pinned (or long-lived ). Pinned functions start when the core starts and process all requests in the same container. The default value is false.- Returns:
this
-
pinned
@Stability(Stable) public CfnFunctionDefinition.FunctionConfigurationProperty.Builder pinned(IResolvable pinned) Sets the value ofCfnFunctionDefinition.FunctionConfigurationProperty.getPinned()
- Parameters:
pinned
- Indicates whether the function is pinned (or long-lived ). Pinned functions start when the core starts and process all requests in the same container. The default value is false.- Returns:
this
-
timeout
@Stability(Stable) public CfnFunctionDefinition.FunctionConfigurationProperty.Builder timeout(Number timeout) Sets the value ofCfnFunctionDefinition.FunctionConfigurationProperty.getTimeout()
- Parameters:
timeout
- The allowed execution time (in seconds) after which the function should terminate. For pinned functions, this timeout applies for each request.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnFunctionDefinition.FunctionConfigurationProperty>
- Returns:
- a new instance of
CfnFunctionDefinition.FunctionConfigurationProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-