DeleteCompilationJobCommand

Deletes the specified compilation job. This action deletes only the compilation job resource in Amazon SageMaker AI. It doesn't delete other resources that are related to that job, such as the model artifacts that the job creates, the compilation logs in CloudWatch, the compiled model, or the IAM role.

You can delete a compilation job only if its current status is COMPLETED, FAILED, or STOPPED. If the job status is STARTING or INPROGRESS, stop the job, and then delete it after its status becomes STOPPED.

Example Syntax

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

import { SageMakerClient, DeleteCompilationJobCommand } from "@aws-sdk/client-sagemaker"; // ES Modules import
// const { SageMakerClient, DeleteCompilationJobCommand } = require("@aws-sdk/client-sagemaker"); // CommonJS import
const client = new SageMakerClient(config);
const input = { // DeleteCompilationJobRequest
  CompilationJobName: "STRING_VALUE", // required
};
const command = new DeleteCompilationJobCommand(input);
const response = await client.send(command);
// {};

DeleteCompilationJobCommand Input

Parameter
Type
Description
CompilationJobName
Required
string | undefined

The name of the compilation job to delete.

DeleteCompilationJobCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.

Throws

Name
Fault
Details
ResourceNotFound
client

Resource being access is not found.

SageMakerServiceException
Base exception class for all service exceptions from SageMaker service.