Skip to content
v2.277.0

ResourceDefinitionVersionProperty Struct ​

A resource definition version contains a list of resources. (In CloudFormation , resources are named resource instances .).

After you create a resource definition version that contains the resources you want to deploy, you must add it to your group version. For more information, see AWS::Greengrass::Group .

In an CloudFormation template, ResourceDefinitionVersion is the property type of the InitialVersion property in the AWS::Greengrass::ResourceDefinition resource.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_greengrass as greengrass } from 'aws-cdk-lib';
const resourceDefinitionVersionProperty: greengrass.CfnResourceDefinition.ResourceDefinitionVersionProperty = {
  resources: [{
    id: 'id',
    name: 'name',
    resourceDataContainer: {
      localDeviceResourceData: {
        sourcePath: 'sourcePath',

        // the properties below are optional
        groupOwnerSetting: {
          autoAddGroupOwner: false,

          // the properties below are optional
          groupOwner: 'groupOwner',
        },
      },
      localVolumeResourceData: {
        destinationPath: 'destinationPath',
        sourcePath: 'sourcePath',

        // the properties below are optional
        groupOwnerSetting: {
          autoAddGroupOwner: false,

          // the properties below are optional
          groupOwner: 'groupOwner',
        },
      },
      s3MachineLearningModelResourceData: {
        destinationPath: 'destinationPath',
        s3Uri: 's3Uri',

        // the properties below are optional
        ownerSetting: {
          groupOwner: 'groupOwner',
          groupPermission: 'groupPermission',
        },
      },
      sageMakerMachineLearningModelResourceData: {
        destinationPath: 'destinationPath',
        sageMakerJobArn: 'sageMakerJobArn',

        // the properties below are optional
        ownerSetting: {
          groupOwner: 'groupOwner',
          groupPermission: 'groupPermission',
        },
      },
      secretsManagerSecretResourceData: {
        arn: 'arn',

        // the properties below are optional
        additionalStagingLabelsToDownload: ['additionalStagingLabelsToDownload'],
      },
    },
  }],
};
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_greengrass as greengrass

resource_definition_version_property = greengrass.CfnResourceDefinition.ResourceDefinitionVersionProperty(
    resources=[greengrass.CfnResourceDefinition.ResourceInstanceProperty(
        id="id",
        name="name",
        resource_data_container=greengrass.CfnResourceDefinition.ResourceDataContainerProperty(
            local_device_resource_data=greengrass.CfnResourceDefinition.LocalDeviceResourceDataProperty(
                source_path="sourcePath",

                # the properties below are optional
                group_owner_setting=greengrass.CfnResourceDefinition.GroupOwnerSettingProperty(
                    auto_add_group_owner=False,

                    # the properties below are optional
                    group_owner="groupOwner"
                )
            ),
            local_volume_resource_data=greengrass.CfnResourceDefinition.LocalVolumeResourceDataProperty(
                destination_path="destinationPath",
                source_path="sourcePath",

                # the properties below are optional
                group_owner_setting=greengrass.CfnResourceDefinition.GroupOwnerSettingProperty(
                    auto_add_group_owner=False,

                    # the properties below are optional
                    group_owner="groupOwner"
                )
            ),
            s3_machine_learning_model_resource_data=greengrass.CfnResourceDefinition.S3MachineLearningModelResourceDataProperty(
                destination_path="destinationPath",
                s3_uri="s3Uri",

                # the properties below are optional
                owner_setting=greengrass.CfnResourceDefinition.ResourceDownloadOwnerSettingProperty(
                    group_owner="groupOwner",
                    group_permission="groupPermission"
                )
            ),
            sage_maker_machine_learning_model_resource_data=greengrass.CfnResourceDefinition.SageMakerMachineLearningModelResourceDataProperty(
                destination_path="destinationPath",
                sage_maker_job_arn="sageMakerJobArn",

                # the properties below are optional
                owner_setting=greengrass.CfnResourceDefinition.ResourceDownloadOwnerSettingProperty(
                    group_owner="groupOwner",
                    group_permission="groupPermission"
                )
            ),
            secrets_manager_secret_resource_data=greengrass.CfnResourceDefinition.SecretsManagerSecretResourceDataProperty(
                arn="arn",

                # the properties below are optional
                additional_staging_labels_to_download=["additionalStagingLabelsToDownload"]
            )
        )
    )]
)
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.greengrass.*;

ResourceDefinitionVersionProperty resourceDefinitionVersionProperty = ResourceDefinitionVersionProperty.builder()
        .resources(List.of(ResourceInstanceProperty.builder()
                .id("id")
                .name("name")
                .resourceDataContainer(ResourceDataContainerProperty.builder()
                        .localDeviceResourceData(LocalDeviceResourceDataProperty.builder()
                                .sourcePath("sourcePath")

                                // the properties below are optional
                                .groupOwnerSetting(GroupOwnerSettingProperty.builder()
                                        .autoAddGroupOwner(false)

                                        // the properties below are optional
                                        .groupOwner("groupOwner")
                                        .build())
                                .build())
                        .localVolumeResourceData(LocalVolumeResourceDataProperty.builder()
                                .destinationPath("destinationPath")
                                .sourcePath("sourcePath")

                                // the properties below are optional
                                .groupOwnerSetting(GroupOwnerSettingProperty.builder()
                                        .autoAddGroupOwner(false)

                                        // the properties below are optional
                                        .groupOwner("groupOwner")
                                        .build())
                                .build())
                        .s3MachineLearningModelResourceData(S3MachineLearningModelResourceDataProperty.builder()
                                .destinationPath("destinationPath")
                                .s3Uri("s3Uri")

                                // the properties below are optional
                                .ownerSetting(ResourceDownloadOwnerSettingProperty.builder()
                                        .groupOwner("groupOwner")
                                        .groupPermission("groupPermission")
                                        .build())
                                .build())
                        .sageMakerMachineLearningModelResourceData(SageMakerMachineLearningModelResourceDataProperty.builder()
                                .destinationPath("destinationPath")
                                .sageMakerJobArn("sageMakerJobArn")

                                // the properties below are optional
                                .ownerSetting(ResourceDownloadOwnerSettingProperty.builder()
                                        .groupOwner("groupOwner")
                                        .groupPermission("groupPermission")
                                        .build())
                                .build())
                        .secretsManagerSecretResourceData(SecretsManagerSecretResourceDataProperty.builder()
                                .arn("arn")

                                // the properties below are optional
                                .additionalStagingLabelsToDownload(List.of("additionalStagingLabelsToDownload"))
                                .build())
                        .build())
                .build()))
        .build();
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.Greengrass;

