Interface CfnResourceDefinitionVersion.IResourceInstanceProperty
A local resource, machine learning resource, or secret resource.
Namespace: Amazon.CDK.AWS.Greengrass
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IResourceInstanceProperty
Syntax (vb)
Public Interface IResourceInstanceProperty
Remarks
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.
ExampleMetadata: fixture=_generated
Examples
// 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" }
}
}
};
Synopsis
Properties
Id | A descriptive or arbitrary ID for the resource. |
Name | The descriptive resource name, which is displayed on the AWS IoT Greengrass console. |
ResourceDataContainer | A container for resource data. |
Properties
Id
A descriptive or arbitrary ID for the resource.
string Id { get; }
Property Value
System.String
Remarks
This value must be unique within the resource definition version. Maximum length is 128 characters with pattern [a-zA-Z0-9:_-]+
.
Name
The descriptive resource name, which is displayed on the AWS IoT Greengrass console.
string Name { get; }
Property Value
System.String
Remarks
Maximum length 128 characters with pattern [a-zA-Z0-9:_-]+. This must be unique within a Greengrass group.
ResourceDataContainer
A container for resource data.
object ResourceDataContainer { get; }
Property Value
System.Object
Remarks
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.