Class CfnWorkspace

java.lang.Object
software.amazon.jsii.JsiiObject
All Implemented Interfaces:
IConstruct, IDependable, IInspectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:36.665Z") @Stability(Stable) public class CfnWorkspace extends CfnResource implements IInspectable
A CloudFormation AWS::WorkSpaces::Workspace.

The AWS::WorkSpaces::Workspace resource specifies a WorkSpace.

Updates are not supported for the BundleId , RootVolumeEncryptionEnabled , UserVolumeEncryptionEnabled , or VolumeEncryptionKey properties. To update these properties, you must also update a property that triggers a replacement, such as the UserName property.

Example:

 // 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.*;
 CfnWorkspace cfnWorkspace = CfnWorkspace.Builder.create(this, "MyCfnWorkspace")
         .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();
 
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnWorkspace

      protected CfnWorkspace(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnWorkspace

      protected CfnWorkspace(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnWorkspace

      @Stability(Stable) public CfnWorkspace(@NotNull Construct scope, @NotNull String id, @NotNull CfnWorkspaceProps props)
      Create a new AWS::WorkSpaces::Workspace.

      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      This parameter is required.
      props -
      • resource properties.
      This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector -
      • tree inspector to collect and process attributes.
      This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getTags

      @Stability(Stable) @NotNull public TagManager getTags()
      The tags for the WorkSpace.
    • getBundleId

      @Stability(Stable) @NotNull public String getBundleId()
      The identifier of the bundle for the WorkSpace.
    • setBundleId

      @Stability(Stable) public void setBundleId(@NotNull String value)
      The identifier of the bundle for the WorkSpace.
    • getDirectoryId

      @Stability(Stable) @NotNull public String getDirectoryId()
      The identifier of the AWS Directory Service directory for the WorkSpace.
    • setDirectoryId

      @Stability(Stable) public void setDirectoryId(@NotNull String value)
      The identifier of the AWS Directory Service directory for the WorkSpace.
    • getUserName

      @Stability(Stable) @NotNull public String getUserName()
      The user name of the user for the WorkSpace.

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

    • setUserName

      @Stability(Stable) public void setUserName(@NotNull String value)
      The user name of the user for the WorkSpace.

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

    • getRootVolumeEncryptionEnabled

      @Stability(Stable) @Nullable public Object getRootVolumeEncryptionEnabled()
      Indicates whether the data stored on the root volume is encrypted.
    • setRootVolumeEncryptionEnabled

      @Stability(Stable) public void setRootVolumeEncryptionEnabled(@Nullable Boolean value)
      Indicates whether the data stored on the root volume is encrypted.
    • setRootVolumeEncryptionEnabled

      @Stability(Stable) public void setRootVolumeEncryptionEnabled(@Nullable IResolvable value)
      Indicates whether the data stored on the root volume is encrypted.
    • getUserVolumeEncryptionEnabled

      @Stability(Stable) @Nullable public Object getUserVolumeEncryptionEnabled()
      Indicates whether the data stored on the user volume is encrypted.
    • setUserVolumeEncryptionEnabled

      @Stability(Stable) public void setUserVolumeEncryptionEnabled(@Nullable Boolean value)
      Indicates whether the data stored on the user volume is encrypted.
    • setUserVolumeEncryptionEnabled

      @Stability(Stable) public void setUserVolumeEncryptionEnabled(@Nullable IResolvable value)
      Indicates whether the data stored on the user volume is encrypted.
    • getVolumeEncryptionKey

      @Stability(Stable) @Nullable public String getVolumeEncryptionKey()
      The symmetric AWS KMS key used to encrypt data stored on your WorkSpace.

      Amazon WorkSpaces does not support asymmetric KMS keys.

    • setVolumeEncryptionKey

      @Stability(Stable) public void setVolumeEncryptionKey(@Nullable String value)
      The symmetric AWS KMS key used to encrypt data stored on your WorkSpace.

      Amazon WorkSpaces does not support asymmetric KMS keys.

    • getWorkspaceProperties

      @Stability(Stable) @Nullable public Object getWorkspaceProperties()
      The WorkSpace properties.
    • setWorkspaceProperties

      @Stability(Stable) public void setWorkspaceProperties(@Nullable IResolvable value)
      The WorkSpace properties.
    • setWorkspaceProperties

      @Stability(Stable) public void setWorkspaceProperties(@Nullable CfnWorkspace.WorkspacePropertiesProperty value)
      The WorkSpace properties.