Class CfnComponentVersionPropsMixin
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable,software.constructs.IMixin
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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnComponentVersionPropsMixin.static interfaceContains information about a component dependency for a Lambda function component.static interfaceContains information about a platform that a component supports.static interfaceContains information about a container in which AWS Lambda functions run on AWS IoT Greengrass core devices.static interfaceContains information about a device that Linux processes in a container can access.static interfaceContains information about an event source for an AWS Lambda function.static interfaceContains parameters for a Lambda function that runs on AWS IoT Greengrass .static interfaceContains information about an AWS Lambda function to import to create a component.static interfaceContains parameters for a Linux process that contains an AWS Lambda function.static interfaceContains information about a volume that Linux processes in a container can access.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IMixin
software.constructs.IMixin.Jsii$Default, software.constructs.IMixin.Jsii$Proxy -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionCreate a mixin to apply properties toAWS::GreengrassV2::ComponentVersion.Create a mixin to apply properties toAWS::GreengrassV2::ComponentVersion.protectedCfnComponentVersionPropsMixin(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnComponentVersionPropsMixin(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyTo(software.constructs.IConstruct construct) Apply the mixin properties to the construct.protected CfnComponentVersionMixinPropsgetProps()protected IMergeStrategysupports(software.constructs.IConstruct construct) Check if this mixin supports the given construct.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
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 toAWS::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 toAWS::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. -
supports
@Stability(Stable) @NotNull public Boolean supports(@NotNull software.constructs.IConstruct construct) Check if this mixin supports the given construct. -
getProps
-
getStrategy
-