Skip to main content

associated_assets

Creates, updates, deletes, gets or lists an associated_assets resource.

Overview

Nameassociated_assets
TypeResource
Idaws.iotsitewise.associated_assets

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe ID of the asset, in UUID format. (pattern: <code>^(?!00000000-0000-0000-0000-000000000000)[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$</code>)
namestringThe name of the asset. (pattern: <code>[^\u0000-\u001F\u007F]+</code>)
arnstringThe ARN of the asset, which has the following format. arn:${Partition}:iotsitewise:${Region}:${Account}:asset/${AssetId} (pattern: <code>^arn:aws(-cn|-us-gov)?:[a-zA-Z0-9-:/_.]+$</code>)
asset_model_idstringThe ID of the asset model used to create the asset. (pattern: <code>^(?!00000000-0000-0000-0000-000000000000)[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$</code>)
creation_datestring (date-time)The date the asset was created, in Unix epoch time.
descriptionstringA description for the asset. (pattern: <code>[^\u0000-\u001F\u007F]+</code>)
external_idstringThe external ID of the asset. For more information, see Using external IDs in the IoT SiteWise User Guide. (pattern: <code>[a-zA-Z0-9_][a-zA-Z_-0-9.:]*[a-zA-Z0-9_]+</code>)
hierarchiesarrayA list of asset hierarchies that each contain a hierarchyId. A hierarchy specifies allowed parent/child asset relationships.
last_update_datestring (date-time)The date the asset was last updated, in Unix epoch time.
statusobjectThe current status of the asset.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_associated_assetsselectasset_id, regionhierarchyId, traversalDirection, nextToken, maxResultsRetrieves a paginated list of associated assets. You can use this operation to do the following: CHILD - List all child assets associated to the asset. PARENT - List the asset's parent asset.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
asset_idstringThe ID of the asset to query. This can be either the actual ID in UUID format, or else externalId: followed by the external ID, if it has one. For more information, see Referencing objects with external IDs in the IoT SiteWise User Guide.
regionstringAWS region (default: us-east-1)
hierarchyIdstring(Optional) If you don't provide a hierarchyId, all the immediate assets in the traversalDirection will be returned. The ID of the hierarchy by which child assets are associated to the asset. (This can be either the actual ID in UUID format, or else externalId: followed by the external ID, if it has one. For more information, see Referencing objects with external IDs in the IoT SiteWise User Guide.) For more information, see Asset hierarchies in the IoT SiteWise User Guide.
maxResultsintegerThe maximum number of results to return for each paginated request. Default: 50
nextTokenstringThe token to be used for the next set of paginated results.
traversalDirectionstringThe direction to list associated assets. Choose one of the following options: CHILD – The list includes all child assets associated to the asset. PARENT – The list includes the asset's parent asset. Default: CHILD

SELECT examples

Retrieves a paginated list of associated assets. You can use this operation to do the following: CHILD - List all child assets associated to the asset. PARENT - List the asset's parent asset.

SELECT
id,
name,
arn,
asset_model_id,
creation_date,
description,
external_id,
hierarchies,
last_update_date,
status
FROM aws.iotsitewise.associated_assets
WHERE asset_id = '{{ asset_id }}' -- required
AND region = '{{ region }}' -- required
AND hierarchyId = '{{ hierarchyId }}'
AND traversalDirection = '{{ traversalDirection }}'
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;