:doc:`SES <../../ses>` / Client / list_identities

***************
list_identities
***************



.. py:method:: SES.Client.list_identities(**kwargs)

  

  Returns a list containing all of the identities (email addresses and domains) for your Amazon Web Services account in the current Amazon Web Services Region, regardless of verification status.

   

  You can execute this operation no more than once per second.

   

  .. note::

    

    It's recommended that for successive pagination calls of this API, you continue to the use the same parameter/value pairs as used in the original call, e.g., if you used ``IdentityType=Domain`` in the the original call and received a ``NextToken`` in the response, you should continue providing the ``IdentityType=Domain`` parameter for further ``NextToken`` calls; however, if you didn't provide the ``IdentityType`` parameter in the original call, then continue to not provide it for successive pagination calls. Using this protocol will ensure consistent results.

    

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/ListIdentities>`_  


  **Request Syntax**
  ::

    response = client.list_identities(
        IdentityType='EmailAddress'|'Domain',
        NextToken='string',
        MaxItems=123
    )
    
  :type IdentityType: string
  :param IdentityType: 

    The type of the identities to list. Possible values are "EmailAddress" and "Domain". If this parameter is omitted, then all identities are listed.

    

  
  :type NextToken: string
  :param NextToken: 

    The token to use for pagination.

    

  
  :type MaxItems: integer
  :param MaxItems: 

    The maximum number of identities per page. Possible values are 1-1000 inclusive.

    

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

    
    ::

      {
          'Identities': [
              'string',
          ],
          'NextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 

      A list of all identities that you have attempted to verify under your Amazon Web Services account, regardless of verification status.

      
      

      - **Identities** *(list) --* 

        A list of identities.

        
        

        - *(string) --* 
    
      

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

        The token used for pagination.

        
  

  **Examples**

  The following example lists the email address identities that have been submitted for verification with Amazon SES:
  ::

    response = client.list_identities(
        IdentityType='EmailAddress',
        MaxItems=123,
        NextToken='',
    )
    
    print(response)

  
  Expected Output:
  ::

    {
        'Identities': [
            'user@example.com',
        ],
        'NextToken': '',
        'ResponseMetadata': {
            '...': '...',
        },
    }

  