Deletes a custom image.
Description
You can delete a custom image that you no longer need. After the custom image is deleted, the simple application servers that were created from the custom image cannot be reset by using the custom image.
QPS limits
The queries per second (QPS) limit for a single user for the API operation is 10 calls per minute. If the number of calls to the API operation per minute exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. For more information, see QPS limit.
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DeleteCustomImage |
The operation that you want to perform. Set the value to DeleteCustomImage. |
RegionId | String | Yes | cn-hangzhou |
The region ID of the custom image. You can call the ListRegions operation to query the most recent region list. |
ClientToken | String | No | 123e4567-e89b-12d3-a456-426655440000 |
The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must ensure that it is unique among different requests. The token can only contain ASCII characters and cannot exceed 64 characters in length. For more information, see How to ensure idempotence. |
ImageId | String | Yes | m-2zehv38jjmwva1ee**** |
The ID of the custom image. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 30637AD6-D977-4833-A54C-CC89483E**** |
The ID of the request. |
Examples
Sample requests
https://swas.cn-hangzhou.aliyuncs.com/?Action=DeleteCustomImage
&ImageId=m-2zehv38jjmwva1ee****
&RegionId=cn-hangzhou
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<DeleteCustomImageResponse>
<RequestId>30637AD6-D977-4833-A54C-CC89483E****</RequestId>
</DeleteCustomImageResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"DeleteCustomImageResponse" : {
"RequestId" : "30637AD6-D977-4833-A54C-CC89483E****"
}
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | CustomImageInShare | The custom image is being shared. Please disable sharing first and then delete it. | The error message returned because you have not unshared the custom image. Unshare the custom image before you delete it. |
404 | InvalidImageId.NotFound | The specified ImageId does not exist. | The error message returned because the specified ImageId parameter is invalid. |
500 | InternalError | An error occurred while processing your request. | The error message returned because an internal error has occurred. Try again later. If the problem persists, submit a ticket. |
For a list of error codes, visit the API Error Center.