workspace_images
Creates, updates, deletes, gets or lists a workspace_images resource.
Overview
| Name | workspace_images |
| Type | Resource |
| Id | aws.workspaces.workspace_images |
Fields
The following fields are returned by SELECT queries:
- describe_workspace_images
| Name | Datatype | Description |
|---|---|---|
created | string (date-time) | The date when the image was created. If the image has been shared, the Amazon Web Services account that the image has been shared with sees the original creation date of the image. |
description | string | The description of the image. (pattern: <code>^[a-zA-Z0-9_./() -]+$</code>) |
error_code | string | The error code that is returned for the image. |
error_details | array | Additional details of the error returned for the image, including the possible causes of the errors and troubleshooting information. |
error_message | string | The text of the error message that is returned for the image. |
image_id | string | The identifier of the image. (pattern: <code>wsi-[0-9a-z]{9,63}$</code>) |
name | string | The name of the image. (pattern: <code>^[a-zA-Z0-9_./()\-]+$</code>) |
operating_system | object | The operating system that the image is running. |
owner_account_id | string | The identifier of the Amazon Web Services account that owns the image. (pattern: <code>^\d{12}$</code>) |
required_tenancy | string | Specifies whether the image is running on dedicated hardware. When Bring Your Own License (BYOL) is enabled, this value is set to DEDICATED. For more information, see Bring Your Own Windows Desktop Images. (DEFAULT, DEDICATED) |
state | string | The status of the image. (AVAILABLE, PENDING, ERROR) |
updates | object | The updates (if any) that are available for the specified image. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_workspace_images | select | region | Retrieves a list that describes one or more specified images, if the image identifiers are provided. Otherwise, all images in the account are described. | |
create_updated_workspace_image | insert | region, SourceImageId | Creates a new updated WorkSpace image based on the specified source image. The new updated WorkSpace image has the latest drivers and other updates required by the Amazon WorkSpaces components. To determine which WorkSpace images need to be updated with the latest Amazon WorkSpaces requirements, use DescribeWorkspaceImages. Only Windows 10, Windows Server 2016, and Windows Server 2019 WorkSpace images can be programmatically updated at this time. Microsoft Windows updates and other application updates are not included in the update process. The source WorkSpace image is not deleted. You can delete the source image after you've verified your new updated image and created a new bundle. | |
create_workspace_image | insert | region, WorkspaceId | Creates a new WorkSpace image from an existing WorkSpace. | |
delete_workspace_image | delete | region | Deletes the specified image from your account. To delete an image, you must first delete any bundles that are associated with the image and unshare the image if it is shared with other accounts. |
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_images
Retrieves a list that describes one or more specified images, if the image identifiers are provided. Otherwise, all images in the account are described.
SELECT
created,
description,
error_code,
error_details,
error_message,
image_id,
name,
operating_system,
owner_account_id,
required_tenancy,
state,
updates
FROM aws.workspaces.workspace_images
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_updated_workspace_image
- create_workspace_image
- Manifest
Creates a new updated WorkSpace image based on the specified source image. The new updated WorkSpace image has the latest drivers and other updates required by the Amazon WorkSpaces components. To determine which WorkSpace images need to be updated with the latest Amazon WorkSpaces requirements, use DescribeWorkspaceImages. Only Windows 10, Windows Server 2016, and Windows Server 2019 WorkSpace images can be programmatically updated at this time. Microsoft Windows updates and other application updates are not included in the update process. The source WorkSpace image is not deleted. You can delete the source image after you've verified your new updated image and created a new bundle.
INSERT INTO aws.workspaces.workspace_images (
Name,
Description,
SourceImageId,
Tags,
region
)
SELECT
'{{ Name }}',
'{{ Description }}',
'{{ SourceImageId }}' /* required */,
'{{ Tags }}',
'{{ region }}'
RETURNING
image_id
;
Creates a new WorkSpace image from an existing WorkSpace.
INSERT INTO aws.workspaces.workspace_images (
Name,
Description,
WorkspaceId,
Tags,
region
)
SELECT
'{{ Name }}',
'{{ Description }}',
'{{ WorkspaceId }}' /* required */,
'{{ Tags }}',
'{{ region }}'
RETURNING
created,
description,
image_id,
name,
operating_system,
owner_account_id,
required_tenancy,
state
;
# Description fields are for documentation purposes
- name: workspace_images
props:
- name: region
value: "{{ region }}"
description: Required parameter for the workspace_images resource.
- name: Name
value: "{{ Name }}"
description: |
The name of the new WorkSpace image.
- name: Description
value: "{{ Description }}"
description: |
The description of the new WorkSpace image.
- name: SourceImageId
value: "{{ SourceImageId }}"
description: |
The identifier of the source WorkSpace image.
- name: Tags
description: |
The tags that you want to add to the new WorkSpace image. To add tags when you're creating the image, you must create an IAM policy that grants your IAM user permission to use workspaces:CreateTags.
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
- name: WorkspaceId
value: "{{ WorkspaceId }}"
description: |
The identifier of the source WorkSpace
DELETE examples
- delete_workspace_image
Deletes the specified image from your account. To delete an image, you must first delete any bundles that are associated with the image and unshare the image if it is shared with other accounts.
DELETE FROM aws.workspaces.workspace_images
WHERE region = '{{ region }}' --required
;