aws-cdk-lib.aws_greengrass.CfnResourceDefinitionVersion.ResourceInstanceProperty

interface ResourceInstanceProperty

LanguageType name
.NETAmazon.CDK.AWS.Greengrass.CfnResourceDefinitionVersion.ResourceInstanceProperty
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsgreengrass#CfnResourceDefinitionVersion_ResourceInstanceProperty
Javasoftware.amazon.awscdk.services.greengrass.CfnResourceDefinitionVersion.ResourceInstanceProperty
Pythonaws_cdk.aws_greengrass.CfnResourceDefinitionVersion.ResourceInstanceProperty
TypeScript aws-cdk-lib » aws_greengrass » CfnResourceDefinitionVersion » ResourceInstanceProperty

A local resource, machine learning resource, or secret resource.

For more information, see Access Local Resources with Lambda Functions , Perform Machine Learning Inference , and Deploy Secrets to the AWS IoT Greengrass Core in the Developer Guide .

In an AWS CloudFormation template, the Resources property of the AWS::Greengrass::ResourceDefinitionVersion resource contains a list of ResourceInstance property types.

Example

// 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 resourceInstanceProperty: greengrass.CfnResourceDefinitionVersion.ResourceInstanceProperty = {
  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'],
    },
  },
};

Properties

NameTypeDescription
idstringA descriptive or arbitrary ID for the resource.
namestringThe descriptive resource name, which is displayed on the AWS IoT Greengrass console.
resourceDataContainerIResolvable | ResourceDataContainerPropertyA container for resource data.

id

Type: string

A descriptive or arbitrary ID for the resource.

This value must be unique within the resource definition version. Maximum length is 128 characters with pattern [a-zA-Z0-9:_-]+ .


name

Type: string

The descriptive resource name, which is displayed on the AWS IoT Greengrass console.

Maximum length 128 characters with pattern [a-zA-Z0-9:_-]+. This must be unique within a Greengrass group.


resourceDataContainer

Type: IResolvable | ResourceDataContainerProperty

A container for resource data.

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.