Class CfnComponentVersion
Creates a component.
Inherited Members
Namespace: Amazon.CDK.AWS.GreengrassV2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnComponentVersion : CfnResource, IInspectable, ITaggable
Syntax (vb)
Public Class CfnComponentVersion
Inherits CfnResource
Implements IInspectable, ITaggable
Remarks
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 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.
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(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 |
CfnComponentVersion(Construct, String, ICfnComponentVersionProps) |
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 | Tag Manager which manages the tags for this resource. |
TagsRaw | 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(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
CfnComponentVersion(Construct, String, ICfnComponentVersionProps)
public CfnComponentVersion(Construct scope, string id, ICfnComponentVersionProps props = null)
Parameters
- scope Constructs.Construct
Scope in which this resource is defined.
- id System.String
Construct identifier for this resource (unique in its scope).
- props ICfnComponentVersionProps
Resource properties.
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
LambdaFunction
The parameters to create a component from a Lambda function.
public virtual object LambdaFunction { get; set; }
Property Value
System.Object
Tags
Tag Manager which manages the tags for this resource.
public virtual TagManager Tags { get; }
Property Value
TagsRaw
Application-specific metadata to attach to the component version.
public virtual IDictionary<string, string> TagsRaw { get; set; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.String>
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>