Class CfnFunctionDefinitionVersion

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.greengrass.CfnFunctionDefinitionVersion
All Implemented Interfaces:
IInspectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-07-12T19:34:02.738Z") @Stability(Stable) public class CfnFunctionDefinitionVersion extends CfnResource implements IInspectable
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();
 

See Also:
  • 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 software.constructs.Construct scope, @NotNull String id, @NotNull CfnFunctionDefinitionVersionProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). 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.
    • getAttrId

      @Stability(Stable) @NotNull public String getAttrId()
    • 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.
    • setFunctionDefinitionId

      @Stability(Stable) public void setFunctionDefinitionId(@NotNull String value)
      The ID of the function definition associated with this version.
    • 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.
    • setDefaultConfig

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

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