Interface CfnComponentVersion.LambdaExecutionParametersProperty

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
CfnComponentVersion.LambdaExecutionParametersProperty.Jsii$Proxy
Enclosing class:
CfnComponentVersion

@Stability(Stable) public static interface CfnComponentVersion.LambdaExecutionParametersProperty extends software.amazon.jsii.JsiiSerializable
Contains parameters for a Lambda function that runs on AWS IoT Greengrass .

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.greengrassv2.*;
 LambdaExecutionParametersProperty lambdaExecutionParametersProperty = LambdaExecutionParametersProperty.builder()
         .environmentVariables(Map.of(
                 "environmentVariablesKey", "environmentVariables"))
         .eventSources(List.of(LambdaEventSourceProperty.builder()
                 .topic("topic")
                 .type("type")
                 .build()))
         .execArgs(List.of("execArgs"))
         .inputPayloadEncodingType("inputPayloadEncodingType")
         .linuxProcessParams(LambdaLinuxProcessParamsProperty.builder()
                 .containerParams(LambdaContainerParamsProperty.builder()
                         .devices(List.of(LambdaDeviceMountProperty.builder()
                                 .addGroupOwner(false)
                                 .path("path")
                                 .permission("permission")
                                 .build()))
                         .memorySizeInKb(123)
                         .mountRoSysfs(false)
                         .volumes(List.of(LambdaVolumeMountProperty.builder()
                                 .addGroupOwner(false)
                                 .destinationPath("destinationPath")
                                 .permission("permission")
                                 .sourcePath("sourcePath")
                                 .build()))
                         .build())
                 .isolationMode("isolationMode")
                 .build())
         .maxIdleTimeInSeconds(123)
         .maxInstancesCount(123)
         .maxQueueSize(123)
         .pinned(false)
         .statusTimeoutInSeconds(123)
         .timeoutInSeconds(123)
         .build();
 
  • Method Details

    • getEnvironmentVariables

      @Stability(Stable) @Nullable default Object getEnvironmentVariables()
      The map of environment variables that are available to the Lambda function when it runs.
    • getEventSources

      @Stability(Stable) @Nullable default Object getEventSources()
      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.

    • getExecArgs

      @Stability(Stable) @Nullable default List<String> getExecArgs()
      The list of arguments to pass to the Lambda function when it runs.
    • getInputPayloadEncodingType

      @Stability(Stable) @Nullable default String getInputPayloadEncodingType()
      The encoding type that the Lambda function supports.

      Default: json

    • getLinuxProcessParams

      @Stability(Stable) @Nullable default Object getLinuxProcessParams()
      The parameters for the Linux process that contains the Lambda function.
    • getMaxIdleTimeInSeconds

      @Stability(Stable) @Nullable default Number getMaxIdleTimeInSeconds()
      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.
    • getMaxInstancesCount

      @Stability(Stable) @Nullable default Number getMaxInstancesCount()
      The maximum number of instances that a non-pinned Lambda function can run at the same time.
    • getMaxQueueSize

      @Stability(Stable) @Nullable default Number getMaxQueueSize()
      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.

    • getPinned

      @Stability(Stable) @Nullable default Object getPinned()
      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

    • getStatusTimeoutInSeconds

      @Stability(Stable) @Nullable default Number getStatusTimeoutInSeconds()
      The interval in seconds at which a pinned (also known as long-lived) Lambda function component sends status updates to the Lambda manager component.
    • getTimeoutInSeconds

      @Stability(Stable) @Nullable default Number getTimeoutInSeconds()
      The maximum amount of time in seconds that the Lambda function can process a work item.
    • builder

      Returns:
      a CfnComponentVersion.LambdaExecutionParametersProperty.Builder of CfnComponentVersion.LambdaExecutionParametersProperty