list_associated_assets
async
¶
list_associated_assets(
asset_id: CustomID,
*,
config_overrides: Optional[AsyncIoTSiteWiseClientConfig] = None,
hierarchy_id: Optional[CustomID] = None,
traversal_direction: Optional[TraversalDirection] = None,
next_token: Optional[NextToken] = None,
max_results: Optional[MaxResults] = None,
) -> ListAssociatedAssetsResponse
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.
Parameters:
-
asset_id(CustomID) –The 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. -
hierarchy_id(Optional[CustomID], default:None) –(Optional) If you don't provide a
hierarchyId, all the immediate assets in thetraversalDirectionwill 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.
-
traversal_direction(Optional[TraversalDirection], default:None) –The 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 -
-
next_token(Optional[NextToken], default:None) –The token to be used for the next set of paginated results.
-
max_results(Optional[MaxResults], default:None) –The maximum number of results to return for each paginated request.
Default: 50
Raises:
-
InternalFailureException–IoT SiteWise can't process your request right now. Try again later.
-
InvalidRequestException–The request isn't valid. This can occur if your request contains malformed JSON or unsupported characters. Check your request and try again.
-
ResourceNotFoundException–The requested resource can't be found.
-
ThrottlingException–Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise assets that can be created per second, the allowed number of messages per second, and so on.
For more information, see Quotas in the IoT SiteWise User Guide.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_iotsitewise/_services/async_io_t_site_wise.py
7743 7744 7745 7746 7747 7748 7749 7750 7751 7752 7753 7754 7755 7756 7757 7758 7759 7760 7761 7762 7763 7764 7765 7766 7767 7768 7769 7770 7771 7772 7773 7774 7775 7776 7777 7778 7779 7780 7781 7782 7783 7784 7785 7786 7787 7788 7789 7790 7791 7792 7793 7794 7795 7796 7797 7798 7799 7800 7801 7802 7803 7804 7805 7806 7807 7808 | |