devices
Creates, updates, deletes, gets or lists a devices resource.
Overview
| Name | devices |
| Type | Resource |
| Id | aws.workspaces_thin_client.devices |
Fields
The following fields are returned by SELECT queries:
- get_device
- list_devices
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the device. (pattern: <code>[a-zA-Z0-9]{24}</code>) |
name | string | The name of the device. (pattern: <code>$|^[0-9\p{IsAlphabetic}+:,.@'" -]*</code>) |
arn | string | The 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_at | string (date-time) | The timestamp of when the device was created. |
current_software_set_id | string | The ID of the software set currently installed on the device. (pattern: <code>[0-9]{1,9}</code>) |
current_software_set_version | string | The version of the software set currently installed on the device. |
desired_software_set_id | string | The ID of the software set which the device has been set to. (pattern: <code>[0-9]{1,9}</code>) |
environment_id | string | The ID of the environment the device is associated with. (pattern: <code>[a-z0-9]{9}</code>) |
kms_key_arn | string | The 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_at | string (date-time) | The timestamp of the most recent session on the device. |
last_posture_at | string (date-time) | The timestamp of the most recent check-in of the device. |
last_user_id | string | The user ID of the most recent session on the device. |
model | string | The model number of the device. |
pending_software_set_id | string | The ID of the software set that is pending to be installed on the device. (pattern: <code>[0-9]{1,9}</code>) |
pending_software_set_version | string | The version of the software set that is pending to be installed on the device. |
serial_number | string | The hardware serial number of the device. |
software_set_compliance_status | string | Describes if the software currently installed on the device is a supported version. (NONE, COMPLIANT, NOT_COMPLIANT) |
software_set_update_schedule | string | An option to define if software updates should be applied within a maintenance window. (USE_MAINTENANCE_WINDOW, APPLY_IMMEDIATELY) |
software_set_update_status | string | Describes if the device has a supported version of software installed. (AVAILABLE, IN_PROGRESS, UP_TO_DATE) |
status | string | The status of the device. (REGISTERED, DEREGISTERING, DEREGISTERED, ARCHIVED) |
updated_at | string (date-time) | The timestamp of when the device was updated. |
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the device. (pattern: <code>[a-zA-Z0-9]{24}</code>) |
name | string | The name of the device. (pattern: <code>$|^[0-9\p{IsAlphabetic}+:,.@'" -]*</code>) |
arn | string | The 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_at | string (date-time) | The timestamp of when the device was created. |
current_software_set_id | string | The ID of the software set currently installed on the device. (pattern: <code>[0-9]{1,9}</code>) |
desired_software_set_id | string | The ID of the software set which the device has been set to. (pattern: <code>[0-9]{1,9}</code>) |
environment_id | string | The ID of the environment the device is associated with. (pattern: <code>[a-z0-9]{9}</code>) |
last_connected_at | string (date-time) | The timestamp of the most recent session on the device. |
last_posture_at | string (date-time) | The timestamp of the most recent check-in of the device. |
last_user_id | string | The user ID of the most recent session on the device. |
model | string | The model number of the device. |
pending_software_set_id | string | The ID of the software set that is pending to be installed on the device. (pattern: <code>[0-9]{1,9}</code>) |
serial_number | string | The hardware serial number of the device. |
software_set_update_schedule | string | An option to define if software updates should be applied within a maintenance window. (USE_MAINTENANCE_WINDOW, APPLY_IMMEDIATELY) |
status | string | The status of the device. (REGISTERED, DEREGISTERING, DEREGISTERED, ARCHIVED) |
updated_at | string (date-time) | The timestamp of when the device was updated. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_device | select | id, region | Returns information for a thin client device. | |
list_devices | select | region | nextToken, maxResults | Returns a list of thin client devices. |
update_device | update | id, region | Updates a thin client device. | |
delete_device | delete | id, region | clientToken | Deletes a thin client device. |
deregister_device | exec | id, region | Deregisters 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.
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the device to deregister. |
region | string | AWS region (default: us-east-1) |
clientToken | string | Specifies 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. |
maxResults | integer | The 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. |
nextToken | string | If 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
- get_device
- list_devices
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
;
Returns a list of thin client devices.
SELECT
id,
name,
arn,
created_at,
current_software_set_id,
desired_software_set_id,
environment_id,
last_connected_at,
last_posture_at,
last_user_id,
model,
pending_software_set_id,
serial_number,
software_set_update_schedule,
status,
updated_at
FROM aws.workspaces_thin_client.devices
WHERE region = '{{ region }}' -- required
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;
UPDATE examples
- update_device
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
- delete_device
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
- deregister_device
Deregisters a thin client device.
EXEC aws.workspaces_thin_client.devices.deregister_device
@id='{{ id }}' --required,
@region='{{ region }}' --required
@@json=
'{
"targetDeviceStatus": "{{ targetDeviceStatus }}",
"clientToken": "{{ clientToken }}"
}'
;