:doc:`IoT <../../iot>` / Paginator / ListThingPrincipalsV2

*********************
ListThingPrincipalsV2
*********************



.. py:class:: IoT.Paginator.ListThingPrincipalsV2

  ::

    
    paginator = client.get_paginator('list_thing_principals_v2')

  
  

  .. py:method:: paginate(**kwargs)

    Creates an iterator that will paginate through responses from :py:meth:`IoT.Client.list_thing_principals_v2`.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iot-2015-05-28/ListThingPrincipalsV2>`_    


    **Request Syntax**
    ::

      response_iterator = paginator.paginate(
          thingName='string',
          thingPrincipalType='EXCLUSIVE_THING'|'NON_EXCLUSIVE_THING',
          PaginationConfig={
              'MaxItems': 123,
              'PageSize': 123,
              'StartingToken': 'string'
          }
      )
      
    :type thingName: string
    :param thingName: **[REQUIRED]** 

      The name of the thing.

      

    
    :type thingPrincipalType: string
    :param thingPrincipalType: 

      The type of the relation you want to filter in the response. If no value is provided in this field, the response will list all principals, including both the ``EXCLUSIVE_THING`` and ``NON_EXCLUSIVE_THING`` attachment types.

       

      
      * ``EXCLUSIVE_THING`` - Attaches the specified principal to the specified thing, exclusively. The thing will be the only thing that’s attached to the principal.
      

       

      
      * ``NON_EXCLUSIVE_THING`` - Attaches the specified principal to the specified thing. Multiple things can be attached to the principal.
      

      

    
    :type PaginationConfig: dict
    :param PaginationConfig: 

      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.

        

      
    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax**

      
      ::

        {
            'thingPrincipalObjects': [
                {
                    'principal': 'string',
                    'thingPrincipalType': 'EXCLUSIVE_THING'|'NON_EXCLUSIVE_THING'
                },
            ],
            'NextToken': 'string'
        }
        
      **Response Structure**

      

      - *(dict) --* 
        

        - **thingPrincipalObjects** *(list) --* 

          A list of ``thingPrincipalObject`` that represents the principal and the type of relation it has with the thing.

          
          

          - *(dict) --* 

            An object that represents the principal and the type of relation it has with the thing.

            
            

            - **principal** *(string) --* 

              The principal of the thing principal object.

              
            

            - **thingPrincipalType** *(string) --* 

              The type of the relation you want to specify when you attach a principal to a thing. The value defaults to ``NON_EXCLUSIVE_THING``.

               

              
              * ``EXCLUSIVE_THING`` - Attaches the specified principal to the specified thing, exclusively. The thing will be the only thing that’s attached to the principal.
              

               

              
              * ``NON_EXCLUSIVE_THING`` - Attaches the specified principal to the specified thing. Multiple things can be attached to the principal.
              

              
        
      
        

        - **NextToken** *(string) --* 

          A token to resume pagination.

          
    