IoTSiteWise / Client / delete_asset

delete_asset#

IoTSiteWise.Client.delete_asset(**kwargs)#

Deletes an asset. This action can’t be undone. For more information, see Deleting assets and models in the IoT SiteWise User Guide.

Note

You can’t delete an asset that’s associated to another asset. For more information, see DisassociateAssets.

See also: AWS API Documentation

Request Syntax

response = client.delete_asset(
    assetId='string',
    clientToken='string'
)
Parameters:
  • assetId (string) –

    [REQUIRED]

    The ID of the asset to delete.

  • clientToken (string) –

    A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don’t reuse this client token if a new idempotent request is required.

    This field is autopopulated if not provided.

Return type:

dict

Returns:

Response Syntax

{
    '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'
                },
            ]
        }
    }
}

Response Structure

  • (dict) –

    • assetStatus (dict) –

      The status of the asset, which contains a state ( DELETING after successfully calling this operation) 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.

Exceptions

  • IoTSiteWise.Client.exceptions.InvalidRequestException

  • IoTSiteWise.Client.exceptions.ResourceNotFoundException

  • IoTSiteWise.Client.exceptions.InternalFailureException

  • IoTSiteWise.Client.exceptions.ThrottlingException

  • IoTSiteWise.Client.exceptions.ConflictingOperationException