cancelImageCreation

Cancels the creation of an image. This operation can only be used on images in a non-terminal state. Cancellation is asynchronous: the request returns immediately, then Image Builder stops the running build and moves the image to the CANCELLED state. Output resources that the build already created, such as AMIs and snapshots, aren't removed.

Samples

// The following example cancels a build that is in progress for the specified image build version.
val resp = imagebuilderClient.cancelImageCreation {
    imageBuildVersionArn = "arn:aws:imagebuilder:us-west-2:111122223333:image/my-example-recipe/1.0.0/1"
    clientToken = "a1b2c3d4-5678-90ab-cdef-EXAMPLE77777"
}