Class CfnFunctionDefinitionVersion

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IConstruct, IDependable, IInspectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:29:56.991Z") @Stability(Stable) public class CfnFunctionDefinitionVersion extends CfnResource implements IInspectable
A CloudFormation AWS::Greengrass::FunctionDefinitionVersion.

The AWS::Greengrass::FunctionDefinitionVersion resource represents a function definition version for AWS IoT Greengrass . A function definition version contains contain a list of functions.

To create a function definition version, you must specify the ID of the function definition that you want to associate with the version. For information about creating a function definition, see AWS::Greengrass::FunctionDefinition .

After you create a function definition version that contains the functions you want to deploy, you must add it to your group version. For more information, see AWS::Greengrass::Group .

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;
 CfnFunctionDefinitionVersion cfnFunctionDefinitionVersion = CfnFunctionDefinitionVersion.Builder.create(this, "MyCfnFunctionDefinitionVersion")
         .functionDefinitionId("functionDefinitionId")
         .functions(List.of(FunctionProperty.builder()
                 .functionArn("functionArn")
                 .functionConfiguration(FunctionConfigurationProperty.builder()
                         .encodingType("encodingType")
                         .environment(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())
                         .execArgs("execArgs")
                         .executable("executable")
                         .memorySize(123)
                         .pinned(false)
                         .timeout(123)
                         .build())
                 .id("id")
                 .build()))
         // the properties below are optional
         .defaultConfig(DefaultConfigProperty.builder()
                 .execution(ExecutionProperty.builder()
                         .isolationMode("isolationMode")
                         .runAs(RunAsProperty.builder()
                                 .gid(123)
                                 .uid(123)
                                 .build())
                         .build())
                 .build())
         .build();
 
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnFunctionDefinitionVersion

      protected CfnFunctionDefinitionVersion(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnFunctionDefinitionVersion

      protected CfnFunctionDefinitionVersion(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnFunctionDefinitionVersion

      @Stability(Stable) public CfnFunctionDefinitionVersion(@NotNull Construct scope, @NotNull String id, @NotNull CfnFunctionDefinitionVersionProps props)
      Create a new AWS::Greengrass::FunctionDefinitionVersion.

      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      This parameter is required.
      props -
      • resource properties.
      This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector -
      • tree inspector to collect and process attributes.
      This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getFunctionDefinitionId

      @Stability(Stable) @NotNull public String getFunctionDefinitionId()
      The ID of the function definition associated with this version.

      This value is a GUID.

    • setFunctionDefinitionId

      @Stability(Stable) public void setFunctionDefinitionId(@NotNull String value)
      The ID of the function definition associated with this version.

      This value is a GUID.

    • getFunctions

      @Stability(Stable) @NotNull public Object getFunctions()
      The functions in this version.
    • setFunctions

      @Stability(Stable) public void setFunctions(@NotNull IResolvable value)
      The functions in this version.
    • setFunctions

      @Stability(Stable) public void setFunctions(@NotNull List<Object> value)
      The functions in this version.
    • getDefaultConfig

      @Stability(Stable) @Nullable public Object getDefaultConfig()
      The default configuration that applies to all Lambda functions in the group.

      Individual Lambda functions can override these settings.

    • setDefaultConfig

      @Stability(Stable) public void setDefaultConfig(@Nullable IResolvable value)
      The default configuration that applies to all Lambda functions in the group.

      Individual Lambda functions can override these settings.

    • setDefaultConfig

      @Stability(Stable) public void setDefaultConfig(@Nullable CfnFunctionDefinitionVersion.DefaultConfigProperty value)
      The default configuration that applies to all Lambda functions in the group.

      Individual Lambda functions can override these settings.