ModifyShareImage

Updated at:

Shares an image with other WUYING Workspace users or cancels image sharing.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

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 :

    Enterprise Edition.

  • 10 :

    Personal Edition.

1

ProductType

string

No

The product type, such as cloud desktop, cloud application, or workstation.

Valid values:

  • CloudDesktop :

    Cloud Desktop.

  • CloudApp :

    Cloud Application.

  • WuyingServer :

    WUYING Workstation.

CloudDesktop

Response elements

Element

Type

Description

Example

object

PlainResult

Data

boolean

The returned result.

Valid values:

  • true :

    Success.

  • false :

    Failure.

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.