var resourceDefinitionVersionProperty = new ResourceDefinitionVersionProperty {
    Resources = new [] { new ResourceInstanceProperty {
        Id = "id",
        Name = "name",
        ResourceDataContainer = new ResourceDataContainerProperty {
            LocalDeviceResourceData = new LocalDeviceResourceDataProperty {
                SourcePath = "sourcePath",

                // the properties below are optional
                GroupOwnerSetting = new GroupOwnerSettingProperty {
                    AutoAddGroupOwner = false,

                    // the properties below are optional
                    GroupOwner = "groupOwner"
                }
            },
            LocalVolumeResourceData = new LocalVolumeResourceDataProperty {
                DestinationPath = "destinationPath",
                SourcePath = "sourcePath",

                // the properties below are optional
                GroupOwnerSetting = new GroupOwnerSettingProperty {
                    AutoAddGroupOwner = false,

                    // the properties below are optional
                    GroupOwner = "groupOwner"
                }
            },
            S3MachineLearningModelResourceData = new S3MachineLearningModelResourceDataProperty {
                DestinationPath = "destinationPath",
                S3Uri = "s3Uri",

                // the properties below are optional
                OwnerSetting = new ResourceDownloadOwnerSettingProperty {
                    GroupOwner = "groupOwner",
                    GroupPermission = "groupPermission"
                }
            },
            SageMakerMachineLearningModelResourceData = new SageMakerMachineLearningModelResourceDataProperty {
                DestinationPath = "destinationPath",
                SageMakerJobArn = "sageMakerJobArn",

                // the properties below are optional
                OwnerSetting = new ResourceDownloadOwnerSettingProperty {
                    GroupOwner = "groupOwner",
                    GroupPermission = "groupPermission"
                }
            },
            SecretsManagerSecretResourceData = new SecretsManagerSecretResourceDataProperty {
                Arn = "arn",

                // the properties below are optional
                AdditionalStagingLabelsToDownload = new [] { "additionalStagingLabelsToDownload" }
            }
        }
    } }
};
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"

resourceDefinitionVersionProperty := &ResourceDefinitionVersionProperty{
	Resources: []interface{}{
		&ResourceInstanceProperty{
			Id: jsii.String("id"),
			Name: jsii.String("name"),
			ResourceDataContainer: &ResourceDataContainerProperty{
				LocalDeviceResourceData: &LocalDeviceResourceDataProperty{
					SourcePath: jsii.String("sourcePath"),

					// the properties below are optional
					GroupOwnerSetting: &GroupOwnerSettingProperty{
						AutoAddGroupOwner: jsii.Boolean(false),

						// the properties below are optional
						GroupOwner: jsii.String("groupOwner"),
					},
				},
				LocalVolumeResourceData: &LocalVolumeResourceDataProperty{
					DestinationPath: jsii.String("destinationPath"),
					SourcePath: jsii.String("sourcePath"),

					// the properties below are optional
					GroupOwnerSetting: &GroupOwnerSettingProperty{
						AutoAddGroupOwner: jsii.Boolean(false),

						// the properties below are optional
						GroupOwner: jsii.String("groupOwner"),
					},
				},
				S3MachineLearningModelResourceData: &S3MachineLearningModelResourceDataProperty{
					DestinationPath: jsii.String("destinationPath"),
					S3Uri: jsii.String("s3Uri"),

					// the properties below are optional
					OwnerSetting: &ResourceDownloadOwnerSettingProperty{
						GroupOwner: jsii.String("groupOwner"),
						GroupPermission: jsii.String("groupPermission"),
					},
				},
				SageMakerMachineLearningModelResourceData: &SageMakerMachineLearningModelResourceDataProperty{
					DestinationPath: jsii.String("destinationPath"),
					SageMakerJobArn: jsii.String("sageMakerJobArn"),

					// the properties below are optional
					OwnerSetting: &ResourceDownloadOwnerSettingProperty{
						GroupOwner: jsii.String("groupOwner"),
						GroupPermission: jsii.String("groupPermission"),
					},
				},
				SecretsManagerSecretResourceData: &SecretsManagerSecretResourceDataProperty{
					Arn: jsii.String("arn"),

					// the properties below are optional
					AdditionalStagingLabelsToDownload: []*string{
						jsii.String("additionalStagingLabelsToDownload"),
					},
				},
			},
		},
	},
}

Properties ​

resourcesIResolvable | IResolvable | CfnResourceDefinition.ResourceInstanceProperty[]resourcestyping.Union[IResolvable, typing.List[typing.Union[IResolvable, ResourceInstanceProperty]]]resourcesIResolvableResourcesIResolvableResourcesinterface{}required#
The resources in this version.