Asset and model states - AWS IoT SiteWise

Asset and model states

When you create, update, or delete an asset, an asset model, or a component model, the changes take time to propagate. AWS IoT SiteWise resolves these operations asynchronously and updates the status of each resource. Each asset, asset model, and component model has a status field that contains the state of the resource and any error message, if applicable. The state can be one of the following values:

  • ACTIVE – The resource is active. This is the only state in which you can query and interact with assets, asset models, and component models.

  • CREATING – The resource is being created.

  • UPDATING – The resource is being updated.

  • DELETING – The resource is being deleted.

  • PROPAGATING – (Asset models and component models only) The changes are propagating to all dependent resources (from asset model to assets, or from component model to asset models).

  • FAILED – The resource failed to validate during a create or update operation, possibly due to a circular reference in an expression. You can delete resources that are in the FAILED state.

Some of the create, update, and delete operations in AWS IoT SiteWise place an asset, asset model, or component model in a state other than ACTIVE while the operation resolves. To query or interact with a resource after you perform one of these operations, you must wait until the state changes to ACTIVE. Otherwise, your requests fail.

Checking the status of an asset

You can use the AWS IoT SiteWise console or API to check the status of an asset.

Checking the status of an asset (console)

Use the following procedure to check the status of an asset in the AWS IoT SiteWise console.

To check the status of an asset (console)
  1. Navigate to the AWS IoT SiteWise console.

  2. In the navigation pane, choose Assets.

  3. Choose the asset to check.

    Tip

    You can choose the arrow icon to expand an asset hierarchy to find your asset.

  4. Find Status in the Asset details panel.

    
                AWS IoT SiteWise Asset details panel with Status as Active.

Checking the status of an asset (AWS CLI)

You can use the AWS Command Line Interface (AWS CLI) to check the status of an asset.

To check the status of an asset, use the DescribeAsset operation with the assetId parameter.

To check the status of an asset (AWS CLI)
  • Run the following command to describe the asset. Replace asset-id with the asset's ID or external ID. The external ID is a user-defined ID. For more information, see Referencing objects with external IDs in the AWS IoT SiteWise User Guide.

    aws iotsitewise describe-asset --asset-id asset-id

    The operation returns a response that contains the asset's details. The response contains an assetStatus object that has the following structure:

    { ... "assetStatus": { "state": "String", "error": { "code": "String", "message": "String" } } }

    The asset's state is in assetStatus.state in the JSON object.

Checking the status of an asset model or component model

You can use the AWS IoT SiteWise console or API to check the status of an asset model or component model.

Checking the status of an asset model or component model (console)

Use the following procedure to check the status of an asset model or component model in the AWS IoT SiteWise console.

Tip

Asset models and component models are both listed under Models in the navigation pane. The Details panel of the selected asset model or component model indicates which type it is.

To check the status of an asset model or component model (console)
  1. Navigate to the AWS IoT SiteWise console.

  2. In the navigation pane, choose Models.

  3. Choose the model to check.

  4. Find Status in the Details panel.

    
                AWS IoT SiteWise "Asset model" page screenshot with asset model status
                  highlighted.

Checking the status of an asset model or component model (AWS CLI)

You can use the AWS CLI to check the status of an asset model or component model.

To check the status of an asset model or component model, use the DescribeAssetModel operation with the assetModelId parameter.

Tip

The AWS CLI defines component models as a type of asset model. Therefore, you use the same DescribeAssetModel operation for both types of model. The assetModelType field in the response indicates whether it's an ASSET_MODEL or a COMPONENT_MODEL.

To check the status of an asset model or component model (AWS CLI)
  • Run the following command to describe the model. Replace asset-model-id with the ID or the external ID of the asset model or component model. The external ID is a user-defined ID. For more information, see Referencing objects with external IDs in the AWS IoT SiteWise User Guide.

    aws iotsitewise describe-asset-model --asset-model-id asset-model-id

    The operation returns a response that contains the model's details. The response contains an assetModelStatus object that has the following structure.

    { ... "assetModelStatus": { "state": "String", "error": { "code": "String", "message": "String" } } }

    The model's state is in assetModelStatus.state in the JSON object.