deleteProject method
Deletes an Amazon Rekognition Custom Labels project. To delete a project you must first delete all models associated with the project. To delete a model, see DeleteProjectVersion.
This operation requires permissions to perform the
rekognition:DeleteProject
action.
May throw ResourceInUseException. May throw ResourceNotFoundException. May throw InvalidParameterException. May throw AccessDeniedException. May throw InternalServerError. May throw ThrottlingException. May throw ProvisionedThroughputExceededException.
Parameter projectArn
:
The Amazon Resource Name (ARN) of the project that you want to delete.
Implementation
Future<DeleteProjectResponse> deleteProject({
required String projectArn,
}) async {
ArgumentError.checkNotNull(projectArn, 'projectArn');
_s.validateStringLength(
'projectArn',
projectArn,
20,
2048,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'RekognitionService.DeleteProject'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ProjectArn': projectArn,
},
);
return DeleteProjectResponse.fromJson(jsonResponse.body);
}