Interface VolumeAttributes

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
VolumeAttributes.Jsii$Proxy

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-07-12T19:34:01.038Z") @Stability(Stable) public interface VolumeAttributes extends software.amazon.jsii.JsiiSerializable
Attributes required to import an existing EBS Volume into the Stack.

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.ec2.*;
 import software.amazon.awscdk.services.kms.*;
 Key key;
 VolumeAttributes volumeAttributes = VolumeAttributes.builder()
         .availabilityZone("availabilityZone")
         .volumeId("volumeId")
         // the properties below are optional
         .encryptionKey(key)
         .build();
 
  • Method Details

    • getAvailabilityZone

      @Stability(Stable) @NotNull String getAvailabilityZone()
      The availability zone that the EBS Volume is contained within (ex: us-west-2a).
    • getVolumeId

      @Stability(Stable) @NotNull String getVolumeId()
      The EBS Volume's ID.
    • getEncryptionKey

      @Stability(Stable) @Nullable default IKey getEncryptionKey()
      The customer-managed encryption key that is used to encrypt the Volume.

      Default: None -- The EBS Volume is not using a customer-managed KMS key for encryption.

    • builder

      @Stability(Stable) static VolumeAttributes.Builder builder()
      Returns:
      a VolumeAttributes.Builder of VolumeAttributes