Use DeleteProject with an AWS SDK - AWS SDK Code Examples

There are more AWS SDK examples available in the AWS Doc SDK Examples GitHub repo.

Use DeleteProject with an AWS SDK

The following code example shows how to use DeleteProject.

For more information, see Deleting a project.

Python
SDK for Python (Boto3)
Note

There's more on GitHub. Find the complete example and learn how to set up and run in the AWS Code Examples Repository.

class Projects: @staticmethod def delete_project(lookoutvision_client, project_name): """ Deletes a Lookout for Vision Model :param lookoutvision_client: A Boto3 Lookout for Vision client. :param project_name: The name of the project that you want to delete. """ try: logger.info("Deleting project: %s", project_name) response = lookoutvision_client.delete_project(ProjectName=project_name) logger.info("Deleted project ARN: %s ", response["ProjectArn"]) except ClientError as err: logger.exception("Couldn't delete project %s.", project_name) raise
  • For API details, see DeleteProject in AWS SDK for Python (Boto3) API Reference.