Class CfnWorkspaceInstance

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.workspacesinstances.CfnWorkspaceInstance
All Implemented Interfaces:
IInspectable, ITaggableV2, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.112.0 (build de1bc80)", date="2025-07-16T11:43:24.625Z") @Stability(Stable) public class CfnWorkspaceInstance extends CfnResource implements IInspectable, ITaggableV2
Resource Type definition for AWS::WorkspacesInstances::WorkspaceInstance.

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.workspacesinstances.*;
 CfnWorkspaceInstance cfnWorkspaceInstance = CfnWorkspaceInstance.Builder.create(this, "MyCfnWorkspaceInstance")
         .managedInstance(ManagedInstanceProperty.builder()
                 .imageId("imageId")
                 .instanceType("instanceType")
                 // the properties below are optional
                 .blockDeviceMappings(List.of(BlockDeviceMappingProperty.builder()
                         .deviceName("deviceName")
                         .ebs(EbsBlockDeviceProperty.builder()
                                 .encrypted(false)
                                 .iops(123)
                                 .kmsKeyId("kmsKeyId")
                                 .throughput(123)
                                 .volumeSize(123)
                                 .volumeType("volumeType")
                                 .build())
                         .noDevice("noDevice")
                         .virtualName("virtualName")
                         .build()))
                 .cpuOptions(CpuOptionsRequestProperty.builder()
                         .coreCount(123)
                         .threadsPerCore(123)
                         .build())
                 .creditSpecification(CreditSpecificationRequestProperty.builder()
                         .cpuCredits("cpuCredits")
                         .build())
                 .disableApiStop(false)
                 .ebsOptimized(false)
                 .enclaveOptions(EnclaveOptionsRequestProperty.builder()
                         .enabled(false)
                         .build())
                 .hibernationOptions(HibernationOptionsRequestProperty.builder()
                         .configured(false)
                         .build())
                 .iamInstanceProfile(IamInstanceProfileSpecificationProperty.builder()
                         .name("name")
                         .build())
                 .keyName("keyName")
                 .maintenanceOptions(InstanceMaintenanceOptionsRequestProperty.builder()
                         .autoRecovery("autoRecovery")
                         .build())
                 .metadataOptions(InstanceMetadataOptionsRequestProperty.builder()
                         .httpEndpoint("httpEndpoint")
                         .httpProtocolIpv6("httpProtocolIpv6")
                         .httpPutResponseHopLimit(123)
                         .httpTokens("httpTokens")
                         .instanceMetadataTags("instanceMetadataTags")
                         .build())
                 .monitoring(RunInstancesMonitoringEnabledProperty.builder()
                         .enabled(false)
                         .build())
                 .networkInterfaces(List.of(InstanceNetworkInterfaceSpecificationProperty.builder()
                         .description("description")
                         .deviceIndex(123)
                         .groups(List.of("groups"))
                         .subnetId("subnetId")
                         .build()))
                 .networkPerformanceOptions(InstanceNetworkPerformanceOptionsRequestProperty.builder()
                         .bandwidthWeighting("bandwidthWeighting")
                         .build())
                 .placement(PlacementProperty.builder()
                         .availabilityZone("availabilityZone")
                         .groupName("groupName")
                         .tenancy("tenancy")
                         .build())
                 .privateDnsNameOptions(PrivateDnsNameOptionsRequestProperty.builder()
                         .enableResourceNameDnsAaaaRecord(false)
                         .enableResourceNameDnsARecord(false)
                         .hostnameType("hostnameType")
                         .build())
                 .tagSpecifications(List.of(TagSpecificationProperty.builder()
                         .resourceType("resourceType")
                         .tags(List.of(CfnTag.builder()
                                 .key("key")
                                 .value("value")
                                 .build()))
                         .build()))
                 .userData("userData")
                 .build())
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .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

    • CfnWorkspaceInstance

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

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

      @Stability(Stable) public CfnWorkspaceInstance(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable CfnWorkspaceInstanceProps 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.
    • CfnWorkspaceInstance

      @Stability(Stable) public CfnWorkspaceInstance(@NotNull software.constructs.Construct scope, @NotNull String id)
      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.
  • 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.
    • getAttrEc2ManagedInstance

      @Stability(Stable) @NotNull public IResolvable getAttrEc2ManagedInstance()
    • getAttrEc2ManagedInstanceInstanceId

      @Stability(Stable) @NotNull public String getAttrEc2ManagedInstanceInstanceId()
    • getAttrProvisionState

      @Stability(Stable) @NotNull public String getAttrProvisionState()
      The current state of the workspace instance.
    • getAttrWorkspaceInstanceId

      @Stability(Stable) @NotNull public String getAttrWorkspaceInstanceId()
      Unique identifier for the workspace instance.
    • getCdkTagManager

      @Stability(Stable) @NotNull public TagManager getCdkTagManager()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getCdkTagManager in interface ITaggableV2
    • getCfnProperties

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

      @Stability(Stable) @Nullable public Object getManagedInstance()
    • setManagedInstance

      @Stability(Stable) public void setManagedInstance(@Nullable IResolvable value)
    • setManagedInstance

      @Stability(Stable) public void setManagedInstance(@Nullable CfnWorkspaceInstance.ManagedInstanceProperty value)
    • getTags

      @Stability(Stable) @Nullable public List<CfnTag> getTags()
    • setTags

      @Stability(Stable) public void setTags(@Nullable List<CfnTag> value)