:doc:`OpenSearchServiceServerless <../../opensearchserverless>` / Client / list_collections

****************
list_collections
****************



.. py:method:: OpenSearchServiceServerless.Client.list_collections(**kwargs)

  

  Lists all OpenSearch Serverless collections. For more information, see `Creating and managing Amazon OpenSearch Serverless collections <https://docs.aws.amazon.com/opensearch-service/latest/developerguide/serverless-manage.html>`__.

   

  .. note::

    

    Make sure to include an empty request body {} if you don't include any collection filters in the request.

    

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/opensearchserverless-2021-11-01/ListCollections>`_  


  **Request Syntax**
  ::

    response = client.list_collections(
        collectionFilters={
            'name': 'string',
            'status': 'CREATING'|'DELETING'|'ACTIVE'|'FAILED',
            'collectionGroupName': 'string'
        },
        nextToken='string',
        maxResults=123
    )
    
  :type collectionFilters: dict
  :param collectionFilters: 

    A list of filter names and values that you can use for requests.

    

  
    - **name** *(string) --* 

      The name of the collection.

      

    
    - **status** *(string) --* 

      The current status of the collection.

      

    
    - **collectionGroupName** *(string) --* 

      The name of the collection group to filter by.

      

    
  
  :type nextToken: string
  :param nextToken: 

    If your initial ``ListCollections`` operation returns a ``nextToken``, you can include the returned ``nextToken`` in subsequent ``ListCollections`` operations, which returns results in the next page.

    

  
  :type maxResults: integer
  :param maxResults: 

    The maximum number of results to return. Default is 20. You can use ``nextToken`` to get the next page of results.

    

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

    
    ::

      {
          'collectionSummaries': [
              {
                  'id': 'string',
                  'name': 'string',
                  'status': 'CREATING'|'DELETING'|'ACTIVE'|'FAILED',
                  'arn': 'string',
                  'kmsKeyArn': 'string',
                  'collectionGroupName': 'string'
              },
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **collectionSummaries** *(list) --* 

        Details about each collection.

        
        

        - *(dict) --* 

          Details about each OpenSearch Serverless collection.

          
          

          - **id** *(string) --* 

            The unique identifier of the collection.

            
          

          - **name** *(string) --* 

            The name of the collection.

            
          

          - **status** *(string) --* 

            The current status of the collection.

            
          

          - **arn** *(string) --* 

            The Amazon Resource Name (ARN) of the collection.

            
          

          - **kmsKeyArn** *(string) --* 

            The ARN of the Amazon Web Services Key Management Service key used to encrypt the collection.

            
          

          - **collectionGroupName** *(string) --* 

            The name of the collection group that contains this collection.

            
      
    
      

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

        When ``nextToken`` is returned, there are more results available. The value of ``nextToken`` is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page.

        
  
  **Exceptions**
  
  *   :py:class:`OpenSearchServiceServerless.Client.exceptions.InternalServerException`

  
  *   :py:class:`OpenSearchServiceServerless.Client.exceptions.ValidationException`

  