:doc:`CloudDirectory <../../clouddirectory>` / Client / list_object_parent_paths

************************
list_object_parent_paths
************************



.. py:method:: 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 <https://docs.aws.amazon.com/clouddirectory/latest/developerguide/key_concepts_directorystructure.html>`__.

   

  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 <https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2017-01-11/ListObjectParentPaths>`_  


  **Request Syntax**
  ::

    response = client.list_object_parent_paths(
        DirectoryArn='string',
        ObjectReference={
            'Selector': 'string'
        },
        NextToken='string',
        MaxResults=123
    )
    
  :type DirectoryArn: string
  :param DirectoryArn: **[REQUIRED]** 

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

    

  
  :type ObjectReference: dict
  :param ObjectReference: **[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 <https://docs.aws.amazon.com/clouddirectory/latest/developerguide/directory_objects_access_objects.html>`__. 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
      

      

    
  
  :type NextToken: string
  :param NextToken: 

    The pagination token.

    

  
  :type MaxResults: integer
  :param MaxResults: 

    The maximum number of items to be retrieved in a single call. This is an approximate number.

    

  
  
  :rtype: 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**
  
  *   :py:class:`CloudDirectory.Client.exceptions.InternalServiceException`

  
  *   :py:class:`CloudDirectory.Client.exceptions.InvalidArnException`

  
  *   :py:class:`CloudDirectory.Client.exceptions.RetryableConflictException`

  
  *   :py:class:`CloudDirectory.Client.exceptions.ValidationException`

  
  *   :py:class:`CloudDirectory.Client.exceptions.LimitExceededException`

  
  *   :py:class:`CloudDirectory.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`CloudDirectory.Client.exceptions.DirectoryNotEnabledException`

  
  *   :py:class:`CloudDirectory.Client.exceptions.InvalidNextTokenException`

  
  *   :py:class:`CloudDirectory.Client.exceptions.ResourceNotFoundException`

  