Interface CfnFunctionDefinition.EnvironmentProperty

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

@Stability(Stable) public static interface CfnFunctionDefinition.EnvironmentProperty extends software.amazon.jsii.JsiiSerializable
The environment configuration for a Lambda function on the AWS IoT Greengrass core.

In an AWS CloudFormation template, Environment is a property of the FunctionConfiguration property type.

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.greengrass.*;
 Object variables;
 EnvironmentProperty environmentProperty = EnvironmentProperty.builder()
         .accessSysfs(false)
         .execution(ExecutionProperty.builder()
                 .isolationMode("isolationMode")
                 .runAs(RunAsProperty.builder()
                         .gid(123)
                         .uid(123)
                         .build())
                 .build())
         .resourceAccessPolicies(List.of(ResourceAccessPolicyProperty.builder()
                 .resourceId("resourceId")
                 // the properties below are optional
                 .permission("permission")
                 .build()))
         .variables(variables)
         .build();
 
  • Method Details

    • getAccessSysfs

      @Stability(Stable) @Nullable default Object getAccessSysfs()
      Indicates whether the function is allowed to access the /sys directory on the core device, which allows the read device information from /sys .

      This property applies only to Lambda functions that run in a Greengrass container.

    • getExecution

      @Stability(Stable) @Nullable default Object getExecution()
      Settings for the Lambda execution environment in AWS IoT Greengrass .
    • getResourceAccessPolicies

      @Stability(Stable) @Nullable default Object getResourceAccessPolicies()
      A list of the resources in the group that the function can access, with the corresponding read-only or read-write permissions. The maximum is 10 resources.

      This property applies only for Lambda functions that run in a Greengrass container.

    • getVariables

      @Stability(Stable) @Nullable default Object getVariables()
      Environment variables for the Lambda function.
    • builder

      @Stability(Stable) static CfnFunctionDefinition.EnvironmentProperty.Builder builder()
      Returns:
      a CfnFunctionDefinition.EnvironmentProperty.Builder of CfnFunctionDefinition.EnvironmentProperty