Skip to main content

workspace_instances

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

Overview

Nameworkspace_instances
TypeResource
Idaws.workspaces_instances.workspace_instances

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
billing_configurationobjectReturns the current billing configuration for the WorkSpace Instance, indicating the active billing mode.
ec2_instance_errorsarrayIncludes any underlying EC2 instance errors encountered.
ec2_managed_instanceobjectDetails of the associated EC2 managed instance.
provision_statestringCurrent provisioning state of the WorkSpaces Instance. (ALLOCATING, ALLOCATED, DEALLOCATING, DEALLOCATED, ERROR_ALLOCATING, ERROR_DEALLOCATING)
workspace_instance_errorsarrayCaptures any errors specific to the WorkSpace Instance lifecycle.
workspace_instance_idstringUnique identifier of the retrieved WorkSpaces Instance. (pattern: <code>wsinst-[0-9a-zA-Z]{8,63}</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_workspace_instanceselectregionRetrieves detailed information about a specific WorkSpace Instance.
list_workspace_instancesselectregionRetrieves a collection of WorkSpaces Instances based on specified filters.
create_workspace_instanceinsertregion, ManagedInstanceLaunches a new WorkSpace Instance with specified configuration parameters, enabling programmatic workspace deployment.
delete_workspace_instancedeleteregionDeletes the specified WorkSpace Usage of this API will result in deletion of the resource in question.

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 detailed information about a specific WorkSpace Instance.

SELECT
billing_configuration,
ec2_instance_errors,
ec2_managed_instance,
provision_state,
workspace_instance_errors,
workspace_instance_id
FROM aws.workspaces_instances.workspace_instances
WHERE region = '{{ region }}' -- required
;

INSERT examples

Launches a new WorkSpace Instance with specified configuration parameters, enabling programmatic workspace deployment.

INSERT INTO aws.workspaces_instances.workspace_instances (
ClientToken,
Tags,
ManagedInstance,
BillingConfiguration,
region
)
SELECT
'{{ ClientToken }}',
'{{ Tags }}',
'{{ ManagedInstance }}' /* required */,
'{{ BillingConfiguration }}',
'{{ region }}'
RETURNING
workspace_instance_id
;

DELETE examples

Deletes the specified WorkSpace Usage of this API will result in deletion of the resource in question.

DELETE FROM aws.workspaces_instances.workspace_instances
WHERE region = '{{ region }}' --required
;