list_asset_relationships
(**kwargs)¶Retrieves a paginated list of asset relationships for an asset. You can use this operation to identify an asset's root asset and all associated assets between that asset and its root.
See also: AWS API Documentation
Request Syntax
response = client.list_asset_relationships(
assetId='string',
traversalType='PATH_TO_ROOT',
nextToken='string',
maxResults=123
)
[REQUIRED]
The ID of the asset.
[REQUIRED]
The type of traversal to use to identify asset relationships. Choose the following option:
PATH_TO_ROOT
– Identify the asset's parent assets up to the root asset. The asset that you specify in assetId
is the first result in the list of assetRelationshipSummaries
, and the root asset is the last result.dict
Response Syntax
{
'assetRelationshipSummaries': [
{
'hierarchyInfo': {
'parentAssetId': 'string',
'childAssetId': 'string'
},
'relationshipType': 'HIERARCHY'
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
assetRelationshipSummaries (list) --
A list that summarizes each asset relationship.
(dict) --
Contains information about assets that are related to one another.
hierarchyInfo (dict) --
The assets that are related through an asset hierarchy.
This object is present if the relationshipType
is HIERARCHY
.
parentAssetId (string) --
The ID of the parent asset in this asset relationship.
childAssetId (string) --
The ID of the child asset in this asset relationship.
relationshipType (string) --
The relationship type of the assets in this relationship. This value is one of the following:
HIERARCHY
– The assets are related through an asset hierarchy. If you specify this relationship type, this asset relationship includes the hierarchyInfo
object.nextToken (string) --
The token for the next set of results, or null if there are no additional results.
Exceptions
IoTSiteWise.Client.exceptions.InvalidRequestException
IoTSiteWise.Client.exceptions.InternalFailureException
IoTSiteWise.Client.exceptions.ResourceNotFoundException
IoTSiteWise.Client.exceptions.ThrottlingException