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

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-22T02:24:03.228Z") @Stability(Stable) public class CfnAsset extends CfnResource implements IInspectable, ITaggable
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")
         .assetExternalId("assetExternalId")
         .assetHierarchies(List.of(AssetHierarchyProperty.builder()
                 .childAssetId("childAssetId")
                 // the properties below are optional
                 .externalId("externalId")
                 .id("id")
                 .logicalId("logicalId")
                 .build()))
         .assetProperties(List.of(AssetPropertyProperty.builder()
                 .alias("alias")
                 .externalId("externalId")
                 .id("id")
                 .logicalId("logicalId")
                 .notificationState("notificationState")
                 .unit("unit")
                 .build()))
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .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

    • CfnAsset

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

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

      @Stability(Stable) public CfnAsset(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnAssetProps 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.
    • 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()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getTags in interface ITaggable
    • 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 friendly name for the asset.
    • setAssetName

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

      @Stability(Stable) @Nullable public String getAssetDescription()
      The ID of the asset, in UUID format.
    • setAssetDescription

      @Stability(Stable) public void setAssetDescription(@Nullable String value)
      The ID of the asset, in UUID format.
    • getAssetExternalId

      @Stability(Stable) @Nullable public String getAssetExternalId()
      The external ID of the asset model composite model.
    • setAssetExternalId

      @Stability(Stable) public void setAssetExternalId(@Nullable String value)
      The external ID of the asset model composite model.
    • getAssetHierarchies

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

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

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

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

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

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

      @Stability(Stable) @Nullable public List<CfnTag> getTagsRaw()
      A list of key-value pairs that contain metadata for the asset.
    • setTagsRaw

      @Stability(Stable) public void setTagsRaw(@Nullable List<CfnTag> value)
      A list of key-value pairs that contain metadata for the asset.