Delete builds in Amazon CodeBuild - Amazon CodeBuild
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Delete builds in Amazon CodeBuild

You can use the Amazon CLI or the Amazon SDKs to delete builds in Amazon CodeBuild.

Delete builds (Amazon CLI)

Run the batch-delete-builds command:

aws codebuild batch-delete-builds --ids ids

In the preceding command, replace the following placeholder:

If successful, a buildsDeleted array appears in the output, containing the Amazon Resource Name (ARN) of each build that was successfully deleted. Information about builds that were not successfully deleted appears in output within a buildsNotDeleted array.

For example, if you run this command:

aws codebuild batch-delete-builds --ids my-demo-build-project:f8b888d2-5e1e-4032-8645-b115195648EX my-other-demo-build-project:a18bc6ee-e499-4887-b36a-8c90349c7eEX

Information similar to the following appears in the output:

{ "buildsNotDeleted": [ { "id": "arn:aws:codebuild:us-west-2:123456789012:build/my-demo-build-project:f8b888d2-5e1e-4032-8645-b115195648EX", "statusCode": "BUILD_IN_PROGRESS" } ], "buildsDeleted": [ "arn:aws:codebuild:us-west-2:123456789012:build/my-other-demo-build-project:a18bc6ee-e499-4887-b36a-8c90349c7eEX" ] }

Delete builds (Amazon SDKs)

For information about using Amazon CodeBuild with the Amazon SDKs, see the Amazon SDKs and tools reference.