Skip to content
v2.277.0

CfnWorkspaceProps Struct ​

Properties for defining a CfnWorkspace.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_workspaces as workspaces } from 'aws-cdk-lib';
const cfnWorkspaceProps: workspaces.CfnWorkspaceProps = {
  bundleId: 'bundleId',
  directoryId: 'directoryId',
  userName: 'userName',

  // the properties below are optional
  rootVolumeEncryptionEnabled: false,
  tags: [{
    key: 'key',
    value: 'value',
  }],
  userVolumeEncryptionEnabled: false,
  volumeEncryptionKey: 'volumeEncryptionKey',
  workspaceProperties: {
    computeTypeName: 'computeTypeName',
    rootVolumeSizeGib: 123,
    runningMode: 'runningMode',
    runningModeAutoStopTimeoutInMinutes: 123,
    userVolumeSizeGib: 123,
  },
};
python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_workspaces as workspaces

cfn_workspace_props = workspaces.CfnWorkspaceProps(
    bundle_id="bundleId",
    directory_id="directoryId",
    user_name="userName",

    # the properties below are optional
    root_volume_encryption_enabled=False,
    tags=[CfnTag(
        key="key",
        value="value"
    )],
    user_volume_encryption_enabled=False,
    volume_encryption_key="volumeEncryptionKey",
    workspace_properties=workspaces.CfnWorkspace.WorkspacePropertiesProperty(
        compute_type_name="computeTypeName",
        root_volume_size_gib=123,
        running_mode="runningMode",
        running_mode_auto_stop_timeout_in_minutes=123,
        user_volume_size_gib=123
    )
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.workspaces.*;

CfnWorkspaceProps cfnWorkspaceProps = CfnWorkspaceProps.builder()
        .bundleId("bundleId")
        .directoryId("directoryId")
        .userName("userName")

        // the properties below are optional
        .rootVolumeEncryptionEnabled(false)
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .userVolumeEncryptionEnabled(false)
        .volumeEncryptionKey("volumeEncryptionKey")
        .workspaceProperties(WorkspacePropertiesProperty.builder()
                .computeTypeName("computeTypeName")
                .rootVolumeSizeGib(123)
                .runningMode("runningMode")
                .runningModeAutoStopTimeoutInMinutes(123)
                .userVolumeSizeGib(123)
                .build())
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.WorkSpaces;

var cfnWorkspaceProps = new CfnWorkspaceProps {
    BundleId = "bundleId",
    DirectoryId = "directoryId",
    UserName = "userName",

    // the properties below are optional
    RootVolumeEncryptionEnabled = false,
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } },
    UserVolumeEncryptionEnabled = false,
    VolumeEncryptionKey = "volumeEncryptionKey",
    WorkspaceProperties = new WorkspacePropertiesProperty {
        ComputeTypeName = "computeTypeName",
        RootVolumeSizeGib = 123,
        RunningMode = "runningMode",
        RunningModeAutoStopTimeoutInMinutes = 123,
        UserVolumeSizeGib = 123
    }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnWorkspaceProps := &CfnWorkspaceProps{
	BundleId: jsii.String("bundleId"),
	DirectoryId: jsii.String("directoryId"),
	UserName: jsii.String("userName"),

	// the properties below are optional
	RootVolumeEncryptionEnabled: jsii.Boolean(false),
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
	UserVolumeEncryptionEnabled: jsii.Boolean(false),
	VolumeEncryptionKey: jsii.String("volumeEncryptionKey"),
	WorkspaceProperties: &WorkspacePropertiesProperty{
		ComputeTypeName: jsii.String("computeTypeName"),
		RootVolumeSizeGib: jsii.Number(123),
		RunningMode: jsii.String("runningMode"),
		RunningModeAutoStopTimeoutInMinutes: jsii.Number(123),
		UserVolumeSizeGib: jsii.Number(123),
	},
}

Properties ​

bundleIdstringbundle_idstrbundleIdStringBundleIdstringBundleId*string required #
The identifier of the bundle for the WorkSpace.
directoryIdstringdirectory_idstrdirectoryIdStringDirectoryIdstringDirectoryId*string required #
The identifier of the Directory Service directory for the WorkSpace.
rootVolumeEncryptionEnabledoptionalboolean | IResolvableroot_volume_encryption_enabledoptionaltyping.Union[bool, IResolvable]rootVolumeEncryptionEnabledoptionalBooleanRootVolumeEncryptionEnabledoptionalboolRootVolumeEncryptionEnabledoptionalinterface{} #
Indicates whether the data stored on the root volume is encrypted.
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #
The tags for the WorkSpace.
userNamestringuser_namestruserNameStringUserNamestringUserName*string required #
The user name of the user for the WorkSpace.

This user name must exist in the Directory Service directory for the WorkSpace.

userVolumeEncryptionEnabledoptionalboolean | IResolvableuser_volume_encryption_enabledoptionaltyping.Union[bool, IResolvable]userVolumeEncryptionEnabledoptionalBooleanUserVolumeEncryptionEnabledoptionalboolUserVolumeEncryptionEnabledoptionalinterface{} #
Indicates whether the data stored on the user volume is encrypted.
volumeEncryptionKeyoptionalstringvolume_encryption_keyoptionalstrvolumeEncryptionKeyoptionalStringVolumeEncryptionKeyoptionalstringVolumeEncryptionKeyoptional*string #
The symmetric AWS KMS key used to encrypt data stored on your WorkSpace.

Amazon WorkSpaces does not support asymmetric KMS keys.

workspacePropertiesoptionalIResolvable | CfnWorkspace.WorkspacePropertiesPropertyworkspace_propertiesoptionaltyping.Union[IResolvable, WorkspacePropertiesProperty]workspacePropertiesoptionalIResolvableWorkspacePropertiesoptionalIResolvableWorkspacePropertiesoptionalinterface{} #
The WorkSpace properties.