deleteProject method

Future<DeleteProjectResponse> deleteProject({
  1. required String projectArn,
})

Deletes a Amazon Rekognition project. To delete a project you must first delete all models or adapters associated with the project. To delete a model or adapter, see DeleteProjectVersion.

DeleteProject is an asynchronous operation. To check if the project is deleted, call DescribeProjects. The project is deleted when the project no longer appears in the response. Be aware that deleting a given project will also delete any ProjectPolicies associated with that project.

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

May throw AccessDeniedException. May throw InternalServerError. May throw InvalidParameterException. May throw ProvisionedThroughputExceededException. May throw ResourceInUseException. May throw ResourceNotFoundException. May throw ThrottlingException.

Parameter projectArn : The Amazon Resource Name (ARN) of the project that you want to delete.

Implementation

Future<DeleteProjectResponse> deleteProject({
  required String projectArn,
}) async {
  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);
}