# ResourceDataContainerProperty

A container for resource data, which defines the resource type.

The container takes only one of the following supported resource data types: `LocalDeviceResourceData` , `LocalVolumeResourceData` , `SageMakerMachineLearningModelResourceData` , `S3MachineLearningModelResourceData` , or `SecretsManagerSecretResourceData` .

> Only one resource type can be defined for a `ResourceDataContainer` instance.

In an CloudFormation template, `ResourceDataContainer` is a property of the [`ResourceInstance`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-resourcedefinitionversion-resourceinstance.html) property type.

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 2023

## Example

TypeScript:

```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 resourceDataContainerProperty: greengrass.CfnResourceDefinitionVersion.ResourceDataContainerProperty = {
  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:

```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_data_container_property = greengrass.CfnResourceDefinitionVersion.ResourceDataContainerProperty(
    local_device_resource_data=greengrass.CfnResourceDefinitionVersion.LocalDeviceResourceDataProperty(
        source_path="sourcePath",

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

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

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

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

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

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

        # the properties below are optional
        additional_staging_labels_to_download=["additionalStagingLabelsToDownload"]
    )
)
```

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.greengrass.*;

ResourceDataContainerProperty resourceDataContainerProperty = 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();
```

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.Greengrass;

var resourceDataContainerProperty = 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" }
    }
};
```

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"

resourceDataContainerProperty := &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

- `localDeviceResourceData`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnResourceDefinitionVersion.LocalDeviceResourceDataProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_greengrass.CfnResourceDefinitionVersion.LocalDeviceResourceDataProperty.html) — Settings for a local device resource.

- `localVolumeResourceData`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnResourceDefinitionVersion.LocalVolumeResourceDataProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_greengrass.CfnResourceDefinitionVersion.LocalVolumeResourceDataProperty.html) — Settings for a local volume resource.

- `s3MachineLearningModelResourceData`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnResourceDefinitionVersion.S3MachineLearningModelResourceDataProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_greengrass.CfnResourceDefinitionVersion.S3MachineLearningModelResourceDataProperty.html) — Settings for a machine learning resource stored in Amazon S3 .

- `sageMakerMachineLearningModelResourceData`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnResourceDefinitionVersion.SageMakerMachineLearningModelResourceDataProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_greengrass.CfnResourceDefinitionVersion.SageMakerMachineLearningModelResourceDataProperty.html) — Settings for a machine learning resource saved as an SageMaker AI training job.

- `secretsManagerSecretResourceData`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnResourceDefinitionVersion.SecretsManagerSecretResourceDataProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_greengrass.CfnResourceDefinitionVersion.SecretsManagerSecretResourceDataProperty.html) — Settings for a secret resource.
