CloudDirectory / Client / list_object_parent_paths

list_object_parent_paths#

CloudDirectory.Client.list_object_parent_paths(**kwargs)#

Retrieves all available parent paths for any object type such as node, leaf node, policy node, and index node objects. For more information about objects, see Directory Structure.

Use this API to evaluate all parents for an object. The call returns all objects from the root of the directory up to the requested object. The API returns the number of paths based on user-defined MaxResults, in case there are multiple paths to the parent. The order of the paths and nodes returned is consistent among multiple API calls unless the objects are deleted or moved. Paths not leading to the directory root are ignored from the target object.

See also: AWS API Documentation

Request Syntax

response = client.list_object_parent_paths(
    DirectoryArn='string',
    ObjectReference={
        'Selector': 'string'
    },
    NextToken='string',
    MaxResults=123
)
Parameters:
  • DirectoryArn (string) –

    [REQUIRED]

    The ARN of the directory to which the parent path applies.

  • ObjectReference (dict) –

    [REQUIRED]

    The reference that identifies the object whose parent paths are listed.

    • Selector (string) –

      A path selector supports easy selection of an object by the parent/child links leading to it from the directory root. Use the link names from each parent/child link to construct the path. Path selectors start with a slash (/) and link names are separated by slashes. For more information about paths, see Access Objects. You can identify an object in one of the following ways:

      • $ObjectIdentifier - An object identifier is an opaque string provided by Amazon Cloud Directory. When creating objects, the system will provide you with the identifier of the created object. An object’s identifier is immutable and no two objects will ever share the same object identifier. To identify an object with ObjectIdentifier, the ObjectIdentifier must be wrapped in double quotes.

      • /some/path - Identifies the object based on path

      • #SomeBatchReference - Identifies the object in a batch call

  • NextToken (string) – The pagination token.

  • MaxResults (integer) – The maximum number of items to be retrieved in a single call. This is an approximate number.

Return type:

dict

Returns:

Response Syntax

{
    'PathToObjectIdentifiersList': [
        {
            'Path': 'string',
            'ObjectIdentifiers': [
                'string',
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) –

    • PathToObjectIdentifiersList (list) –

      Returns the path to the ObjectIdentifiers that are associated with the directory.

      • (dict) –

        Returns the path to the ObjectIdentifiers that is associated with the directory.

        • Path (string) –

          The path that is used to identify the object starting from directory root.

        • ObjectIdentifiers (list) –

          Lists ObjectIdentifiers starting from directory root to the object in the request.

          • (string) –

    • NextToken (string) –

      The pagination token.

Exceptions