UpdateWorkspaceImagePermission - Amazon WorkSpaces Service


Shares or unshares an image with one account by specifying whether that account has permission to copy the image. If the copy image permission is granted, the image is shared with that account. If the copy image permission is revoked, the image is unshared with the account.

  • To delete an image that has been shared, you must unshare the image before you delete it.

  • Sharing Bring Your Own License (BYOL) images across AWS accounts isn't supported at this time in the AWS GovCloud (US-West) Region. To share BYOL images across accounts in the AWS GovCloud (US-West) Region, contact AWS Support.

Request Syntax

{ "AllowCopyImage": boolean, "ImageId": "string", "SharedAccountId": "string" }

Request Parameters

The request accepts the following data in JSON format.


The permission to copy the image. This permission can be revoked only after an image has been shared.

Type: Boolean

Required: Yes


The identifier of the image.

Type: String

Pattern: wsi-[0-9a-z]{9,63}$

Required: Yes


The identifier of the AWS account to share or unshare the image with.

Type: String

Pattern: ^\d{12}$

Required: Yes

Response Elements

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.


For information about the errors that are common to all actions, see Common Errors.


The user is not authorized to access a resource.

HTTP Status Code: 400


One or more parameter values are not valid.

HTTP Status Code: 400


This operation is not supported.

HTTP Status Code: 400


The resource could not be found.

HTTP Status Code: 400


The specified resource is not available.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: