DeleteProjectCommand

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.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { RekognitionClient, DeleteProjectCommand } from "@aws-sdk/client-rekognition"; // ES Modules import
// const { RekognitionClient, DeleteProjectCommand } = require("@aws-sdk/client-rekognition"); // CommonJS import
const client = new RekognitionClient(config);
const input = { // DeleteProjectRequest
  ProjectArn: "STRING_VALUE", // required
};
const command = new DeleteProjectCommand(input);
const response = await client.send(command);
// { // DeleteProjectResponse
//   Status: "CREATING" || "CREATED" || "DELETING",
// };

Example Usage

 Loading code editor

DeleteProjectCommand Input

See DeleteProjectCommandInput for more details

Parameter
Type
Description
ProjectArn
Required
string | undefined

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

DeleteProjectCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
Status
ProjectStatus | undefined

The current status of the delete project operation.

Throws

Name
Fault
Details
AccessDeniedException
client

You are not authorized to perform the action.

InternalServerError
server

Amazon Rekognition experienced a service issue. Try your call again.

InvalidParameterException
client

Input parameter violated a constraint. Validate your parameter before calling the API operation again.

ProvisionedThroughputExceededException
client

The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition.

ResourceInUseException
client

The specified resource is already being used.

ResourceNotFoundException
client

The resource specified in the request cannot be found.

ThrottlingException
server

Amazon Rekognition is temporarily unable to process the request. Try your call again.

RekognitionServiceException
Base exception class for all service exceptions from Rekognition service.