java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, 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.622Z") @Stability(Stable) public class CfnVolume extends CfnResource implements IInspectable
Resource Type definition for AWS::WorkspacesInstances::Volume - Manages WorkSpaces Volume resources.

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.*;
 CfnVolume cfnVolume = CfnVolume.Builder.create(this, "MyCfnVolume")
         .availabilityZone("availabilityZone")
         // the properties below are optional
         .encrypted(false)
         .iops(123)
         .kmsKeyId("kmsKeyId")
         .sizeInGb(123)
         .snapshotId("snapshotId")
         .tagSpecifications(List.of(TagSpecificationProperty.builder()
                 .resourceType("resourceType")
                 .tags(List.of(CfnTag.builder()
                         .key("key")
                         .value("value")
                         .build()))
                 .build()))
         .throughput(123)
         .volumeType("volumeType")
         .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

    • CfnVolume

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

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

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

      @Stability(Stable) @NotNull public String getAttrVolumeId()
      Unique identifier for the volume.
    • getCfnProperties

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

      @Stability(Stable) @NotNull public String getAvailabilityZone()
      The Availability Zone in which to create the volume.
    • setAvailabilityZone

      @Stability(Stable) public void setAvailabilityZone(@NotNull String value)
      The Availability Zone in which to create the volume.
    • getEncrypted

      @Stability(Stable) @Nullable public Object getEncrypted()
      Indicates whether the volume should be encrypted.
    • setEncrypted

      @Stability(Stable) public void setEncrypted(@Nullable Boolean value)
      Indicates whether the volume should be encrypted.
    • setEncrypted

      @Stability(Stable) public void setEncrypted(@Nullable IResolvable value)
      Indicates whether the volume should be encrypted.
    • getIops

      @Stability(Stable) @Nullable public Number getIops()
      The number of I/O operations per second (IOPS).
    • setIops

      @Stability(Stable) public void setIops(@Nullable Number value)
      The number of I/O operations per second (IOPS).
    • getKmsKeyId

      @Stability(Stable) @Nullable public String getKmsKeyId()
      The identifier of the AWS Key Management Service (AWS KMS) customer master key (CMK) to use for Amazon EBS encryption.
    • setKmsKeyId

      @Stability(Stable) public void setKmsKeyId(@Nullable String value)
      The identifier of the AWS Key Management Service (AWS KMS) customer master key (CMK) to use for Amazon EBS encryption.
    • getSizeInGb

      @Stability(Stable) @Nullable public Number getSizeInGb()
      The size of the volume, in GiBs.
    • setSizeInGb

      @Stability(Stable) public void setSizeInGb(@Nullable Number value)
      The size of the volume, in GiBs.
    • getSnapshotId

      @Stability(Stable) @Nullable public String getSnapshotId()
      The snapshot from which to create the volume.
    • setSnapshotId

      @Stability(Stable) public void setSnapshotId(@Nullable String value)
      The snapshot from which to create the volume.
    • getTagSpecifications

      @Stability(Stable) @Nullable public Object getTagSpecifications()
      The tags passed to EBS volume.
    • setTagSpecifications

      @Stability(Stable) public void setTagSpecifications(@Nullable IResolvable value)
      The tags passed to EBS volume.
    • setTagSpecifications

      @Stability(Stable) public void setTagSpecifications(@Nullable List<Object> value)
      The tags passed to EBS volume.
    • getThroughput

      @Stability(Stable) @Nullable public Number getThroughput()
      The throughput to provision for a volume, with a maximum of 1,000 MiB/s.
    • setThroughput

      @Stability(Stable) public void setThroughput(@Nullable Number value)
      The throughput to provision for a volume, with a maximum of 1,000 MiB/s.
    • getVolumeType

      @Stability(Stable) @Nullable public String getVolumeType()
      The volume type.
    • setVolumeType

      @Stability(Stable) public void setVolumeType(@Nullable String value)
      The volume type.