IoTSiteWise / Paginator / ListAssetRelationships

ListAssetRelationships#

class IoTSiteWise.Paginator.ListAssetRelationships#
paginator = client.get_paginator('list_asset_relationships')
paginate(**kwargs)#

Creates an iterator that will paginate through responses from IoTSiteWise.Client.list_asset_relationships().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    assetId='string',
    traversalType='PATH_TO_ROOT',
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters:
  • assetId (string) –

    [REQUIRED]

    The ID of 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.

  • traversalType (string) –

    [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.

  • PaginationConfig (dict) –

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) –

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) –

      The size of each page.

    • StartingToken (string) –

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type:

dict

Returns:

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) –

      A token to resume pagination.