Shares or unshares an image.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ens:ModifyImageSharePermission |
update |
*Image
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ImageId |
string |
Yes |
The ID of the image. You can specify only one image ID. Custom images and public images are supported. |
m-5s7qotzavwbrnzaqh4unm**** |
| AddAccounts |
string |
No |
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 (,). |
1122334455** |
| RemoveAccounts |
string |
No |
The ID of the Alibaba Cloud account from which you want to unshare the image. You can specify only one Alibaba Cloud account ID. |
113355** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The ID of the request. |
701B3BB9-9190-544D-90D1-328B0527380C |
Examples
Success response
JSON format
{
"RequestId": "701B3BB9-9190-544D-90D1-328B0527380C"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | MissingParameter | The input parameter that is mandatory for processing this request is not supplied. | |
| 400 | NoPermission | Permission denied. | |
| 400 | InvalidParameter.%s | The specified field %s invalid. Please check it again. | |
| 400 | InvalidParameter | The errorMessage is %s. Please check it again. | |
| 400 | ens.interface.error | An error occurred while calling the API. | |
| 400 | CallInterface | Call Interface Happen Error. | An error occurred when you call the operation. |
| 400 | InvalidImageType.NotSupported | The specified image type is not supported. | The specified image does not support sharing or exporting. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.