Class CfnComponentVersionPropsMixin

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.Mixin
software.amazon.awscdk.cfnpropertymixins.services.greengrassv2.CfnComponentVersionPropsMixin
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable, software.constructs.IMixin

@Generated(value="jsii-pacmak/1.127.0 (build 2117ad5)", date="2026-03-11T13:19:59.873Z") @Stability(Stable) public class CfnComponentVersionPropsMixin extends Mixin implements software.constructs.IMixin
Creates a component.

Components are software that run on AWS IoT Greengrass core devices. After you develop and test a component on your core device, you can use this operation to upload your component to AWS IoT Greengrass . Then, you can deploy the component to other core devices.

You can use this operation to do the following:

  • Create components from recipes

Create a component from a recipe, which is a file that defines the component's metadata, parameters, dependencies, lifecycle, artifacts, and platform capability. For more information, see AWS IoT Greengrass component recipe reference in the AWS IoT Greengrass V2 Developer Guide .

To create a component from a recipe, specify inlineRecipe when you call this operation.

  • Create components from Lambda functions

Create a component from an AWS Lambda function that runs on AWS IoT Greengrass . This creates a recipe and artifacts from the Lambda function's deployment package. You can use this operation to migrate Lambda functions from AWS IoT Greengrass V1 to AWS IoT Greengrass V2 .

This function accepts Lambda functions in all supported versions of Python, Node.js, and Java runtimes. AWS IoT Greengrass doesn't apply any additional restrictions on deprecated Lambda runtime versions.

To create a component from a Lambda function, specify lambdaFunction when you call this operation.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.cfnpropertymixins.services.greengrassv2.*;
 import software.amazon.awscdk.*;
 IMergeStrategy mergeStrategy;
 CfnComponentVersionPropsMixin cfnComponentVersionPropsMixin = CfnComponentVersionPropsMixin.Builder.create(CfnComponentVersionMixinProps.builder()
         .inlineRecipe("inlineRecipe")
         .lambdaFunction(LambdaFunctionRecipeSourceProperty.builder()
                 .componentDependencies(Map.of(
                         "componentDependenciesKey", ComponentDependencyRequirementProperty.builder()
                                 .dependencyType("dependencyType")
                                 .versionRequirement("versionRequirement")
                                 .build()))
                 .componentLambdaParameters(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())
                 .componentName("componentName")
                 .componentPlatforms(List.of(ComponentPlatformProperty.builder()
                         .attributes(Map.of(
                                 "attributesKey", "attributes"))
                         .name("name")
                         .build()))
                 .componentVersion("componentVersion")
                 .lambdaArn("lambdaArn")
                 .build())
         .tags(Map.of(
                 "tagsKey", "tags"))
         .build())
 .strategy(mergeStrategy)
 .build();
 

See Also:
  • Field Details

    • CFN_PROPERTY_KEYS

      @Stability(Stable) protected static final List<String> CFN_PROPERTY_KEYS
  • Constructor Details

    • CfnComponentVersionPropsMixin

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

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

      @Stability(Stable) public CfnComponentVersionPropsMixin(@NotNull CfnComponentVersionMixinProps props, @Nullable CfnPropertyMixinOptions options)
      Create a mixin to apply properties to AWS::GreengrassV2::ComponentVersion.

      Parameters:
      props - L1 properties to apply. This parameter is required.
      options - Mixin options.
    • CfnComponentVersionPropsMixin

      @Stability(Stable) public CfnComponentVersionPropsMixin(@NotNull CfnComponentVersionMixinProps props)
      Create a mixin to apply properties to AWS::GreengrassV2::ComponentVersion.

      Parameters:
      props - L1 properties to apply. This parameter is required.
  • Method Details

    • applyTo

      @Stability(Stable) public void applyTo(@NotNull software.constructs.IConstruct construct)
      Apply the mixin properties to the construct.

      Specified by:
      applyTo in interface software.constructs.IMixin
      Specified by:
      applyTo in class Mixin
      Parameters:
      construct - This parameter is required.
    • supports

      @Stability(Stable) @NotNull public Boolean supports(@NotNull software.constructs.IConstruct construct)
      Check if this mixin supports the given construct.

      Specified by:
      supports in interface software.constructs.IMixin
      Overrides:
      supports in class Mixin
      Parameters:
      construct - This parameter is required.
    • getProps

      @Stability(Stable) @NotNull protected CfnComponentVersionMixinProps getProps()
    • getStrategy

      @Stability(Stable) @NotNull protected IMergeStrategy getStrategy()