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 InvalidParameterException. May throw AccessDeniedException. May throw InternalServerError. May throw ThrottlingException. May throw ProvisionedThroughputExceededException. May throw ResourceNotFoundException.
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 {
ArgumentError.checkNotNull(collectionId, 'collectionId');
_s.validateStringLength(
'collectionId',
collectionId,
1,
255,
isRequired: true,
);
ArgumentError.checkNotNull(faceIds, 'faceIds');
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);
}