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

*****************
delete_collection
*****************



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

  

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

  

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


  **Request Syntax**
  ::

    response = client.delete_collection(
        id='string',
        clientToken='string'
    )
    
  :type id: string
  :param id: **[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 <https://docs.aws.amazon.com/opensearch-service/latest/ServerlessAPIReference/API_ListCollections.html>`__ API.

    

  
  :type clientToken: string
  :param clientToken: 

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

    This field is autopopulated if not provided.

  
  
  :rtype: 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**
  
  *   :py:class:`OpenSearchServiceServerless.Client.exceptions.InternalServerException`

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

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

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

  