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
Nested ClassesModifier and TypeClassDescriptionstatic interfaceDescribes an asset hierarchy that contains achildAssetIdandhierarchyLogicalId.static interfaceContains asset property information.static final classA fluent builder forCfnAsset.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
Constructors -
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.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetAssetDescription(String value) A description for the asset.voidsetAssetHierarchies(List<Object> value) A list of asset hierarchies that each contain ahierarchyLogicalId.voidsetAssetHierarchies(IResolvable value) A list of asset hierarchies that each contain ahierarchyLogicalId.voidsetAssetModelId(String value) The ID of the asset model from which to create the asset.voidsetAssetName(String value) A unique, friendly name for the asset.voidsetAssetProperties(List<Object> value) The list of asset properties for the asset.voidsetAssetProperties(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, validatePropertiesMethods inherited from class software.amazon.awscdk.core.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validateMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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:
inspectin 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:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrAssetArn
The ARN of the asset. -
getAttrAssetId
The ID of the asset. -
getCfnProperties
- Overrides:
getCfnPropertiesin 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
assetCompositeModelsobject. -
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
assetCompositeModelsobject. -
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
assetCompositeModelsobject.
-