Updated on 2026-11-06 GMT+08:00

Deleting an Image Snapshot

Function

This API is used to delete a specified image snapshot. Snapshots being created cannot be deleted. This API is synchronous. There are no accompanying APIs or specific scenarios.

Calling Method

For details, see Calling APIs.

URI

DELETE /v2/images/{image_id}/versions/{version_id}/image-snapshots/{image_snapshot_id}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

image_id

Yes

String

Definition: Image ID. You can obtain the image ID by calling the Listing Custom Images API.

Constraints: N/A

Range: 32 to 36 characters. Only letters, digits, and hyphens (-) are allowed.

Default Value: N/A

version_id

Yes

String

Definition: Image version ID. You can obtain the image version ID by calling the Listing Custom Image Versions API.

Constraints: N/A

Range: 32 to 36 characters. Only letters, digits, and hyphens (-) are allowed.

Default Value: N/A

image_snapshot_id

Yes

String

Definition: Image snapshot ID. You can obtain the image snapshot ID by calling the Listing Image Snapshots API.

Constraints: N/A

Range: 32 to 36 characters. Only letters, digits, and hyphens (-) are allowed.

Default Value: N/A

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition: User token. It is obtained by calling the Obtaining an IAM User Token API.

Constraints: N/A

Range: Up to 65,534 characters. Only letters, digits, and special characters are allowed. The token format is defined by IAM. For details about the character set, see the IAM documentation.

Default Value: N/A

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

image_snapshot_id

String

Definition: ID of the deleted image snapshot.

Range: 32 to 36 characters. Only letters, digits, and hyphens (-) are allowed.

Status code: 400

Table 4 Response body parameters

Parameter

Type

Description

error_code

String

Definition: Error code.

Range: 8 to 36 characters.

error_msg

String

Definition: Error description.

Range: 2 to 512 characters.

solution_msg

String

Definition: Solution.

Range: 0 to 4,096 characters.

Status code: 401

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

Definition: Error code.

Range: 8 to 36 characters.

error_msg

String

Definition: Error description.

Range: 2 to 512 characters.

solution_msg

String

Definition: Solution.

Range: 0 to 4,096 characters.

Status code: 403

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Definition: Error code.

Range: 8 to 36 characters.

error_msg

String

Definition: Error description.

Range: 2 to 512 characters.

solution_msg

String

Definition: Solution.

Range: 0 to 4,096 characters.

Status code: 404

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Definition: Error code.

Range: 8 to 36 characters.

error_msg

String

Definition: Error description.

Range: 2 to 512 characters.

solution_msg

String

Definition: Solution.

Range: 0 to 4,096 characters.

Status code: 500

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

Definition: Error code.

Range: 8 to 36 characters.

error_msg

String

Definition: Error description.

Range: 2 to 512 characters.

solution_msg

String

Definition: Solution.

Range: 0 to 4,096 characters.

Example Requests

Delete a specified image snapshot.

DELETE /v2/images/{image_id}/versions/{version_id}/image-snapshots/{image_snapshot_id}

Example Responses

Status code: 200

{
  "image_snapshot_id" : "9a0b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d"
}

Status code: 400

{
  "error_code" : "AIDataLake.00010151",
  "error_msg" : "Parameter value is invalid.",
  "solution_msg" : "Please input valid parameter value."
}

Status code: 401

{
  "error_code" : "APIGW.0301",
  "error_msg" : "Incorrect IAM authentication information: decrypt token fail.",
  "solution_msg" : "Check whether the IAM authentication information is correct."
}

Status code: 403

{
  "error_code" : "AIDataLake.00010150",
  "error_msg" : "The operation is not allowed.",
  "solution_msg" : "Check whether the operation is allowed in the current status."
}

Status code: 404

{
  "error_code" : "AIDataLake.00010401",
  "error_msg" : "Image snapshot not found, ID: 9a0b1c2d-3e4f-5a6b-8c7d-9e0f1a2b3c4d",
  "solution_msg" : "Please check if the image snapshot ID is correct."
}

Status code: 500

{
  "error_code" : "AIDataLake.00011001",
  "error_msg" : "Internal error.",
  "solution_msg" : "Contact technical support or try again later."
}

Status Codes

Status Code

Description

200

Deletion succeeded.

400

Invalid request parameters.

401

Unauthorized.

403

Access denied.

404

Resource not found.

500

Internal server error.