delete_collection

delete_collection(**kwargs)

Deletes an OpenSearch Serverless collection. For more information, see Creating and managing Amazon OpenSearch Serverless collections.

See also: AWS API Documentation

Request Syntax

response = client.delete_collection(
    clientToken='string',
    id='string'
)
Parameters
  • clientToken (string) --

    A unique, case-sensitive identifier to ensure idempotency of the request.

    This field is autopopulated if not provided.

  • id (string) --

    [REQUIRED]

    The unique identifier of the collection. For example, 1iu5usc406kd . The ID is part of the collection endpoint. You can also retrieve it using the ListCollections API.

Return type

dict

Returns

Response Syntax

{
    'deleteCollectionDetail': {
        'id': 'string',
        'name': 'string',
        'status': 'CREATING'|'DELETING'|'ACTIVE'|'FAILED'
    }
}

Response Structure

  • (dict) --

    • deleteCollectionDetail (dict) --

      Details of the deleted collection.

      • id (string) --

        The unique identifier of the collection.

      • name (string) --

        The name of the collection.

      • status (string) --

        The current status of the collection.

Exceptions

  • OpenSearchServiceServerless.Client.exceptions.InternalServerException
  • OpenSearchServiceServerless.Client.exceptions.ResourceNotFoundException
  • OpenSearchServiceServerless.Client.exceptions.ConflictException
  • OpenSearchServiceServerless.Client.exceptions.ValidationException