environments
Creates, updates, deletes or gets an environment
resource or lists environments
in a region
Overview
Name | environments |
Type | Resource |
Description | Resource type definition for AWS::WorkSpacesThinClient::Environment. |
Id | aws.workspacesthinclient.environments |
Fields
Name | Datatype | Description |
---|---|---|
id | string | Unique identifier of the environment. |
name | string | The name of the environment. |
desktop_arn | string | The Amazon Resource Name (ARN) of the desktop to stream from Amazon WorkSpaces, WorkSpaces Web, or AppStream 2.0. |
desktop_endpoint | string | The URL for the identity provider login (only for environments that use AppStream 2.0). |
desktop_type | string | The type of VDI. |
activation_code | string | Activation code for devices associated with environment. |
registered_devices_count | integer | Number of devices registered to the environment. |
software_set_update_schedule | string | An option to define if software updates should be applied within a maintenance window. |
maintenance_window | object | A specification for a time window to apply software updates. |
software_set_update_mode | string | An option to define which software updates to apply. |
desired_software_set_id | string | The ID of the software set to apply. |
pending_software_set_id | string | The ID of the software set that is pending to be installed. |
pending_software_set_version | string | The version of the software set that is pending to be installed. |
software_set_compliance_status | string | Describes if the software currently installed on all devices in the environment is a supported version. |
created_at | string | The timestamp in unix epoch format when environment was created. |
updated_at | string | The timestamp in unix epoch format when environment was last updated. |
arn | string | The environment ARN. |
kms_key_arn | string | The Amazon Resource Name (ARN) of the AWS Key Management Service key used to encrypt the environment. |
tags | array | An array of key-value pairs to apply to this resource. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | DesktopArn, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all environments
in a region.
SELECT
region,
id,
name,
desktop_arn,
desktop_endpoint,
desktop_type,
activation_code,
registered_devices_count,
software_set_update_schedule,
maintenance_window,
software_set_update_mode,
desired_software_set_id,
pending_software_set_id,
pending_software_set_version,
software_set_compliance_status,
created_at,
updated_at,
arn,
kms_key_arn,
tags
FROM aws.workspacesthinclient.environments
WHERE region = 'us-east-1';
Gets all properties from an individual environment
.
SELECT
region,
id,
name,
desktop_arn,
desktop_endpoint,
desktop_type,
activation_code,
registered_devices_count,
software_set_update_schedule,
maintenance_window,
software_set_update_mode,
desired_software_set_id,
pending_software_set_id,
pending_software_set_version,
software_set_compliance_status,
created_at,
updated_at,
arn,
kms_key_arn,
tags
FROM aws.workspacesthinclient.environments
WHERE region = 'us-east-1' AND data__Identifier = '<Id>';
INSERT
example
Use the following StackQL query and manifest file to create a new environment
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.workspacesthinclient.environments (
DesktopArn,
region
)
SELECT
'{{ DesktopArn }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.workspacesthinclient.environments (
Name,
DesktopArn,
DesktopEndpoint,
SoftwareSetUpdateSchedule,
MaintenanceWindow,
SoftwareSetUpdateMode,
DesiredSoftwareSetId,
KmsKeyArn,
Tags,
region
)
SELECT
'{{ Name }}',
'{{ DesktopArn }}',
'{{ DesktopEndpoint }}',
'{{ SoftwareSetUpdateSchedule }}',
'{{ MaintenanceWindow }}',
'{{ SoftwareSetUpdateMode }}',
'{{ DesiredSoftwareSetId }}',
'{{ KmsKeyArn }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: environment
props:
- name: Name
value: '{{ Name }}'
- name: DesktopArn
value: '{{ DesktopArn }}'
- name: DesktopEndpoint
value: '{{ DesktopEndpoint }}'
- name: SoftwareSetUpdateSchedule
value: '{{ SoftwareSetUpdateSchedule }}'
- name: MaintenanceWindow
value:
Type: '{{ Type }}'
StartTimeHour: '{{ StartTimeHour }}'
StartTimeMinute: '{{ StartTimeMinute }}'
EndTimeHour: null
EndTimeMinute: null
DaysOfTheWeek:
- '{{ DaysOfTheWeek[0] }}'
ApplyTimeOf: '{{ ApplyTimeOf }}'
- name: SoftwareSetUpdateMode
value: '{{ SoftwareSetUpdateMode }}'
- name: DesiredSoftwareSetId
value: '{{ DesiredSoftwareSetId }}'
- name: KmsKeyArn
value: '{{ KmsKeyArn }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
DELETE
example
/*+ delete */
DELETE FROM aws.workspacesthinclient.environments
WHERE data__Identifier = '<Id>'
AND region = 'us-east-1';
Permissions
To operate on the environments
resource, the following permissions are required:
Create
thinclient:CreateEnvironment,
thinclient:TagResource,
thinclient:ListTagsForResource,
appstream:DescribeStacks,
workspaces:DescribeWorkspaceDirectories,
workspaces-web:GetPortal,
workspaces-web:GetUserSettings,
kms:DescribeKey,
kms:CreateGrant,
kms:GenerateDataKey,
kms:Decrypt
Read
thinclient:GetEnvironment,
thinclient:ListTagsForResource,
kms:Decrypt
Update
appstream:DescribeStacks,
workspaces:DescribeWorkspaceDirectories,
workspaces-web:GetPortal,
workspaces-web:GetUserSettings,
thinclient:UpdateEnvironment,
thinclient:ListTagsForResource,
thinclient:TagResource,
thinclient:UntagResource,
kms:Decrypt,
kms:GenerateDataKey
Delete
thinclient:DeleteEnvironment,
thinclient:UntagResource,
kms:Decrypt,
kms:RetireGrant
List
thinclient:ListEnvironment,
thinclient:ListTagsForResource,
kms:Decrypt