workspace_image_permissions
Creates, updates, deletes, gets or lists a workspace_image_permissions resource.
Overview
| Name | workspace_image_permissions |
| Type | Resource |
| Id | aws.workspaces.workspace_image_permissions |
Fields
The following fields are returned by SELECT queries:
- describe_workspace_image_permissions
| Name | Datatype | Description |
|---|---|---|
image_id | string | The identifier of the image. (pattern: <code>wsi-[0-9a-z]{9,63}$</code>) |
image_permissions | array | The identifiers of the Amazon Web Services accounts that the image has been shared with. |
next_token | string | The 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_workspace_image_permissions | select | region | Describes the permissions that the owner of an image has granted to other Amazon Web Services accounts for an image. | |
update_workspace_image_permission | update | region, ImageId, AllowCopyImage, SharedAccountId | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_workspace_image_permissions
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
- update_workspace_image_permission
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;