delete_collection

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.

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

See also: AWS API Documentation

Request Syntax

response = client.delete_collection(
    CollectionId='string'
)
Parameters
CollectionId (string) --

[REQUIRED]

ID of the collection to delete.

Return type
dict
Returns
Response Syntax
{
    'StatusCode': 123
}

Response Structure

  • (dict) --
    • StatusCode (integer) --

      HTTP status code that indicates the result of the operation.

Exceptions

  • Rekognition.Client.exceptions.InvalidParameterException
  • Rekognition.Client.exceptions.AccessDeniedException
  • Rekognition.Client.exceptions.InternalServerError
  • Rekognition.Client.exceptions.ThrottlingException
  • Rekognition.Client.exceptions.ProvisionedThroughputExceededException
  • Rekognition.Client.exceptions.ResourceNotFoundException

Examples

This operation deletes a Rekognition collection.

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

print(response)

Expected Output:

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