ResourceInstanceProperty Struct
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 CloudFormation template, the Resources property of the AWS::Greengrass::ResourceDefinitionVersion resource contains a list of ResourceInstance property types.
| Source | |
|---|---|
| Type last changed |
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'],
},
},
};
# 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_instance_property = greengrass.CfnResourceDefinitionVersion.ResourceInstanceProperty(
id="id",
name="name",
resource_data_container=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"]
)
)
)
// 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.*;
ResourceInstanceProperty resourceInstanceProperty = 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();
// 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 resourceInstanceProperty = 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" }
}
}
};
// 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"
resourceInstanceProperty := &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
This value must be unique within the resource definition version. Maximum length is 128 characters with pattern [a-zA-Z0-9:_-]+ .
Maximum length 128 characters with pattern [a-zA-Z0-9:_-]+. This must be unique within a Greengrass group.
resourceDataContainerIResolvable | CfnResourceDefinitionVersion.resource_data_containertyping.Union[IResolvable, ResourceDataContainerProperty]resourceDataContainerIResolvableResourceDataContainerIResolvableResourceDataContainerinterface{} required #notes
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
ResourceDataContainerinstance.