CfnResourceDefinitionProps
Struct External
Properties for defining a CfnResourceDefinition.
| Source |
|---|
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';
declare const tags: any;
const cfnResourceDefinitionProps: greengrass.CfnResourceDefinitionProps = {
name: 'name',
// the properties below are optional
initialVersion: {
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'],
},
},
}],
},
tags: tags,
};
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
# tags: Any
cfn_resource_definition_props = greengrass.CfnResourceDefinitionProps(
name="name",
# the properties below are optional
initial_version=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"]
)
)
)]
),
tags=tags
)
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.*;
Object tags;
CfnResourceDefinitionProps cfnResourceDefinitionProps = CfnResourceDefinitionProps.builder()
.name("name")
// the properties below are optional
.initialVersion(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())
.tags(tags)
.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 tags;
var cfnResourceDefinitionProps = new CfnResourceDefinitionProps {
Name = "name",
// the properties below are optional
InitialVersion = 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" }
}
}
} }
},
Tags = tags
};
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"
var tags interface{}
cfnResourceDefinitionProps := &CfnResourceDefinitionProps{
Name: jsii.String("name"),
// the properties below are optional
InitialVersion: &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"),
},
},
},
},
},
},
Tags: tags,
}
Properties
initialVersionoptionalIResolvable | CfnResourceDefinition.initial_versionoptionaltyping.Union[IResolvable, ResourceDefinitionVersionProperty]initialVersionoptionalIResolvableInitialVersionoptionalIResolvableInitialVersionoptionalinterface{} #The resource definition version to include when the resource definition is created.
notes
A resource definition version contains a list of resource instance property types.
To associate a resource definition version after the resource definition is created, create an
AWS::Greengrass::ResourceDefinitionVersionresource and specify the ID of this resource definition.
The name of the resource definition.
Application-specific metadata to attach to the resource definition.
notes
You can use tags in IAM policies to control access to AWS IoT Greengrass resources. You can also use tags to categorize your resources. For more information, see Tagging Your AWS IoT Greengrass Resources in the Developer Guide .
This Json property type is processed as a map of key-value pairs. It uses the following format, which is different from most Tags implementations in CloudFormation templates.
json
"Tags": { "KeyName0": "value", "KeyName1": "value", "KeyName2": "value"
}