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
{ "Type" : "AWS::WorkSpaces::Workspace", "Properties" : { "BundleId" :String, "DirectoryId" :String, "RootVolumeEncryptionEnabled" :Boolean, "Tags" : [ Tag, ... ], "UserName" :String, "UserVolumeEncryptionEnabled" :Boolean, "VolumeEncryptionKey" :String, "WorkspaceProperties" : WorkspaceProperties } }
YAML
Type: "AWS::WorkSpaces::Workspace" Properties: BundleId:StringDirectoryId:StringRootVolumeEncryptionEnabled:BooleanTags: - Tag UserName:StringUserVolumeEncryptionEnabled:BooleanVolumeEncryptionKey:StringWorkspaceProperties" : WorkspaceProperties
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
UserNameproperty. 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
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
UserNameproperty. Tags-
The tags (key-value pairs) for the WorkSpace.
Required: No
Type: List of Resource Tag
Update requires: No interruption
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
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
UserNameproperty. 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
UserNameproperty. WorkspaceProperties-
The WorkSpace properties.
Required: No
Type: Amazon WorkSpaces Workspace WorkspaceProperties
Update requires: No interruption
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
"workspace1" : { "Type" : "AWS::WorkSpaces::Workspace", "Properties" : { "BundleId" : {"Ref" : "BundleId"}, "DirectoryId" : {"Ref" : "DirectoryId"}, "UserName" : "test" } }
YAML
workspace1: Type: "AWS::WorkSpaces::Workspace" Properties: BundleId: Ref: "BundleId" DirectoryId: Ref: "DirectoryId" UserName: "test"
