Class CfnComponentVersion
A CloudFormation AWS::GreengrassV2::ComponentVersion
.
Inherited Members
Namespace: Amazon.CDK.AWS.GreengrassV2
Assembly: Amazon.CDK.AWS.GreengrassV2.dll
Syntax (csharp)
public class CfnComponentVersion : CfnResource, IConstruct, IDependable, IInspectable
Syntax (vb)
Public Class CfnComponentVersion
Inherits CfnResource
Implements IConstruct, IDependable, IInspectable
Remarks
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 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 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 only accepts Lambda functions that use the following runtimes:
To create a component from a Lambda function, specify lambdaFunction
when you call this operation.
CloudformationResource: AWS::GreengrassV2::ComponentVersion
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.GreengrassV2;
var cfnComponentVersion = new CfnComponentVersion(this, "MyCfnComponentVersion", new CfnComponentVersionProps {
InlineRecipe = "inlineRecipe",
LambdaFunction = new LambdaFunctionRecipeSourceProperty {
ComponentDependencies = new Dictionary<string, object> {
{ "componentDependenciesKey", new ComponentDependencyRequirementProperty {
DependencyType = "dependencyType",
VersionRequirement = "versionRequirement"
} }
},
ComponentLambdaParameters = new LambdaExecutionParametersProperty {
EnvironmentVariables = new Dictionary<string, string> {
{ "environmentVariablesKey", "environmentVariables" }
},
EventSources = new [] { new LambdaEventSourceProperty {
Topic = "topic",
Type = "type"
} },
ExecArgs = new [] { "execArgs" },
InputPayloadEncodingType = "inputPayloadEncodingType",
LinuxProcessParams = new LambdaLinuxProcessParamsProperty {
ContainerParams = new LambdaContainerParamsProperty {
Devices = new [] { new LambdaDeviceMountProperty {
AddGroupOwner = false,
Path = "path",
Permission = "permission"
} },
MemorySizeInKb = 123,
MountRoSysfs = false,
Volumes = new [] { new LambdaVolumeMountProperty {
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 = new [] { new ComponentPlatformProperty {
Attributes = new Dictionary<string, string> {
{ "attributesKey", "attributes" }
},
Name = "name"
} },
ComponentVersion = "componentVersion",
LambdaArn = "lambdaArn"
},
Tags = new Dictionary<string, string> {
{ "tagsKey", "tags" }
}
});
Synopsis
Constructors
CfnComponentVersion(Construct, String, ICfnComponentVersionProps) | Create a new |
CfnComponentVersion(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnComponentVersion(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
AttrArn | The ARN of the component version. |
AttrComponentName | The name of the component. |
AttrComponentVersion | The version of the component. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
InlineRecipe | The recipe to use to create the component. |
LambdaFunction | The parameters to create a component from a Lambda function. |
Tags | Application-specific metadata to attach to the component version. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnComponentVersion(Construct, String, ICfnComponentVersionProps)
Create a new AWS::GreengrassV2::ComponentVersion
.
public CfnComponentVersion(Construct scope, string id, ICfnComponentVersionProps props = null)
Parameters
- scope Construct
- scope in which this resource is defined.
- id System.String
- scoped id of the resource.
- props ICfnComponentVersionProps
- resource properties.
CfnComponentVersion(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnComponentVersion(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnComponentVersion(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnComponentVersion(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
AttrArn
The ARN of the component version.
public virtual string AttrArn { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Arn
AttrComponentName
The name of the component.
public virtual string AttrComponentName { get; }
Property Value
System.String
Remarks
CloudformationAttribute: ComponentName
AttrComponentVersion
The version of the component.
public virtual string AttrComponentVersion { get; }
Property Value
System.String
Remarks
CloudformationAttribute: ComponentVersion
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
InlineRecipe
The recipe to use to create the component.
public virtual string InlineRecipe { get; set; }
Property Value
System.String
Remarks
The recipe defines the component's metadata, parameters, dependencies, lifecycle, artifacts, and platform compatibility.
You must specify either InlineRecipe
or LambdaFunction
.
LambdaFunction
The parameters to create a component from a Lambda function.
public virtual object LambdaFunction { get; set; }
Property Value
System.Object
Remarks
You must specify either InlineRecipe
or LambdaFunction
.
Tags
Application-specific metadata to attach to the component version.
public virtual TagManager Tags { get; }
Property Value
Remarks
You can use tags in IAM policies to control access to AWS IoT Greengrass resources. You can also use tags to categorize your resources. For more information, see Tag your AWS IoT Greengrass Version 2 resources in the AWS IoT Greengrass V2 Developer Guide .
This Json
property type is processed as a map of key-value pairs. It uses the following format, which is different from most Tags
implementations in AWS CloudFormation templates.
"Tags": { "KeyName0": "value", "KeyName1": "value", "KeyName2": "value"
}
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
- tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>