Creating assets
You can create an asset from an asset model. You must have an asset model before you can create an asset. If you haven't created an asset model, see Creating asset models.
Note
You can only create assets from ACTIVE
models. If your model's state isn't
ACTIVE
, you may need to wait for up to a few minutes before you can create
assets from that model. For more information, see Asset and model states.
Creating an asset (console)
You can use the Amazon IoT SiteWise console to create an asset.
To create an asset (console)
Navigate to the Amazon IoT SiteWise console
. -
In the navigation pane, choose Assets.
-
Choose Create asset.
-
On the Create asset page, do the following:
-
For Model, choose the asset model from which to create an asset.
Note
If your model isn't ACTIVE, you must wait until it's active, or resolve issues if it's FAILED.
-
Enter a Name for your asset.
-
(Optional) Add tags for your asset. For more information, see Tagging your Amazon IoT SiteWise resources.
-
Choose Create asset.
When you create an asset, the Amazon IoT SiteWise console navigates to the new asset's page. On this page, you can see the asset's Status, which is initially CREATING. This page automatically updates, so you can wait for the asset's status to update.
Note
The asset creation process can take up to a minute. After the Status is ACTIVE, you can perform update operations on your asset. For more information, see Asset and model states.
-
After you create an asset, see Configuring a new asset.
Creating an asset (CLI)
You can use the Amazon Command Line Interface (Amazon CLI) to create an asset from an asset model.
You must have an assetModelId
to create an asset. If you created an asset
model but don't know its assetModelId
, you can use the ListAssetModels
operation to view all of your asset models.
To create an asset from an asset model, use the CreateAsset operation. Specify the following parameters:
-
assetName
– The new asset's name. Give your asset a friendly name that you can easily identify. -
assetModelId
– The ID of the model from which to create the asset.
To create an asset (CLI)
-
Run the following command to create an asset. Replace
asset-name
with a name for the asset andasset-model-id
with the ID of the asset model.aws iotsitewise create-asset \ --asset-name
asset-name
\ --asset-model-idasset-model-id
The operation returns a response that contains your new asset's details and status in the following format.
{ "assetId": "
String
", "assetArn": "String
", "assetStatus": { "state": "String
", "error": { "code": "String
", "message": "String
" } } }The asset's
state
isCREATING
until the asset creates.Note
The asset creation process can take up to a minute. To check your asset's status, use the DescribeAsset operation with your asset's ID as the
assetId
parameter. After the asset'sstate
isACTIVE
, you can perform update operations on your asset. For more information, see Asset and model states.
After you create an asset, see Configuring a new asset.
Configuring a new asset
Finish configuring your asset with any of the following optional actions:
-
Mapping industrial data streams to asset properties if your asset has measurement properties.
-
Updating attribute values if your asset has unique attribute values.
-
Associating and disassociating assets if your asset is a parent asset.