Class CfnResourceDefinition
A CloudFormation AWS::Greengrass::ResourceDefinition
.
Inherited Members
Namespace: Amazon.CDK.AWS.Greengrass
Assembly: Amazon.CDK.AWS.Greengrass.dll
Syntax (csharp)
public class CfnResourceDefinition : CfnResource, IConstruct, IDependable, IInspectable
Syntax (vb)
Public Class CfnResourceDefinition
Inherits CfnResource
Implements IConstruct, IDependable, IInspectable
Remarks
The AWS::Greengrass::ResourceDefinition
resource represents a resource definition for AWS IoT Greengrass . Resource definitions are used to organize your resource definition versions.
Resource definitions can reference multiple resource definition versions. All resource definition versions must be associated with a resource definition. Each resource definition version can contain one or more resources. (In AWS CloudFormation , resources are named resource instances .)
When you create a resource definition, you can optionally include an initial resource definition version. To associate a resource definition version later, create an AWS::Greengrass::ResourceDefinitionVersion
resource and specify the ID of this resource definition.
After you create the resource definition version that contains the resources you want to deploy, you must add it to your group version. For more information, see AWS::Greengrass::Group
.
CloudformationResource: AWS::Greengrass::ResourceDefinition
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 tags;
var cfnResourceDefinition = new CfnResourceDefinition(this, "MyCfnResourceDefinition", 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
});
Synopsis
Constructors
CfnResourceDefinition(Construct, String, ICfnResourceDefinitionProps) | Create a new |
CfnResourceDefinition(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnResourceDefinition(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
AttrArn | The Amazon Resource Name (ARN) of the |
AttrId | The ID of the |
AttrLatestVersionArn | The ARN of the last |
AttrName | The name of the |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
InitialVersion | The resource definition version to include when the resource definition is created. |
Name | The name of the resource definition. |
Tags | Application-specific metadata to attach to the resource definition. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnResourceDefinition(Construct, String, ICfnResourceDefinitionProps)
Create a new AWS::Greengrass::ResourceDefinition
.
public CfnResourceDefinition(Construct scope, string id, ICfnResourceDefinitionProps props)
Parameters
- scope Construct
- scope in which this resource is defined.
- id System.String
- scoped id of the resource.
- props ICfnResourceDefinitionProps
- resource properties.
CfnResourceDefinition(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnResourceDefinition(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnResourceDefinition(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnResourceDefinition(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
AttrArn
The Amazon Resource Name (ARN) of the ResourceDefinition
, such as arn:aws:greengrass:us-east-1: :/greengrass/definition/resources/1234a5b6-78cd-901e-2fgh-3i45j6k178l9
.
public virtual string AttrArn { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Arn
AttrId
The ID of the ResourceDefinition
, such as 1234a5b6-78cd-901e-2fgh-3i45j6k178l9
.
public virtual string AttrId { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Id
AttrLatestVersionArn
The ARN of the last ResourceDefinitionVersion
that was added to the ResourceDefinition
, such as arn:aws:greengrass:us-east-1: :/greengrass/definition/resources/1234a5b6-78cd-901e-2fgh-3i45j6k178l9/versions/9876ac30-4bdb-4f9d-95af-b5fdb66be1a2
.
public virtual string AttrLatestVersionArn { get; }
Property Value
System.String
Remarks
CloudformationAttribute: LatestVersionArn
AttrName
The name of the ResourceDefinition
, such as MyResourceDefinition
.
public virtual string AttrName { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Name
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
InitialVersion
The resource definition version to include when the resource definition is created.
public virtual object InitialVersion { get; set; }
Property Value
System.Object
Remarks
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::ResourceDefinitionVersion
resource and specify the ID of this resource definition.
Name
The name of the resource definition.
public virtual string Name { get; set; }
Property Value
System.String
Remarks
Tags
Application-specific metadata to attach to the resource definition.
public virtual TagManager Tags { get; }
Property Value
Remarks
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 AWS CloudFormation templates.
"Tags": { "KeyName0": "value", "KeyName1": "value", "KeyName2": "value"
}
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
- tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>