Shares or unshares a custom image.
Description
You can share a custom image to ECS. When the configurations of your simple application server cannot meet your business requirements, or you want to use ECS instances to deploy your business, you can share your custom image to ECS to transfer your business from Simple Application Server to ECS.
You can unshare a custom image based on your business requirements or when you want to delete the custom image.
Take note of the following items:
- After you unshare a custom image, you cannot query or use the custom image in the ECS console or by calling ECS API operations.
- After you unshare a custom image, the system disks of the ECS instances that were created from the shared image cannot be re-initialized.
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 | ModifyImageShareStatus |
The operation that you want to perform. Set the value to ModifyImageShareStatus. |
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-saacssasc**** |
The ID of the image. |
Operation | String | Yes | Share |
Valid values:
|
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 473469C7-AA6F-4DC5-B3DB-A3DC0DE3C**** |
The ID of the request. |
Examples
Sample requests
https://ecs.aliyuncs.com/?Action=ModifyImageShareStatus
&ImageId=m-saacssasc****
&Operation=Share
&RegionId=cn-hangzhou
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<ModifyImageShareStatusResponse>
<RequestId>473469C7-AA6F-4DC5-B3DB-A3DC0DE3C****</RequestId>
</ModifyImageShareStatusResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"ModifyImageShareStatusResponse" : {
"RequestId" : "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C****"
}
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidParam.OperationIllegal | The specified parameter operation is illegal. | The error message returned because the specified Operation parameter is invalid. |
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.