:doc:`SESV2 <../../sesv2>` / Client / list_tenants

************
list_tenants
************



.. py:method:: SESV2.Client.list_tenants(**kwargs)

  

  List all tenants associated with your account in the current Amazon Web Services Region.

   

  This operation returns basic information about each tenant, such as tenant name, ID, ARN, and creation timestamp.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/sesv2-2019-09-27/ListTenants>`_  


  **Request Syntax**
  ::

    response = client.list_tenants(
        NextToken='string',
        PageSize=123
    )
    
  :type NextToken: string
  :param NextToken: 

    A token returned from a previous call to ``ListTenants`` to indicate the position in the list of tenants.

    

  
  :type PageSize: integer
  :param PageSize: 

    The number of results to show in a single call to ``ListTenants``. If the number of results is larger than the number you specified in this parameter, then the response includes a ``NextToken`` element, which you can use to obtain additional results.

    

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

    
    ::

      {
          'Tenants': [
              {
                  'TenantName': 'string',
                  'TenantId': 'string',
                  'TenantArn': 'string',
                  'CreatedTimestamp': datetime(2015, 1, 1)
              },
          ],
          'NextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 

      Information about tenants associated with your account.

      
      

      - **Tenants** *(list) --* 

        An array that contains basic information about each tenant.

        
        

        - *(dict) --* 

          A structure that contains basic information about a tenant.

          
          

          - **TenantName** *(string) --* 

            The name of the tenant.

            
          

          - **TenantId** *(string) --* 

            A unique identifier for the tenant.

            
          

          - **TenantArn** *(string) --* 

            The Amazon Resource Name (ARN) of the tenant.

            
          

          - **CreatedTimestamp** *(datetime) --* 

            The date and time when the tenant was created.

            
      
    
      

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

        A token that indicates that there are additional tenants to list. To view additional tenants, issue another request to ``ListTenants``, and pass this token in the ``NextToken`` parameter.

        
  
  **Exceptions**
  
  *   :py:class:`SESV2.Client.exceptions.TooManyRequestsException`

  
  *   :py:class:`SESV2.Client.exceptions.BadRequestException`

  