Shares or unshares an image.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

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.


Sample requests

&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK


JSON format

HTTP/1.1 200 OK

  "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.