:doc:`DynamoDB <../../dynamodb>` / Client / list_tables

***********
list_tables
***********



.. py:method:: DynamoDB.Client.list_tables(**kwargs)

  

  Returns an array of table names associated with the current account and endpoint. The output from ``ListTables`` is paginated, with each page returning a maximum of 100 table names.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/ListTables>`_  


  **Request Syntax**
  ::

    response = client.list_tables(
        ExclusiveStartTableName='string',
        Limit=123
    )
    
  :type ExclusiveStartTableName: string
  :param ExclusiveStartTableName: 

    The first table name that this operation will evaluate. Use the value that was returned for ``LastEvaluatedTableName`` in a previous operation, so that you can obtain the next page of results.

    

  
  :type Limit: integer
  :param Limit: 

    A maximum number of table names to return. If this parameter is not specified, the limit is 100.

    

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

    
    ::

      {
          'TableNames': [
              'string',
          ],
          'LastEvaluatedTableName': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 

      Represents the output of a ``ListTables`` operation.

      
      

      - **TableNames** *(list) --* 

        The names of the tables associated with the current account at the current endpoint. The maximum size of this array is 100.

         

        If ``LastEvaluatedTableName`` also appears in the output, you can use this value as the ``ExclusiveStartTableName`` parameter in a subsequent ``ListTables`` request and obtain the next page of results.

        
        

        - *(string) --* 
    
      

      - **LastEvaluatedTableName** *(string) --* 

        The name of the last table in the current page of results. Use this value as the ``ExclusiveStartTableName`` in a new request to obtain the next page of results, until all the table names are returned.

         

        If you do not receive a ``LastEvaluatedTableName`` value in the response, this means that there are no more table names to be retrieved.

        
  
  **Exceptions**
  
  *   :py:class:`DynamoDB.Client.exceptions.InternalServerError`

  

  **Examples**

  This example lists all of the tables associated with the current AWS account and endpoint.
  ::

    response = client.list_tables(
    )
    
    print(response)

  
  Expected Output:
  ::

    {
        'TableNames': [
            'Forum',
            'ProductCatalog',
            'Reply',
            'Thread',
        ],
        'ResponseMetadata': {
            '...': '...',
        },
    }

  