:doc:`Rekognition <../../rekognition>` / Client / delete_collection

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



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

  

  Deletes the specified collection. Note that this operation removes all faces in the collection. For an example, see `Deleting a collection <https://docs.aws.amazon.com/rekognition/latest/dg/delete-collection-procedure.html>`__.

   

  This operation requires permissions to perform the ``rekognition:DeleteCollection`` action.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/rekognition-2016-06-27/DeleteCollection>`_  


  **Request Syntax**
  ::

    response = client.delete_collection(
        CollectionId='string'
    )
    
  :type CollectionId: string
  :param CollectionId: **[REQUIRED]** 

    ID of the collection to delete.

    

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

    
    ::

      {
          'StatusCode': 123
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **StatusCode** *(integer) --* 

        HTTP status code that indicates the result of the operation.

        
  
  **Exceptions**
  
  *   :py:class:`Rekognition.Client.exceptions.InvalidParameterException`

  
  *   :py:class:`Rekognition.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`Rekognition.Client.exceptions.InternalServerError`

  
  *   :py:class:`Rekognition.Client.exceptions.ThrottlingException`

  
  *   :py:class:`Rekognition.Client.exceptions.ProvisionedThroughputExceededException`

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

  

  **Examples**

  This operation deletes a Rekognition collection.
  ::

    response = client.delete_collection(
        CollectionId='myphotos',
    )
    
    print(response)

  
  Expected Output:
  ::

    {
        'StatusCode': 200,
        'ResponseMetadata': {
            '...': '...',
        },
    }

  