Class CfnWorkspace

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

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-22T02:24:10.933Z") @Stability(Stable) public class CfnWorkspace extends CfnResource implements IInspectable, ITaggable
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();
 

See Also:
  • 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 software.constructs.Construct scope, @NotNull String id, @NotNull CfnWorkspaceProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). 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.
    • getAttrId

      @Stability(Stable) @NotNull public String getAttrId()
      The identifier of the WorkSpace, returned as a string.
    • getCfnProperties

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

      @Stability(Stable) @NotNull public TagManager getTags()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getTags in interface ITaggable
    • 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.
    • setUserName

      @Stability(Stable) public void setUserName(@NotNull String value)
      The user name of the user 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.
    • getTagsRaw

      @Stability(Stable) @Nullable public List<CfnTag> getTagsRaw()
      The tags for the WorkSpace.
    • setTagsRaw

      @Stability(Stable) public void setTagsRaw(@Nullable List<CfnTag> value)
      The tags for the WorkSpace.
    • 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.
    • setVolumeEncryptionKey

      @Stability(Stable) public void setVolumeEncryptionKey(@Nullable String value)
      The symmetric AWS KMS key used to encrypt data stored on your WorkSpace.
    • 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.