AWS::IoTSiteWise::AssetModel
Creates an asset model from specified property and hierarchy definitions. You create assets from asset models. With asset models, you can easily create assets of the same type that have standardized definitions. Each asset created from a model inherits the asset model's property and hierarchy definitions. For more information, see Defining asset models in the AWS IoT SiteWise User Guide.
You can create two types of asset models, ASSET_MODEL
or
COMPONENT_MODEL
.
-
ASSET_MODEL – (default) An asset model that you can use to create assets. Can't be included as a component in another asset model.
-
COMPONENT_MODEL – A reusable component that you can include in the composite models of other asset models. You can't create assets directly from this type of asset model.
Syntax
To declare this entity in your AWS CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::IoTSiteWise::AssetModel", "Properties" : { "AssetModelCompositeModels" :
[ AssetModelCompositeModel, ... ]
, "AssetModelDescription" :String
, "AssetModelExternalId" :String
, "AssetModelHierarchies" :[ AssetModelHierarchy, ... ]
, "AssetModelName" :String
, "AssetModelProperties" :[ AssetModelProperty, ... ]
, "AssetModelType" :String
, "Tags" :[ Tag, ... ]
} }
YAML
Type: AWS::IoTSiteWise::AssetModel Properties: AssetModelCompositeModels:
- AssetModelCompositeModel
AssetModelDescription:String
AssetModelExternalId:String
AssetModelHierarchies:- AssetModelHierarchy
AssetModelName:String
AssetModelProperties:- AssetModelProperty
AssetModelType:String
Tags:- Tag
Properties
AssetModelCompositeModels
-
The composite models that are part of this asset model. It groups properties (such as attributes, measurements, transforms, and metrics) and child composite models that model parts of your industrial equipment. Each composite model has a type that defines the properties that the composite model supports. Use composite models to define alarms on this asset model.
Note
When creating custom composite models, you need to use CreateAssetModelCompositeModel. For more information, see Creating custom composite models (Components) in the AWS IoT SiteWise User Guide.
Required: No
Type: Array of AssetModelCompositeModel
Update requires: No interruption
AssetModelDescription
-
A description for the asset model.
Required: No
Type: String
Update requires: No interruption
AssetModelExternalId
-
The external ID of the asset model. For more information, see Using external IDs in the AWS IoT SiteWise User Guide.
Required: No
Type: String
Pattern:
[a-zA-Z0-9_][a-zA-Z_\-0-9.:]*[a-zA-Z0-9_]+
Minimum:
2
Maximum:
128
Update requires: No interruption
AssetModelHierarchies
-
The hierarchy definitions of the asset model. Each hierarchy specifies an asset model whose assets can be children of any other assets created from this asset model. For more information, see Asset hierarchies in the AWS IoT SiteWise User Guide.
You can specify up to 10 hierarchies per asset model. For more information, see Quotas in the AWS IoT SiteWise User Guide.
Required: No
Type: Array of AssetModelHierarchy
Update requires: No interruption
AssetModelName
-
A unique name for the asset model.
Required: Yes
Type: String
Update requires: No interruption
AssetModelProperties
-
The property definitions of the asset model. For more information, see Asset properties in the AWS IoT SiteWise User Guide.
You can specify up to 200 properties per asset model. For more information, see Quotas in the AWS IoT SiteWise User Guide.
Required: No
Type: Array of AssetModelProperty
Update requires: No interruption
AssetModelType
-
The type of asset model.
-
ASSET_MODEL – (default) An asset model that you can use to create assets. Can't be included as a component in another asset model.
-
COMPONENT_MODEL – A reusable component that you can include in the composite models of other asset models. You can't create assets directly from this type of asset model.
Required: No
Type: String
Update requires: Replacement
-
-
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.
Required: No
Type: Array of Tag
Update requires: No interruption
Return values
Ref
When you pass the logical ID of this resource to the intrinsic Ref
function, Ref
returns the AssetModelId
.
Fn::GetAtt
The Fn::GetAtt
intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.
For more information about using the Fn::GetAtt
intrinsic function, see Fn::GetAtt
.
AssetModelId
-
The ID of the asset model.
For more information about using the
Ref
function, seeRef
.