Class CfnComponentVersion.LambdaExecutionParametersProperty.Builder
java.lang.Object
software.amazon.awscdk.services.greengrassv2.CfnComponentVersion.LambdaExecutionParametersProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnComponentVersion.LambdaExecutionParametersProperty>
- Enclosing interface:
CfnComponentVersion.LambdaExecutionParametersProperty
@Stability(Stable)
public static final class CfnComponentVersion.LambdaExecutionParametersProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnComponentVersion.LambdaExecutionParametersProperty>
A builder for
CfnComponentVersion.LambdaExecutionParametersProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.environmentVariables
(Map<String, String> environmentVariables) environmentVariables
(IResolvable environmentVariables) eventSources
(List<? extends Object> eventSources) Sets the value ofCfnComponentVersion.LambdaExecutionParametersProperty.getEventSources()
eventSources
(IResolvable eventSources) Sets the value ofCfnComponentVersion.LambdaExecutionParametersProperty.getEventSources()
Sets the value ofCfnComponentVersion.LambdaExecutionParametersProperty.getExecArgs()
inputPayloadEncodingType
(String inputPayloadEncodingType) linuxProcessParams
(IResolvable linuxProcessParams) linuxProcessParams
(CfnComponentVersion.LambdaLinuxProcessParamsProperty linuxProcessParams) maxIdleTimeInSeconds
(Number maxIdleTimeInSeconds) maxInstancesCount
(Number maxInstancesCount) maxQueueSize
(Number maxQueueSize) Sets the value ofCfnComponentVersion.LambdaExecutionParametersProperty.getMaxQueueSize()
Sets the value ofCfnComponentVersion.LambdaExecutionParametersProperty.getPinned()
pinned
(IResolvable pinned) Sets the value ofCfnComponentVersion.LambdaExecutionParametersProperty.getPinned()
statusTimeoutInSeconds
(Number statusTimeoutInSeconds) timeoutInSeconds
(Number timeoutInSeconds)
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
environmentVariables
@Stability(Stable) public CfnComponentVersion.LambdaExecutionParametersProperty.Builder environmentVariables(IResolvable environmentVariables) - Parameters:
environmentVariables
- The map of environment variables that are available to the Lambda function when it runs.- Returns:
this
-
environmentVariables
@Stability(Stable) public CfnComponentVersion.LambdaExecutionParametersProperty.Builder environmentVariables(Map<String, String> environmentVariables) - Parameters:
environmentVariables
- The map of environment variables that are available to the Lambda function when it runs.- Returns:
this
-
eventSources
@Stability(Stable) public CfnComponentVersion.LambdaExecutionParametersProperty.Builder eventSources(IResolvable eventSources) Sets the value ofCfnComponentVersion.LambdaExecutionParametersProperty.getEventSources()
- Parameters:
eventSources
- The list of event sources to which to subscribe to receive work messages. The Lambda function runs when it receives a message from an event source. You can subscribe this function to local publish/subscribe messages and AWS IoT Core MQTT messages.- Returns:
this
-
eventSources
@Stability(Stable) public CfnComponentVersion.LambdaExecutionParametersProperty.Builder eventSources(List<? extends Object> eventSources) Sets the value ofCfnComponentVersion.LambdaExecutionParametersProperty.getEventSources()
- Parameters:
eventSources
- The list of event sources to which to subscribe to receive work messages. The Lambda function runs when it receives a message from an event source. You can subscribe this function to local publish/subscribe messages and AWS IoT Core MQTT messages.- Returns:
this
-
execArgs
@Stability(Stable) public CfnComponentVersion.LambdaExecutionParametersProperty.Builder execArgs(List<String> execArgs) Sets the value ofCfnComponentVersion.LambdaExecutionParametersProperty.getExecArgs()
- Parameters:
execArgs
- The list of arguments to pass to the Lambda function when it runs.- Returns:
this
-
inputPayloadEncodingType
@Stability(Stable) public CfnComponentVersion.LambdaExecutionParametersProperty.Builder inputPayloadEncodingType(String inputPayloadEncodingType) Sets the value ofCfnComponentVersion.LambdaExecutionParametersProperty.getInputPayloadEncodingType()
- Parameters:
inputPayloadEncodingType
- The encoding type that the Lambda function supports. Default:json
- Returns:
this
-
linuxProcessParams
@Stability(Stable) public CfnComponentVersion.LambdaExecutionParametersProperty.Builder linuxProcessParams(IResolvable linuxProcessParams) - Parameters:
linuxProcessParams
- The parameters for the Linux process that contains the Lambda function.- Returns:
this
-
linuxProcessParams
@Stability(Stable) public CfnComponentVersion.LambdaExecutionParametersProperty.Builder linuxProcessParams(CfnComponentVersion.LambdaLinuxProcessParamsProperty linuxProcessParams) - Parameters:
linuxProcessParams
- The parameters for the Linux process that contains the Lambda function.- Returns:
this
-
maxIdleTimeInSeconds
@Stability(Stable) public CfnComponentVersion.LambdaExecutionParametersProperty.Builder maxIdleTimeInSeconds(Number maxIdleTimeInSeconds) - Parameters:
maxIdleTimeInSeconds
- The maximum amount of time in seconds that a non-pinned Lambda function can idle before the AWS IoT Greengrass Core software stops its process.- Returns:
this
-
maxInstancesCount
@Stability(Stable) public CfnComponentVersion.LambdaExecutionParametersProperty.Builder maxInstancesCount(Number maxInstancesCount) - Parameters:
maxInstancesCount
- The maximum number of instances that a non-pinned Lambda function can run at the same time.- Returns:
this
-
maxQueueSize
@Stability(Stable) public CfnComponentVersion.LambdaExecutionParametersProperty.Builder maxQueueSize(Number maxQueueSize) Sets the value ofCfnComponentVersion.LambdaExecutionParametersProperty.getMaxQueueSize()
- Parameters:
maxQueueSize
- The maximum size of the message queue for the Lambda function component. The AWS IoT Greengrass core device stores messages in a FIFO (first-in-first-out) queue until it can run the Lambda function to consume each message.- Returns:
this
-
pinned
@Stability(Stable) public CfnComponentVersion.LambdaExecutionParametersProperty.Builder pinned(Boolean pinned) Sets the value ofCfnComponentVersion.LambdaExecutionParametersProperty.getPinned()
- Parameters:
pinned
- Whether or not the Lambda function is pinned, or long-lived.- A pinned Lambda function starts when the AWS IoT Greengrass Core starts and keeps running in its own container.
- A non-pinned Lambda function starts only when it receives a work item and exists after it idles for
maxIdleTimeInSeconds
. If the function has multiple work items, the AWS IoT Greengrass Core software creates multiple instances of the function.
Default:
true
- Returns:
this
-
pinned
@Stability(Stable) public CfnComponentVersion.LambdaExecutionParametersProperty.Builder pinned(IResolvable pinned) Sets the value ofCfnComponentVersion.LambdaExecutionParametersProperty.getPinned()
- Parameters:
pinned
- Whether or not the Lambda function is pinned, or long-lived.- A pinned Lambda function starts when the AWS IoT Greengrass Core starts and keeps running in its own container.
- A non-pinned Lambda function starts only when it receives a work item and exists after it idles for
maxIdleTimeInSeconds
. If the function has multiple work items, the AWS IoT Greengrass Core software creates multiple instances of the function.
Default:
true
- Returns:
this
-
statusTimeoutInSeconds
@Stability(Stable) public CfnComponentVersion.LambdaExecutionParametersProperty.Builder statusTimeoutInSeconds(Number statusTimeoutInSeconds) - Parameters:
statusTimeoutInSeconds
- The interval in seconds at which a pinned (also known as long-lived) Lambda function component sends status updates to the Lambda manager component.- Returns:
this
-
timeoutInSeconds
@Stability(Stable) public CfnComponentVersion.LambdaExecutionParametersProperty.Builder timeoutInSeconds(Number timeoutInSeconds) - Parameters:
timeoutInSeconds
- The maximum amount of time in seconds that the Lambda function can process a work item.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnComponentVersion.LambdaExecutionParametersProperty>
- Returns:
- a new instance of
CfnComponentVersion.LambdaExecutionParametersProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-