Skip to main content

workspace_images

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

Overview

Nameworkspace_images
TypeResource
Idaws.workspaces.workspace_images

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
createdstring (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.
descriptionstringThe description of the image. (pattern: <code>^[a-zA-Z0-9_./() -]+$</code>)
error_codestringThe error code that is returned for the image.
error_detailsarrayAdditional details of the error returned for the image, including the possible causes of the errors and troubleshooting information.
error_messagestringThe text of the error message that is returned for the image.
image_idstringThe identifier of the image. (pattern: <code>wsi-[0-9a-z]{9,63}$</code>)
namestringThe name of the image. (pattern: <code>^[a-zA-Z0-9_./()\-]+$</code>)
operating_systemobjectThe operating system that the image is running.
owner_account_idstringThe identifier of the Amazon Web Services account that owns the image. (pattern: <code>^\d{12}$</code>)
required_tenancystringSpecifies 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)
statestringThe status of the image. (AVAILABLE, PENDING, ERROR)
updatesobjectThe updates (if any) that are available for the specified image.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_workspace_imagesselectregionRetrieves 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_imageinsertregion, SourceImageIdCreates 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_imageinsertregion, WorkspaceIdCreates a new WorkSpace image from an existing WorkSpace.
delete_workspace_imagedeleteregionDeletes 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.

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

SELECT examples

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

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
;

DELETE examples

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
;