Class CfnAsset
- All Implemented Interfaces:
IConstruct
,IDependable
,IInspectable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
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();
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Describes an asset hierarchy that contains achildAssetId
andhierarchyLogicalId
.static interface
Contains asset property information.static final class
A fluent builder forCfnAsset
.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionA description for the asset.A list of asset hierarchies that each contain ahierarchyLogicalId
.The ID of the asset model from which to create the asset.A unique, friendly name for the asset.The list of asset properties for the asset.The ARN of the asset.The ID of the asset.getTags()
A list of key-value pairs that contain metadata for the asset.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
setAssetDescription
(String value) A description for the asset.void
setAssetHierarchies
(List<Object> value) A list of asset hierarchies that each contain ahierarchyLogicalId
.void
setAssetHierarchies
(IResolvable value) A list of asset hierarchies that each contain ahierarchyLogicalId
.void
setAssetModelId
(String value) The ID of the asset model from which to create the asset.void
setAssetName
(String value) A unique, friendly name for the asset.void
setAssetProperties
(List<Object> value) The list of asset properties for the asset.void
setAssetProperties
(IResolvable value) The list of asset properties for the asset.Methods inherited from class software.amazon.awscdk.core.CfnResource
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.core.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
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 newAWS::IoTSiteWise::Asset
.- Parameters:
scope
-- scope in which this resource is defined.
id
-- scoped id of the resource.
props
-- resource properties.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- Parameters:
inspector
-- tree inspector to collect and process attributes.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getAttrAssetArn
The ARN of the asset. -
getAttrAssetId
The ID of the asset. -
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
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
The ID of the asset model from which to create the asset. -
setAssetModelId
The ID of the asset model from which to create the asset. -
getAssetName
A unique, friendly name for the asset.The maximum length is 256 characters with the pattern
[^\ u0000-\ u001F\ u007F]+
. -
setAssetName
A unique, friendly name for the asset.The maximum length is 256 characters with the pattern
[^\ u0000-\ u001F\ u007F]+
. -
getAssetDescription
A description for the asset. -
setAssetDescription
A description for the asset. -
getAssetHierarchies
A list of asset hierarchies that each contain ahierarchyLogicalId
.A hierarchy specifies allowed parent/child asset relationships.
-
setAssetHierarchies
A list of asset hierarchies that each contain ahierarchyLogicalId
.A hierarchy specifies allowed parent/child asset relationships.
-
setAssetHierarchies
A list of asset hierarchies that each contain ahierarchyLogicalId
.A hierarchy specifies allowed parent/child asset relationships.
-
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
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
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.
-