Menu
AWS CloudFormation
User Guide (API Version 2010-05-15)

AWS::WorkSpaces::Workspace

The AWS::WorkSpaces::Workspace resource creates an Amazon WorkSpaces workspace, which is a cloud-based desktop experience for end users. Before creating a Workspace in CloudFormation, you must register a Directory Service directory with Workspaces. This process is documented at Register a Directory with Amazon WorkSpaces. For more information, see the Amazon WorkSpaces Administration Guide.

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

JSON

Copy
{ "Type" : "AWS::WorkSpaces::Workspace", "Properties" : { "BundleId" : String, "DirectoryId" : String, "UserName" : String, "RootVolumeEncryptionEnabled" : Boolean, "UserVolumeEncryptionEnabled" : Boolean, "VolumeEncryptionKey" : String } }

YAML

Copy
Type: "AWS::WorkSpaces::Workspace" Properties: BundleId: String DirectoryId: String UserName: String RootVolumeEncryptionEnabled: Boolean UserVolumeEncryptionEnabled: Boolean VolumeEncryptionKey: String

Properties

BundleId

The identifier of the bundle from which you want to create the workspace. A bundle specifies the details of the workspace, such as the installed applications and the size of CPU, memory, and storage. Use the DescribeWorkspaceBundles action to list the bundles that AWS offers.

Required: Yes

Type: String

Update requires: Updates are not supported.. To update this property, you must also update another property that triggers a replacement, such as the UserName property.

DirectoryId

The identifier of the AWS Directory Service directory in which you want to create the workspace. The directory must already be registered with Amazon WorkSpaces. Use the DescribeWorkspaceDirectories action to list the directories that are available.

Required: Yes

Type: String

Update requires: Replacement

UserName

The name of the user to which the workspace is assigned. This user name must exist in the specified AWS Directory Service directory.

Required: Yes

Type: String

Update requires: Replacement

RootVolumeEncryptionEnabled

Indicates whether Amazon WorkSpaces encrypts data stored on the root volume (C: drive).

Required: No

Type: Boolean

Update requires: Updates are not supported.. To update this property, you must also update another property that triggers a replacement, such as the UserName property.

UserVolumeEncryptionEnabled

Indicates whether Amazon WorkSpaces encrypts data stored on the user volume (D: drive).

Required: No

Type: Boolean

Update requires: Updates are not supported.. To update this property, you must also update another property that triggers a replacement, such as the UserName property.

VolumeEncryptionKey

The AWS Key Management Service (AWS KMS) key ID that Amazon WorkSpaces uses to encrypt data stored on your workspace.

Required: No

Type: String

Update requires: Updates are not supported.. To update this property, you must also update another property that triggers a replacement, such as the UserName property.

Return Values

Ref

When the logical ID of this resource is provided to the Ref intrinsic function, Ref returns the resource name.

For more information about using the Ref function, see Ref.

Example

The following example creates a workspace for user test. The bundle and directory IDs are specified as parameters in the same template.

JSON

Copy
"workspace1" : { "Type" : "AWS::WorkSpaces::Workspace", "Properties" : { "BundleId" : {"Ref" : "BundleId"}, "DirectoryId" : {"Ref" : "DirectoryId"}, "UserName" : "test" } }

YAML

Copy
workspace1: Type: "AWS::WorkSpaces::Workspace" Properties: BundleId: Ref: "BundleId" DirectoryId: Ref: "DirectoryId" UserName: "test"