java.lang.Object
software.amazon.jsii.JsiiObject
All Implemented Interfaces:
IConstruct, IDependable, IInspectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:29:57.889Z") @Stability(Stable) public class CfnAsset extends CfnResource implements IInspectable
A CloudFormation AWS::IoTSiteWise::Asset.

Creates an asset from an existing asset model. For more information, see Creating assets in the AWS IoT SiteWise User Guide .

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.iotsitewise.*;
 CfnAsset cfnAsset = CfnAsset.Builder.create(this, "MyCfnAsset")
         .assetModelId("assetModelId")
         .assetName("assetName")
         // the properties below are optional
         .assetDescription("assetDescription")
         .assetHierarchies(List.of(AssetHierarchyProperty.builder()
                 .childAssetId("childAssetId")
                 .logicalId("logicalId")
                 .build()))
         .assetProperties(List.of(AssetPropertyProperty.builder()
                 .logicalId("logicalId")
                 // the properties below are optional
                 .alias("alias")
                 .notificationState("notificationState")
                 .unit("unit")
                 .build()))
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .build();
 
  • 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

    • CfnAsset

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

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

      @Stability(Stable) public CfnAsset(@NotNull Construct scope, @NotNull String id, @NotNull CfnAssetProps props)
      Create a new AWS::IoTSiteWise::Asset.

      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      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.
    • getAttrAssetArn

      @Stability(Stable) @NotNull public String getAttrAssetArn()
      The ARN of the asset.
    • getAttrAssetId

      @Stability(Stable) @NotNull public String getAttrAssetId()
      The ID of the asset.
    • getCfnProperties

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

      @Stability(Stable) @NotNull public TagManager getTags()
      A list of key-value pairs that contain metadata for the asset.

      For more information, see Tagging your AWS IoT SiteWise resources in the AWS IoT SiteWise User Guide .

    • getAssetModelId

      @Stability(Stable) @NotNull public String getAssetModelId()
      The ID of the asset model from which to create the asset.
    • setAssetModelId

      @Stability(Stable) public void setAssetModelId(@NotNull String value)
      The ID of the asset model from which to create the asset.
    • getAssetName

      @Stability(Stable) @NotNull public String getAssetName()
      A unique, friendly name for the asset.

      The maximum length is 256 characters with the pattern [^\ u0000-\ u001F\ u007F]+ .

    • setAssetName

      @Stability(Stable) public void setAssetName(@NotNull String value)
      A unique, friendly name for the asset.

      The maximum length is 256 characters with the pattern [^\ u0000-\ u001F\ u007F]+ .

    • getAssetDescription

      @Stability(Stable) @Nullable public String getAssetDescription()
      A description for the asset.
    • setAssetDescription

      @Stability(Stable) public void setAssetDescription(@Nullable String value)
      A description for the asset.
    • getAssetHierarchies

      @Stability(Stable) @Nullable public Object getAssetHierarchies()
      A list of asset hierarchies that each contain a hierarchyLogicalId .

      A hierarchy specifies allowed parent/child asset relationships.

    • setAssetHierarchies

      @Stability(Stable) public void setAssetHierarchies(@Nullable IResolvable value)
      A list of asset hierarchies that each contain a hierarchyLogicalId .

      A hierarchy specifies allowed parent/child asset relationships.

    • setAssetHierarchies

      @Stability(Stable) public void setAssetHierarchies(@Nullable List<Object> value)
      A list of asset hierarchies that each contain a hierarchyLogicalId .

      A hierarchy specifies allowed parent/child asset relationships.

    • getAssetProperties

      @Stability(Stable) @Nullable public Object getAssetProperties()
      The list of asset properties for the asset.

      This object doesn't include properties that you define in composite models. You can find composite model properties in the assetCompositeModels object.

    • setAssetProperties

      @Stability(Stable) public void setAssetProperties(@Nullable IResolvable value)
      The list of asset properties for the asset.

      This object doesn't include properties that you define in composite models. You can find composite model properties in the assetCompositeModels object.

    • setAssetProperties

      @Stability(Stable) public void setAssetProperties(@Nullable List<Object> value)
      The list of asset properties for the asset.

      This object doesn't include properties that you define in composite models. You can find composite model properties in the assetCompositeModels object.