deleteFaces method
Deletes faces from a collection. You specify a collection ID and an array of face IDs to remove from the collection.
This operation requires permissions to perform the
rekognition:DeleteFaces action.
May throw AccessDeniedException.
May throw InternalServerError.
May throw InvalidParameterException.
May throw ProvisionedThroughputExceededException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
Parameter collectionId :
Collection from which to remove the specific faces.
Parameter faceIds :
An array of face IDs to delete.
Implementation
Future<DeleteFacesResponse> deleteFaces({
required String collectionId,
required List<String> faceIds,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'RekognitionService.DeleteFaces'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'CollectionId': collectionId,
'FaceIds': faceIds,
},
);
return DeleteFacesResponse.fromJson(jsonResponse.body);
}