Skip to main content

devices

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

Overview

Namedevices
TypeResource
Idaws.workspaces_thin_client.devices

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe ID of the device. (pattern: <code>[a-zA-Z0-9]{24}</code>)
namestringThe name of the device. (pattern: <code>$|^[0-9\p{IsAlphabetic}+:,.@'" -]*</code>)
arnstringThe Amazon Resource Name (ARN) of the device. (pattern: <code>arn:[\w+=/,.@-]+:[a-zA-Z0-9-]+:[a-zA-Z0-9-]*:[0-9]{0,12}:[a-zA-Z0-9-/._]+</code>)
created_atstring (date-time)The timestamp of when the device was created.
current_software_set_idstringThe ID of the software set currently installed on the device. (pattern: <code>[0-9]{1,9}</code>)
current_software_set_versionstringThe version of the software set currently installed on the device.
desired_software_set_idstringThe ID of the software set which the device has been set to. (pattern: <code>[0-9]{1,9}</code>)
environment_idstringThe ID of the environment the device is associated with. (pattern: <code>[a-z0-9]{9}</code>)
kms_key_arnstringThe Amazon Resource Name (ARN) of the Key Management Service key used to encrypt the device. (pattern: <code>arn:[\w+=/,.@-]+:kms:[a-zA-Z0-9-]*:[0-9]{0,12}:key/[a-zA-Z0-9-]+</code>)
last_connected_atstring (date-time)The timestamp of the most recent session on the device.
last_posture_atstring (date-time)The timestamp of the most recent check-in of the device.
last_user_idstringThe user ID of the most recent session on the device.
modelstringThe model number of the device.
pending_software_set_idstringThe ID of the software set that is pending to be installed on the device. (pattern: <code>[0-9]{1,9}</code>)
pending_software_set_versionstringThe version of the software set that is pending to be installed on the device.
serial_numberstringThe hardware serial number of the device.
software_set_compliance_statusstringDescribes if the software currently installed on the device is a supported version. (NONE, COMPLIANT, NOT_COMPLIANT)
software_set_update_schedulestringAn option to define if software updates should be applied within a maintenance window. (USE_MAINTENANCE_WINDOW, APPLY_IMMEDIATELY)
software_set_update_statusstringDescribes if the device has a supported version of software installed. (AVAILABLE, IN_PROGRESS, UP_TO_DATE)
statusstringThe status of the device. (REGISTERED, DEREGISTERING, DEREGISTERED, ARCHIVED)
updated_atstring (date-time)The timestamp of when the device was updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_deviceselectid, regionReturns information for a thin client device.
list_devicesselectregionnextToken, maxResultsReturns a list of thin client devices.
update_deviceupdateid, regionUpdates a thin client device.
delete_devicedeleteid, regionclientTokenDeletes a thin client device.
deregister_deviceexecid, regionDeregisters a thin client device.

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
idstringThe ID of the device to deregister.
regionstringAWS region (default: us-east-1)
clientTokenstringSpecifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a UUID type of value. If you don't provide this value, then Amazon Web Services generates a random one for you. If you retry the operation with the same ClientToken, but with different parameters, the retry fails with an IdempotentParameterMismatch error.
maxResultsintegerThe maximum number of results that are returned per call. You can use nextToken to obtain further pages of results. This is only an upper limit. The actual number of results returned per call might be fewer than the specified maximum.
nextTokenstringIf nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an HTTP 400 InvalidToken error.

SELECT examples

Returns information for a thin client device.

SELECT
id,
name,
arn,
created_at,
current_software_set_id,
current_software_set_version,
desired_software_set_id,
environment_id,
kms_key_arn,
last_connected_at,
last_posture_at,
last_user_id,
model,
pending_software_set_id,
pending_software_set_version,
serial_number,
software_set_compliance_status,
software_set_update_schedule,
software_set_update_status,
status,
updated_at
FROM aws.workspaces_thin_client.devices
WHERE id = '{{ id }}' -- required
AND region = '{{ region }}' -- required
;

UPDATE examples

Updates a thin client device.

UPDATE aws.workspaces_thin_client.devices
SET
name = '{{ name }}',
desiredSoftwareSetId = '{{ desiredSoftwareSetId }}',
softwareSetUpdateSchedule = '{{ softwareSetUpdateSchedule }}'
WHERE
id = '{{ id }}' --required
AND region = '{{ region }}' --required
RETURNING
device;

DELETE examples

Deletes a thin client device.

DELETE FROM aws.workspaces_thin_client.devices
WHERE id = '{{ id }}' --required
AND region = '{{ region }}' --required
AND clientToken = '{{ clientToken }}'
;

Lifecycle Methods

Deregisters a thin client device.

EXEC aws.workspaces_thin_client.devices.deregister_device
@id='{{ id }}' --required,
@region='{{ region }}' --required
@@json=
'{
"targetDeviceStatus": "{{ targetDeviceStatus }}",
"clientToken": "{{ clientToken }}"
}'
;