Skip to content

Resource: awsWorkspacesWorkspace

Use this data source to get information about a workspace in AWS Workspaces Service.

Example Usage

Filter By Workspace ID

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.dataAwsWorkspacesWorkspace.DataAwsWorkspacesWorkspace(this, "example", {
  workspaceId: "ws-cj5xcxsz5",
});

Filter By Directory ID & User Name

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.dataAwsWorkspacesWorkspace.DataAwsWorkspacesWorkspace(this, "example", {
  directoryId: "d-9967252f57",
  userName: "Example",
});

Argument Reference

The following arguments are supported:

  • bundleId - (Optional) ID of the bundle for the WorkSpace.
  • directoryId - (Optional) ID of the directory for the WorkSpace. You have to specify userName along with directoryId. You cannot combine this parameter with workspaceId.
  • rootVolumeEncryptionEnabled - (Optional) Indicates whether the data stored on the root volume is encrypted.
  • tags - (Optional) Tags for the WorkSpace.
  • userName – (Optional) User name of the user for the WorkSpace. This user name must exist in the directory for the WorkSpace. You cannot combine this parameter with workspaceId.
  • userVolumeEncryptionEnabled – (Optional) Indicates whether the data stored on the user volume is encrypted.
  • volumeEncryptionKey – (Optional) Symmetric AWS KMS customer master key (CMK) used to encrypt data stored on your WorkSpace. Amazon WorkSpaces does not support asymmetric CMKs.
  • workspaceId - (Optional) ID of the WorkSpace. You cannot combine this parameter with directoryId.
  • workspaceProperties – (Optional) WorkSpace properties.

workspaceProperties supports the following:

  • computeTypeName – (Optional) Compute type. For more information, see Amazon WorkSpaces Bundles. Valid values are value, standard, performance, power, graphics, powerpro and graphicspro.
  • rootVolumeSizeGib – (Optional) Size of the root volume.
  • runningMode – (Optional) Running mode. For more information, see Manage the WorkSpace Running Mode. Valid values are AUTO_STOP and ALWAYS_ON.
  • runningModeAutoStopTimeoutInMinutes – (Optional) Time after a user logs off when WorkSpaces are automatically stopped. Configured in 60-minute intervals.
  • userVolumeSizeGib – (Optional) Size of the user storage.

Attributes Reference

In addition to all arguments above, the following attributes are exported:

  • id - Workspaces ID.
  • ipAddress - IP address of the WorkSpace.
  • computerName - Name of the WorkSpace, as seen by the operating system.
  • state - Operational state of the WorkSpace.