OpenSearchServiceServerless / Client / list_collections

list_collections#

OpenSearchServiceServerless.Client.list_collections(**kwargs)#

Lists all OpenSearch Serverless collections. For more information, see Creating and managing Amazon OpenSearch Serverless collections.

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

Request Syntax

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

    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.

  • maxResults (integer) – The maximum number of results to return. Default is 20. You can use nextToken to get the next page of results.

  • nextToken (string) – 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.

Return type:

dict

Returns:

Response Syntax

{
    'collectionSummaries': [
        {
            'arn': 'string',
            'id': 'string',
            'name': 'string',
            'status': 'CREATING'|'DELETING'|'ACTIVE'|'FAILED'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) –

    • collectionSummaries (list) –

      Details about each collection.

      • (dict) –

        Details about each OpenSearch Serverless collection.

        • arn (string) –

          The Amazon Resource Name (ARN) of the collection.

        • id (string) –

          The unique identifier of the collection.

        • name (string) –

          The name of the collection.

        • status (string) –

          The current status of the 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