ModifyShareImage
Shares an image with other WUYING Workspace users or cancels image sharing.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
appstreaming:ModifyShareImage |
update |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ImageId |
string |
No |
The ID of the source image. |
img-bp13mu**** |
| AddAccount |
array |
No |
The list of destination Alibaba Cloud account IDs to which you want to share the image. When you call this operation, you must specify at least one of AddAccount and RemoveAccount, and at least one of the lists must not be empty. If both lists are empty (not specifying a parameter is also considered empty), the operation returns the InvalidParameter.AddAccount/RemoveAccount error. |
|
|
integer |
No |
The Alibaba Cloud account ID that receives the shared image. You can share the image with 1 to 50 Alibaba Cloud accounts. |
110014********** |
|
| RemoveAccount |
array |
No |
The list of destination Alibaba Cloud account IDs from which you want to cancel image sharing. When you call this operation, you must specify at least one of AddAccount and RemoveAccount, and at least one of the lists must not be empty. If both lists are empty (not specifying a parameter is also considered empty), the operation returns the InvalidParameter.AddAccount/RemoveAccount error. |
|
|
integer |
No |
The Alibaba Cloud account ID from which you want to cancel image sharing. Valid values of N: 1 to 10. If you submit more than 10 Alibaba Cloud accounts at a time, the system processes only the first 10 accounts and ignores the rest. |
181080******* |
|
| BizType |
integer |
No |
The business line. Only the Enterprise Edition scenario is supported. Default value: 1. Valid values:
|
1 |
| ProductType |
string |
No |
The product type, such as cloud desktop, cloud application, or workstation. Valid values:
|
CloudDesktop |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
PlainResult |
||
| Data |
boolean |
The returned result. Valid values:
|
true |
| Success |
boolean |
Indicates whether the request is successful. |
true |
| Code |
string |
The error code. |
200 |
| Message |
string |
The error message returned when an error occurs. |
null |
| RequestId |
string |
The request ID. |
1CBAFFAB-B697-4049-A9B1-67E1FC5F**** |
Examples
Success response
JSON format
{
"Data": true,
"Success": true,
"Code": "200",
"Message": "null",
"RequestId": "1CBAFFAB-B697-4049-A9B1-67E1FC5F****"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidTargetAliUid.SelfShare | Cannot share image to the owner account. | You cannot share resources with yourself. |
| 400 | InvalidTargetAliUid.NotFound | The specified AliUid does not exist. | The target UID does not exist. |
| 400 | InvalidParameter.AddAccount | The parameter AddAccount is invalid. | The legacy code InvalidParameter.AddAccount is retained to document an undocumented code observed during testing. |
| 400 | InvalidParameter.RemoveAccount | The parameter RemoveAccount is invalid. | The RemoveAccount parameter failed validation. |
| 400 | InternalError | Internal error. | An internal error occurred. |
| 400 | InvalidBaseImage.NotFound | Base image not found. | The base image is not found. |
| 400 | InvalidSourceImage.StatusNotAvailable | Invalid source image status. | The status of the source image is invalid. |
| 400 | InvalidSourceImage.ImageTypeCannotBeShared | Source image cannot be shared. | This type of source image cannot be shared. |
| 400 | BizTypeNotMatch | The bizType and image do not match. | The bizType and image do not match. |
| 400 | ProductTypeNotMatch | The productType and image do not match. | The productType and image do not match. |
| 400 | ExceedAddAccountQuota | The maximum number of account addition is reached. | The maximum number of account addition is reached. |
| 400 | InvalidTargetAliUid.TargetShareImageAlreadyExist | Target shared image already exists. | The target shared image already exists. |
| 400 | InvalidParameter.ImageId | The image ID is invalid. | The image ID is invalid. |
| 400 | InvalidBizType | The bizType parameter is invalid. | The bizType parameter is invalid. |
| 400 | InvalidParameter.AddAccount/RemoveAccount | The tenant ID to be added or removed is invalid. | The tenant ID to be added or removed is invalid. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.