IoTSiteWise / Client / describe_asset

describe_asset#

IoTSiteWise.Client.describe_asset(**kwargs)#

Retrieves information about an asset.

See also: AWS API Documentation

Request Syntax

response = client.describe_asset(
    assetId='string',
    excludeProperties=True|False
)
Parameters:
  • assetId (string) –

    [REQUIRED]

    The ID of the asset.

  • excludeProperties (boolean) – Whether or not to exclude asset properties from the response.

Return type:

dict

Returns:

Response Syntax

{
    'assetId': 'string',
    'assetArn': 'string',
    'assetName': 'string',
    'assetModelId': 'string',
    'assetProperties': [
        {
            'id': 'string',
            'name': 'string',
            'alias': 'string',
            'notification': {
                'topic': 'string',
                'state': 'ENABLED'|'DISABLED'
            },
            'dataType': 'STRING'|'INTEGER'|'DOUBLE'|'BOOLEAN'|'STRUCT',
            'dataTypeSpec': 'string',
            'unit': 'string'
        },
    ],
    'assetHierarchies': [
        {
            'id': 'string',
            'name': 'string'
        },
    ],
    'assetCompositeModels': [
        {
            'name': 'string',
            'description': 'string',
            'type': 'string',
            'properties': [
                {
                    'id': 'string',
                    'name': 'string',
                    'alias': 'string',
                    'notification': {
                        'topic': 'string',
                        'state': 'ENABLED'|'DISABLED'
                    },
                    'dataType': 'STRING'|'INTEGER'|'DOUBLE'|'BOOLEAN'|'STRUCT',
                    'dataTypeSpec': 'string',
                    'unit': 'string'
                },
            ],
            'id': 'string'
        },
    ],
    'assetCreationDate': datetime(2015, 1, 1),
    'assetLastUpdateDate': datetime(2015, 1, 1),
    'assetStatus': {
        'state': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'FAILED',
        'error': {
            'code': 'VALIDATION_ERROR'|'INTERNAL_FAILURE',
            'message': 'string',
            'details': [
                {
                    'code': 'INCOMPATIBLE_COMPUTE_LOCATION'|'INCOMPATIBLE_FORWARDING_CONFIGURATION',
                    'message': 'string'
                },
            ]
        }
    },
    'assetDescription': 'string'
}

Response Structure

  • (dict) –

    • assetId (string) –

      The ID of the asset.

    • assetArn (string) –

      The ARN of the asset, which has the following format.

      arn:${Partition}:iotsitewise:${Region}:${Account}:asset/${AssetId}

    • assetName (string) –

      The name of the asset.

    • assetModelId (string) –

      The ID of the asset model that was used to create the asset.

    • assetProperties (list) –

      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.

      • (dict) –

        Contains asset property information.

        • id (string) –

          The ID of the asset property.

        • name (string) –

          The name of the property.

        • alias (string) –

          The alias that identifies the property, such as an OPC-UA server data stream path (for example, /company/windfarm/3/turbine/7/temperature). For more information, see Mapping industrial data streams to asset properties in the IoT SiteWise User Guide.

        • notification (dict) –

          The asset property’s notification topic and state. For more information, see UpdateAssetProperty.

          • topic (string) –

            The MQTT topic to which IoT SiteWise publishes property value update notifications.

          • state (string) –

            The current notification state.

        • dataType (string) –

          The data type of the asset property.

        • dataTypeSpec (string) –

          The data type of the structure for this property. This parameter exists on properties that have the STRUCT data type.

        • unit (string) –

          The unit (such as Newtons or RPM) of the asset property.

    • assetHierarchies (list) –

      A list of asset hierarchies that each contain a hierarchyId. A hierarchy specifies allowed parent/child asset relationships.

      • (dict) –

        Describes an asset hierarchy that contains a hierarchy’s name and ID.

        • id (string) –

          The ID of the hierarchy. This ID is a hierarchyId.

        • name (string) –

          The hierarchy name provided in the CreateAssetModel or UpdateAssetModel API operation.

    • assetCompositeModels (list) –

      The composite models for the asset.

      • (dict) –

        Contains information about a composite model in an asset. This object contains the asset’s properties that you define in the composite model.

        • name (string) –

          The name of the composite model.

        • description (string) –

          The description of the composite model.

        • type (string) –

          The type of the composite model. For alarm composite models, this type is AWS/ALARM.

        • properties (list) –

          The asset properties that this composite model defines.

          • (dict) –

            Contains asset property information.

            • id (string) –

              The ID of the asset property.

            • name (string) –

              The name of the property.

            • alias (string) –

              The alias that identifies the property, such as an OPC-UA server data stream path (for example, /company/windfarm/3/turbine/7/temperature). For more information, see Mapping industrial data streams to asset properties in the IoT SiteWise User Guide.

            • notification (dict) –

              The asset property’s notification topic and state. For more information, see UpdateAssetProperty.

              • topic (string) –

                The MQTT topic to which IoT SiteWise publishes property value update notifications.

              • state (string) –

                The current notification state.

            • dataType (string) –

              The data type of the asset property.

            • dataTypeSpec (string) –

              The data type of the structure for this property. This parameter exists on properties that have the STRUCT data type.

            • unit (string) –

              The unit (such as Newtons or RPM) of the asset property.

        • id (string) –

          The ID of the asset composite model.

    • assetCreationDate (datetime) –

      The date the asset was created, in Unix epoch time.

    • assetLastUpdateDate (datetime) –

      The date the asset was last updated, in Unix epoch time.

    • assetStatus (dict) –

      The current status of the asset, which contains a state and any error message.

      • state (string) –

        The current status of the asset.

      • error (dict) –

        Contains associated error information, if any.

        • code (string) –

          The error code.

        • message (string) –

          The error message.

        • details (list) –

          A list of detailed errors.

          • (dict) –

            Contains detailed error information.

            • code (string) –

              The error code.

            • message (string) –

              The error message.

    • assetDescription (string) –

      A description for the asset.

Exceptions

  • IoTSiteWise.Client.exceptions.InvalidRequestException

  • IoTSiteWise.Client.exceptions.ResourceNotFoundException

  • IoTSiteWise.Client.exceptions.InternalFailureException

  • IoTSiteWise.Client.exceptions.ThrottlingException