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, IWorkspaceInstanceRef, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.113.0 (build fc68b25)", date="2025-10-14T12:28:22.552Z") @Stability(Stable) public class CfnWorkspaceInstance extends CfnResource implements IInspectable, IWorkspaceInstanceRef, 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()))
                 .capacityReservationSpecification(CapacityReservationSpecificationProperty.builder()
                         .capacityReservationPreference("capacityReservationPreference")
                         .capacityReservationTarget(CapacityReservationTargetProperty.builder()
                                 .capacityReservationId("capacityReservationId")
                                 .capacityReservationResourceGroupArn("capacityReservationResourceGroupArn")
                                 .build())
                         .build())
                 .cpuOptions(CpuOptionsRequestProperty.builder()
                         .coreCount(123)
                         .threadsPerCore(123)
                         .build())
                 .creditSpecification(CreditSpecificationRequestProperty.builder()
                         .cpuCredits("cpuCredits")
                         .build())
                 .disableApiStop(false)
                 .ebsOptimized(false)
                 .enablePrimaryIpv6(false)
                 .enclaveOptions(EnclaveOptionsRequestProperty.builder()
                         .enabled(false)
                         .build())
                 .hibernationOptions(HibernationOptionsRequestProperty.builder()
                         .configured(false)
                         .build())
                 .iamInstanceProfile(IamInstanceProfileSpecificationProperty.builder()
                         .arn("arn")
                         .name("name")
                         .build())
                 .instanceMarketOptions(InstanceMarketOptionsRequestProperty.builder()
                         .marketType("marketType")
                         .spotOptions(SpotMarketOptionsProperty.builder()
                                 .instanceInterruptionBehavior("instanceInterruptionBehavior")
                                 .maxPrice("maxPrice")
                                 .spotInstanceType("spotInstanceType")
                                 .validUntilUtc("validUntilUtc")
                                 .build())
                         .build())
                 .ipv6AddressCount(123)
                 .keyName("keyName")
                 .licenseSpecifications(List.of(LicenseConfigurationRequestProperty.builder()
                         .licenseConfigurationArn("licenseConfigurationArn")
                         .build()))
                 .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")
                         .groupId("groupId")
                         .groupName("groupName")
                         .partitionNumber(123)
                         .tenancy("tenancy")
                         .build())
                 .privateDnsNameOptions(PrivateDnsNameOptionsRequestProperty.builder()
                         .enableResourceNameDnsAaaaRecord(false)
                         .enableResourceNameDnsARecord(false)
                         .hostnameType("hostnameType")
                         .build())
                 .subnetId("subnetId")
                 .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

    • fromWorkspaceInstanceId

      @Stability(Stable) @NotNull public static IWorkspaceInstanceRef fromWorkspaceInstanceId(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String workspaceInstanceId)
      Creates a new IWorkspaceInstanceRef from a workspaceInstanceId.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      workspaceInstanceId - This parameter is required.
    • 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
    • getWorkspaceInstanceRef

      @Stability(Stable) @NotNull public WorkspaceInstanceReference getWorkspaceInstanceRef()
      A reference to a WorkspaceInstance resource.
      Specified by:
      getWorkspaceInstanceRef in interface IWorkspaceInstanceRef
    • 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)