workspace_instances
Creates, updates, deletes, gets or lists a workspace_instances resource.
Overview
| Name | workspace_instances |
| Type | Resource |
| Id | aws.workspaces_instances.workspace_instances |
Fields
The following fields are returned by SELECT queries:
- get_workspace_instance
- list_workspace_instances
| Name | Datatype | Description |
|---|---|---|
billing_configuration | object | Returns the current billing configuration for the WorkSpace Instance, indicating the active billing mode. |
ec2_instance_errors | array | Includes any underlying EC2 instance errors encountered. |
ec2_managed_instance | object | Details of the associated EC2 managed instance. |
provision_state | string | Current provisioning state of the WorkSpaces Instance. (ALLOCATING, ALLOCATED, DEALLOCATING, DEALLOCATED, ERROR_ALLOCATING, ERROR_DEALLOCATING) |
workspace_instance_errors | array | Captures any errors specific to the WorkSpace Instance lifecycle. |
workspace_instance_id | string | Unique identifier of the retrieved WorkSpaces Instance. (pattern: <code>wsinst-[0-9a-zA-Z]{8,63}</code>) |
| Name | Datatype | Description |
|---|---|---|
ec2_managed_instance | object | Details of the associated EC2 managed instance. |
provision_state | string | Current provisioning state of the WorkSpace Instance. (ALLOCATING, ALLOCATED, DEALLOCATING, DEALLOCATED, ERROR_ALLOCATING, ERROR_DEALLOCATING) |
workspace_instance_id | string | Unique identifier for the WorkSpace Instance. (pattern: <code>wsinst-[0-9a-zA-Z]{8,63}</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_workspace_instance | select | region | Retrieves detailed information about a specific WorkSpace Instance. | |
list_workspace_instances | select | region | Retrieves a collection of WorkSpaces Instances based on specified filters. | |
create_workspace_instance | insert | region, ManagedInstance | Launches a new WorkSpace Instance with specified configuration parameters, enabling programmatic workspace deployment. | |
delete_workspace_instance | delete | region | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_workspace_instance
- list_workspace_instances
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
;
Retrieves a collection of WorkSpaces Instances based on specified filters.
SELECT
ec2_managed_instance,
provision_state,
workspace_instance_id
FROM aws.workspaces_instances.workspace_instances
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_workspace_instance
- Manifest
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
;
# Description fields are for documentation purposes
- name: workspace_instances
props:
- name: region
value: "{{ region }}"
description: Required parameter for the workspace_instances resource.
- name: ClientToken
value: "{{ ClientToken }}"
description: |
Unique token to ensure idempotent instance creation, preventing duplicate workspace launches.
- name: Tags
description: |
Optional metadata tags for categorizing and managing WorkSpaces Instances.
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
- name: ManagedInstance
description: |
Comprehensive configuration settings for the WorkSpaces Instance, including network, compute, and storage parameters.
value:
BlockDeviceMappings:
- DeviceName: "{{ DeviceName }}"
Ebs:
VolumeType: "{{ VolumeType }}"
Encrypted: {{ Encrypted }}
KmsKeyId: "{{ KmsKeyId }}"
Iops: {{ Iops }}
Throughput: {{ Throughput }}
VolumeSize: {{ VolumeSize }}
NoDevice: "{{ NoDevice }}"
VirtualName: "{{ VirtualName }}"
CapacityReservationSpecification:
CapacityReservationPreference: "{{ CapacityReservationPreference }}"
CapacityReservationTarget:
CapacityReservationId: "{{ CapacityReservationId }}"
CapacityReservationResourceGroupArn: "{{ CapacityReservationResourceGroupArn }}"
CpuOptions:
AmdSevSnp: "{{ AmdSevSnp }}"
CoreCount: {{ CoreCount }}
ThreadsPerCore: {{ ThreadsPerCore }}
CreditSpecification:
CpuCredits: "{{ CpuCredits }}"
DisableApiStop: {{ DisableApiStop }}
EbsOptimized: {{ EbsOptimized }}
EnablePrimaryIpv6: {{ EnablePrimaryIpv6 }}
EnclaveOptions:
Enabled: {{ Enabled }}
HibernationOptions:
Configured: {{ Configured }}
IamInstanceProfile:
Arn: "{{ Arn }}"
Name: "{{ Name }}"
ImageId: "{{ ImageId }}"
InstanceMarketOptions:
MarketType: "{{ MarketType }}"
SpotOptions:
BlockDurationMinutes: {{ BlockDurationMinutes }}
InstanceInterruptionBehavior: "{{ InstanceInterruptionBehavior }}"
MaxPrice: "{{ MaxPrice }}"
SpotInstanceType: "{{ SpotInstanceType }}"
ValidUntilUtc: "{{ ValidUntilUtc }}"
InstanceType: "{{ InstanceType }}"
Ipv6Addresses:
- Ipv6Address: "{{ Ipv6Address }}"
IsPrimaryIpv6: {{ IsPrimaryIpv6 }}
Ipv6AddressCount: {{ Ipv6AddressCount }}
KernelId: "{{ KernelId }}"
KeyName: "{{ KeyName }}"
LicenseSpecifications:
- LicenseConfigurationArn: "{{ LicenseConfigurationArn }}"
MaintenanceOptions:
AutoRecovery: "{{ AutoRecovery }}"
MetadataOptions:
HttpEndpoint: "{{ HttpEndpoint }}"
HttpProtocolIpv6: "{{ HttpProtocolIpv6 }}"
HttpPutResponseHopLimit: {{ HttpPutResponseHopLimit }}
HttpTokens: "{{ HttpTokens }}"
InstanceMetadataTags: "{{ InstanceMetadataTags }}"
Monitoring:
Enabled: {{ Enabled }}
NetworkInterfaces:
- AssociateCarrierIpAddress: {{ AssociateCarrierIpAddress }}
AssociatePublicIpAddress: {{ AssociatePublicIpAddress }}
ConnectionTrackingSpecification:
TcpEstablishedTimeout: {{ TcpEstablishedTimeout }}
UdpStreamTimeout: {{ UdpStreamTimeout }}
UdpTimeout: {{ UdpTimeout }}
Description: "{{ Description }}"
DeviceIndex: {{ DeviceIndex }}
EnaSrdSpecification:
EnaSrdEnabled: {{ EnaSrdEnabled }}
EnaSrdUdpSpecification:
EnaSrdUdpEnabled: {{ EnaSrdUdpEnabled }}
InterfaceType: "{{ InterfaceType }}"
Ipv4Prefixes: "{{ Ipv4Prefixes }}"
Ipv4PrefixCount: {{ Ipv4PrefixCount }}
Ipv6AddressCount: {{ Ipv6AddressCount }}
Ipv6Addresses: "{{ Ipv6Addresses }}"
Ipv6Prefixes: "{{ Ipv6Prefixes }}"
Ipv6PrefixCount: {{ Ipv6PrefixCount }}
NetworkCardIndex: {{ NetworkCardIndex }}
NetworkInterfaceId: "{{ NetworkInterfaceId }}"
PrimaryIpv6: {{ PrimaryIpv6 }}
PrivateIpAddress: "{{ PrivateIpAddress }}"
PrivateIpAddresses: "{{ PrivateIpAddresses }}"
SecondaryPrivateIpAddressCount: {{ SecondaryPrivateIpAddressCount }}
Groups: "{{ Groups }}"
SubnetId: "{{ SubnetId }}"
NetworkPerformanceOptions:
BandwidthWeighting: "{{ BandwidthWeighting }}"
Placement:
Affinity: "{{ Affinity }}"
AvailabilityZone: "{{ AvailabilityZone }}"
GroupId: "{{ GroupId }}"
GroupName: "{{ GroupName }}"
HostId: "{{ HostId }}"
HostResourceGroupArn: "{{ HostResourceGroupArn }}"
PartitionNumber: {{ PartitionNumber }}
Tenancy: "{{ Tenancy }}"
PrivateDnsNameOptions:
HostnameType: "{{ HostnameType }}"
EnableResourceNameDnsARecord: {{ EnableResourceNameDnsARecord }}
EnableResourceNameDnsAAAARecord: {{ EnableResourceNameDnsAAAARecord }}
PrivateIpAddress: "{{ PrivateIpAddress }}"
RamdiskId: "{{ RamdiskId }}"
SecurityGroupIds:
- "{{ SecurityGroupIds }}"
SecurityGroups:
- "{{ SecurityGroups }}"
SubnetId: "{{ SubnetId }}"
TagSpecifications:
- ResourceType: "{{ ResourceType }}"
Tags: "{{ Tags }}"
UserData: "{{ UserData }}"
- name: BillingConfiguration
description: |
Optional billing configuration for the WorkSpace Instance. Allows customers to specify their preferred billing mode when creating a new instance. Defaults to hourly billing if not specified.
value:
BillingMode: "{{ BillingMode }}"
DELETE examples
- delete_workspace_instance
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
;