Shares or unshares an image.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ModifyImageSharePermission | The operation that you want to perform. Set the value to ModifyImageSharePermission. |
ImageId | String | Yes | m-5s7qotzavwbrnzaqh4unm**** | The ID of the image. You can specify only one image ID in each request. Custom images and public images are supported. |
AddAccounts | String | No | 1122334455** | The ID of the Alibaba Cloud account with which you want to share the image. You can specify multiple Alibaba Cloud IDs. Separate multiple IDs with commas (,). |
RemoveAccounts | String | No | 113355** | The ID of the Alibaba Cloud account from which you want to unshare the image. You can specify only one Alibaba Cloud account ID. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 701B3BB9-9190-544D-90D1-328B0527380C | The ID of the request. |
Examples
Sample requests
http(s)://ens.aliyuncs.com/?Action=ModifyImageSharePermission
&ImageId=m-5s7qotzavwbrnzaqh4unm****
&AddAccounts=1122334455**
&RemoveAccounts=113355**
&Common request parameters
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<ModifyImageSharePermissionResponse>
<RequestId>701B3BB9-9190-544D-90D1-328B0527380C</RequestId>
</ModifyImageSharePermissionResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "701B3BB9-9190-544D-90D1-328B0527380C"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | NoPermission | Permission denied. | The error message returned because you do not have the required permissions. Ask the administrator to grant you the permissions. |
400 | CallInterface | Call Inteface Happen Error. | The error message returned because an error occurred when you call the operation. |
For a list of error codes, see Service error codes.