Class CfnResourceDefinitionVersion

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.greengrass.CfnResourceDefinitionVersion
All Implemented Interfaces:
IInspectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)", date="2024-10-05T03:43:44.239Z") @Stability(Stable) public class CfnResourceDefinitionVersion extends CfnResource implements IInspectable
The AWS::Greengrass::ResourceDefinitionVersion resource represents a resource definition version for AWS IoT Greengrass .

A resource definition version contains a list of resources. (In AWS CloudFormation , resources are named resource instances .)

To create a resource definition version, you must specify the ID of the resource definition that you want to associate with the version. For information about creating a resource definition, see AWS::Greengrass::ResourceDefinition .

After you create a 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 .

Example:

 // 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.*;
 CfnResourceDefinitionVersion cfnResourceDefinitionVersion = CfnResourceDefinitionVersion.Builder.create(this, "MyCfnResourceDefinitionVersion")
         .resourceDefinitionId("resourceDefinitionId")
         .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();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnResourceDefinitionVersion

      protected CfnResourceDefinitionVersion(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnResourceDefinitionVersion

      protected CfnResourceDefinitionVersion(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnResourceDefinitionVersion

      @Stability(Stable) public CfnResourceDefinitionVersion(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnResourceDefinitionVersionProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrId

      @Stability(Stable) @NotNull public String getAttrId()
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getResourceDefinitionId

      @Stability(Stable) @NotNull public String getResourceDefinitionId()
      The ID of the resource definition associated with this version.
    • setResourceDefinitionId

      @Stability(Stable) public void setResourceDefinitionId(@NotNull String value)
      The ID of the resource definition associated with this version.
    • getResources

      @Stability(Stable) @NotNull public Object getResources()
      The resources in this version.
    • setResources

      @Stability(Stable) public void setResources(@NotNull IResolvable value)
      The resources in this version.
    • setResources

      @Stability(Stable) public void setResources(@NotNull List<Object> value)
      The resources in this version.