Skip to main content

workspace_image_permissions

Creates, updates, deletes, gets or lists a workspace_image_permissions resource.

Overview

Nameworkspace_image_permissions
TypeResource
Idaws.workspaces.workspace_image_permissions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
image_idstringThe identifier of the image. (pattern: <code>wsi-[0-9a-z]{9,63}$</code>)
image_permissionsarrayThe identifiers of the Amazon Web Services accounts that the image has been shared with.
next_tokenstringThe token to use to retrieve the next page of results. This value is null when there are no more results to return.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_workspace_image_permissionsselectregionDescribes the permissions that the owner of an image has granted to other Amazon Web Services accounts for an image.
update_workspace_image_permissionupdateregion, ImageId, AllowCopyImage, SharedAccountIdShares or unshares an image with one account in the same Amazon Web Services Region 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. After an image has been shared, the recipient account can copy the image to other Regions as needed. In the China (Ningxia) Region, you can copy images only within the same Region. In Amazon Web Services GovCloud (US), to copy images to and from other Regions, contact Amazon Web Services Support. For more information about sharing images, see Share or Unshare a Custom WorkSpaces Image. 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 Amazon Web Services accounts isn't supported at this time in Amazon Web Services GovCloud (US). To share BYOL images across accounts in Amazon Web Services GovCloud (US), contact Amazon Web Services Support.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Describes the permissions that the owner of an image has granted to other Amazon Web Services accounts for an image.

SELECT
image_id,
image_permissions,
next_token
FROM aws.workspaces.workspace_image_permissions
WHERE region = '{{ region }}' -- required
;

UPDATE examples

Shares or unshares an image with one account in the same Amazon Web Services Region 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. After an image has been shared, the recipient account can copy the image to other Regions as needed. In the China (Ningxia) Region, you can copy images only within the same Region. In Amazon Web Services GovCloud (US), to copy images to and from other Regions, contact Amazon Web Services Support. For more information about sharing images, see Share or Unshare a Custom WorkSpaces Image. 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 Amazon Web Services accounts isn't supported at this time in Amazon Web Services GovCloud (US). To share BYOL images across accounts in Amazon Web Services GovCloud (US), contact Amazon Web Services Support.

UPDATE aws.workspaces.workspace_image_permissions
SET
ImageId = '{{ ImageId }}',
AllowCopyImage = {{ AllowCopyImage }},
SharedAccountId = '{{ SharedAccountId }}'
WHERE
region = '{{ region }}' --required
AND ImageId = '{{ ImageId }}' --required
AND AllowCopyImage = {{ AllowCopyImage }} --required
AND SharedAccountId = '{{ SharedAccountId }}' --required;