:doc:`IAMRolesAnywhere <../../rolesanywhere>` / Client / list_subjects

*************
list_subjects
*************



.. py:method:: IAMRolesAnywhere.Client.list_subjects(**kwargs)

  

  Lists the subjects in the authenticated account and Amazon Web Services Region.

   

  **Required permissions:** ``rolesanywhere:ListSubjects``.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/rolesanywhere-2018-05-10/ListSubjects>`_  


  **Request Syntax**
  ::

    response = client.list_subjects(
        nextToken='string',
        pageSize=123
    )
    
  :type nextToken: string
  :param nextToken: 

    A token that indicates where the output should continue from, if a previous request did not show all results. To get the next results, make the request again with this value.

    

  
  :type pageSize: integer
  :param pageSize: 

    The number of resources in the paginated list.

    

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

    
    ::

      {
          'subjects': [
              {
                  'subjectArn': 'string',
                  'subjectId': 'string',
                  'enabled': True|False,
                  'x509Subject': 'string',
                  'lastSeenAt': datetime(2015, 1, 1),
                  'createdAt': datetime(2015, 1, 1),
                  'updatedAt': datetime(2015, 1, 1)
              },
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **subjects** *(list) --* 

        A list of subjects.

        
        

        - *(dict) --* 

          A summary representation of subjects.

          
          

          - **subjectArn** *(string) --* 

            The ARN of the resource.

            
          

          - **subjectId** *(string) --* 

            The id of the resource.

            
          

          - **enabled** *(boolean) --* 

            The enabled status of the subject.

            
          

          - **x509Subject** *(string) --* 

            The x509 principal identifier of the authenticating certificate.

            
          

          - **lastSeenAt** *(datetime) --* 

            The ISO-8601 time stamp of when the certificate was last used in a temporary credential request.

            
          

          - **createdAt** *(datetime) --* 

            The ISO-8601 time stamp of when the certificate was first used in a temporary credential request.

            
          

          - **updatedAt** *(datetime) --* 

            The ISO-8601 timestamp when the subject was last updated.

            
      
    
      

      - **nextToken** *(string) --* 

        A token that indicates where the output should continue from, if a previous request did not show all results. To get the next results, make the request again with this value.

        
  
  **Exceptions**
  
  *   :py:class:`IAMRolesAnywhere.Client.exceptions.ValidationException`

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

  