CancelCopyImage

Last Updated: Feb 26, 2018

Description

Cancels a pending image copy (CopyImage) operation. When you call this interface, consider the following:

  • After you cancel the task, the destination image created in the target region is deleted, and the source image remains unchanged.

  • If the image copy process is completed, the action CancelCopyImage fails and an error returns.

Request parameters

Name Type Required Description
Action String Yes The name of this interface. Value: CancelCopyImage.
RegionId String Yes ID of the region to where the source image belongs.
ImageId String Yes ID of the source image that is being copied.

Response parameters

All parameters are common response parameters. For more information, see Common parameters.

Examples

Request example

  1. https://ecs.aliyuncs.com/?Action=CancelCopyImage
  2. &RegionId=cn-hangzhou
  3. &ImageId=img-2012-12-01-1300
  4. &<Common Request Parameters>

Response example

XML format

  1. <CancelCopyImageResponse>
  2. <RequestId>C8B26B44-0189-443E-9816-D951F59623A9</RequestId>
  3. </CancelCopyImageResponse>

JSON format

  1. {
  2. "RequestId": "C8B26B44-0189-443E-9816-D951F59623A9"
  3. }

Error codes

Error code Error message HTTP status code Meaning
ImageCreatedNotFromCopy The specified image is not the target image of a copy action. 400 The specified ImageId has no image copy task. Please try other images instead.
IncorrectImageStatus The image has completed copy. 400 This action fails because the image copy task of the specified ImageId is already complete.
IncorrectImageStatus The image is copied finished. 400 This action fails because the image copy task of the specified ImageId is already complete.
IncorrectImageStatus The specified snapshot is not coping. 400 The status of the specified ImageId is incorrect.
IncorrectImageStatus The specified image is not coping. 400 The status of the specified ImageId is incorrect.
IncorrectImageStatus The Image copy has been failed. 400 The status of the specified ImageId is incorrect.
InvalidImageId.NotFound The specified ImageId does not exist. 404 The specified ImageId does not exist.
InvalidRegionId.NotFound The specified region does not exist. 404 The specified RegionId does not exist. For more information, see Regions and zones.
Thank you! We've received your feedback.