deleteCollection method
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.
May throw AccessDeniedException.
May throw InternalServerError.
May throw InvalidParameterException.
May throw ProvisionedThroughputExceededException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
Parameter collectionId :
ID of the collection to delete.
Implementation
Future<DeleteCollectionResponse> deleteCollection({
required String collectionId,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'RekognitionService.DeleteCollection'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'CollectionId': collectionId,
},
);
return DeleteCollectionResponse.fromJson(jsonResponse.body);
}