class CfnComponentVersionPropsMixin
| Language | Type name |
|---|---|
.NET | Amazon.CDK.Mixins.Preview.AWS.GreengrassV2.Mixins.CfnComponentVersionPropsMixin |
Go | github.com/aws/aws-cdk-go/awscdkmixinspreview/v2/awsgreengrassv2/mixins#CfnComponentVersionPropsMixin |
Java | software.amazon.awscdk.mixins.preview.services.greengrassv2.mixins.CfnComponentVersionPropsMixin |
Python | aws_cdk.mixins_preview.aws_greengrassv2.mixins.CfnComponentVersionPropsMixin |
TypeScript | @aws-cdk/mixins-preview » aws_greengrassv2 » mixins » CfnComponentVersionPropsMixin |
Implements
IMixin
Extends
Mixin
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 { mixins } from '@aws-cdk/mixins-preview';
import { mixins as greengrassv2_mixins } from '@aws-cdk/mixins-preview/aws-greengrassv2';
const cfnComponentVersionPropsMixin = new greengrassv2_mixins.CfnComponentVersionPropsMixin({
inlineRecipe: 'inlineRecipe',
lambdaFunction: {
componentDependencies: {
componentDependenciesKey: {
dependencyType: 'dependencyType',
versionRequirement: 'versionRequirement',
},
},
componentLambdaParameters: {
environmentVariables: {
environmentVariablesKey: 'environmentVariables',
},
eventSources: [{
topic: 'topic',
type: 'type',
}],
execArgs: ['execArgs'],
inputPayloadEncodingType: 'inputPayloadEncodingType',
linuxProcessParams: {
containerParams: {
devices: [{
addGroupOwner: false,
path: 'path',
permission: 'permission',
}],
memorySizeInKb: 123,
mountRoSysfs: false,
volumes: [{
addGroupOwner: false,
destinationPath: 'destinationPath',
permission: 'permission',
sourcePath: 'sourcePath',
}],
},
isolationMode: 'isolationMode',
},
maxIdleTimeInSeconds: 123,
maxInstancesCount: 123,
maxQueueSize: 123,
pinned: false,
statusTimeoutInSeconds: 123,
timeoutInSeconds: 123,
},
componentName: 'componentName',
componentPlatforms: [{
attributes: {
attributesKey: 'attributes',
},
name: 'name',
}],
componentVersion: 'componentVersion',
lambdaArn: 'lambdaArn',
},
tags: {
tagsKey: 'tags',
},
}, /* all optional props */ {
strategy: mixins.PropertyMergeStrategy.OVERRIDE,
});
Initializer
new CfnComponentVersionPropsMixin(props: CfnComponentVersionMixinProps, options?: CfnPropertyMixinOptions)
Parameters
- props
Cfn— L1 properties to apply.Component Version Mixin Props - options
Cfn— Mixin options.Property Mixin Options
Create a mixin to apply properties to AWS::GreengrassV2::ComponentVersion.
Properties
| Name | Type | Description |
|---|---|---|
| props | Cfn | |
| strategy | Property | |
| static CFN_PROPERTY_KEYS | string[] |
props
Type:
Cfn
strategy
Type:
Property
static CFN_PROPERTY_KEYS
Type:
string[]
Methods
| Name | Description |
|---|---|
| apply | Apply the mixin properties to the construct. |
| supports(construct) | Check if this mixin supports the given construct. |
applyTo(construct)
public applyTo(construct: IConstruct): IConstruct
Parameters
- construct
IConstruct
Returns
Apply the mixin properties to the construct.
supports(construct)
public supports(construct: IConstruct): boolean
Parameters
- construct
IConstruct
Returns
boolean
Check if this mixin supports the given construct.

.NET
Go
Java
Python
TypeScript