# CfnComponentVersionProps

Properties for defining a `CfnComponentVersion`.

Used as props by: [CfnComponentVersion](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_greengrassv2.CfnComponentVersion.html)

- Source: Generated at build time

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_greengrassv2 as greengrassv2 } from 'aws-cdk-lib';
const cfnComponentVersionProps: greengrassv2.CfnComponentVersionProps = {
  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',
  },
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_greengrassv2 as greengrassv2

cfn_component_version_props = greengrassv2.CfnComponentVersionProps(
    inline_recipe="inlineRecipe",
    lambda_function=greengrassv2.CfnComponentVersion.LambdaFunctionRecipeSourceProperty(
        component_dependencies={
            "component_dependencies_key": greengrassv2.CfnComponentVersion.ComponentDependencyRequirementProperty(
                dependency_type="dependencyType",
                version_requirement="versionRequirement"
            )
        },
        component_lambda_parameters=greengrassv2.CfnComponentVersion.LambdaExecutionParametersProperty(
            environment_variables={
                "environment_variables_key": "environmentVariables"
            },
            event_sources=[greengrassv2.CfnComponentVersion.LambdaEventSourceProperty(
                topic="topic",
                type="type"
            )],
            exec_args=["execArgs"],
            input_payload_encoding_type="inputPayloadEncodingType",
            linux_process_params=greengrassv2.CfnComponentVersion.LambdaLinuxProcessParamsProperty(
                container_params=greengrassv2.CfnComponentVersion.LambdaContainerParamsProperty(
                    devices=[greengrassv2.CfnComponentVersion.LambdaDeviceMountProperty(
                        add_group_owner=False,
                        path="path",
                        permission="permission"
                    )],
                    memory_size_in_kb=123,
                    mount_ro_sysfs=False,
                    volumes=[greengrassv2.CfnComponentVersion.LambdaVolumeMountProperty(
                        add_group_owner=False,
                        destination_path="destinationPath",
                        permission="permission",
                        source_path="sourcePath"
                    )]
                ),
                isolation_mode="isolationMode"
            ),
            max_idle_time_in_seconds=123,
            max_instances_count=123,
            max_queue_size=123,
            pinned=False,
            status_timeout_in_seconds=123,
            timeout_in_seconds=123
        ),
        component_name="componentName",
        component_platforms=[greengrassv2.CfnComponentVersion.ComponentPlatformProperty(
            attributes={
                "attributes_key": "attributes"
            },
            name="name"
        )],
        component_version="componentVersion",
        lambda_arn="lambdaArn"
    ),
    tags={
        "tags_key": "tags"
    }
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.greengrassv2.*;

CfnComponentVersionProps cfnComponentVersionProps = CfnComponentVersionProps.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();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// 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 cfnComponentVersionProps = 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" }
    }
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnComponentVersionProps := &CfnComponentVersionProps{
	InlineRecipe: jsii.String("inlineRecipe"),
	LambdaFunction: &LambdaFunctionRecipeSourceProperty{
		ComponentDependencies: map[string]interface{}{
			"componentDependenciesKey": &ComponentDependencyRequirementProperty{
				"dependencyType": jsii.String("dependencyType"),
				"versionRequirement": jsii.String("versionRequirement"),
			},
		},
		ComponentLambdaParameters: &LambdaExecutionParametersProperty{
			EnvironmentVariables: map[string]*string{
				"environmentVariablesKey": jsii.String("environmentVariables"),
			},
			EventSources: []interface{}{
				&LambdaEventSourceProperty{
					Topic: jsii.String("topic"),
					Type: jsii.String("type"),
				},
			},
			ExecArgs: []*string{
				jsii.String("execArgs"),
			},
			InputPayloadEncodingType: jsii.String("inputPayloadEncodingType"),
			LinuxProcessParams: &LambdaLinuxProcessParamsProperty{
				ContainerParams: &LambdaContainerParamsProperty{
					Devices: []interface{}{
						&LambdaDeviceMountProperty{
							AddGroupOwner: jsii.Boolean(false),
							Path: jsii.String("path"),
							Permission: jsii.String("permission"),
						},
					},
					MemorySizeInKb: jsii.Number(123),
					MountRoSysfs: jsii.Boolean(false),
					Volumes: []interface{}{
						&LambdaVolumeMountProperty{
							AddGroupOwner: jsii.Boolean(false),
							DestinationPath: jsii.String("destinationPath"),
							Permission: jsii.String("permission"),
							SourcePath: jsii.String("sourcePath"),
						},
					},
				},
				IsolationMode: jsii.String("isolationMode"),
			},
			MaxIdleTimeInSeconds: jsii.Number(123),
			MaxInstancesCount: jsii.Number(123),
			MaxQueueSize: jsii.Number(123),
			Pinned: jsii.Boolean(false),
			StatusTimeoutInSeconds: jsii.Number(123),
			TimeoutInSeconds: jsii.Number(123),
		},
		ComponentName: jsii.String("componentName"),
		ComponentPlatforms: []interface{}{
			&ComponentPlatformProperty{
				Attributes: map[string]*string{
					"attributesKey": jsii.String("attributes"),
				},
				Name: jsii.String("name"),
			},
		},
		ComponentVersion: jsii.String("componentVersion"),
		LambdaArn: jsii.String("lambdaArn"),
	},
	Tags: map[string]*string{
		"tagsKey": jsii.String("tags"),
	},
}
```

## Properties

- `inlineRecipe`: string — The recipe to use to create the component.

  The recipe defines the component's metadata, parameters, dependencies, lifecycle, artifacts, and platform compatibility.

  You must specify either `InlineRecipe` or `LambdaFunction` .

- `lambdaFunction`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnComponentVersion.LambdaFunctionRecipeSourceProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_greengrassv2.CfnComponentVersion.LambdaFunctionRecipeSourceProperty.html) — The parameters to create a component from a Lambda function.

  You must specify either `InlineRecipe` or `LambdaFunction` .

- `tags`: { [key: string]: string } — Application-specific metadata to attach to the component version.

  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](https://docs.aws.amazon.com/greengrass/v2/developerguide/tag-resources.html) 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 CloudFormation templates.

  ```json
  "Tags": { "KeyName0": "value", "KeyName1": "value", "KeyName2": "value"
  }
  ```
