Class Volume.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<Volume>
- Enclosing class:
Volume
Volume
.-
Method Summary
Modifier and TypeMethodDescriptionautoEnableIo
(Boolean autoEnableIo) Indicates whether the volume is auto-enabled for I/O operations.availabilityZone
(String availabilityZone) The Availability Zone in which to create the volume.build()
static Volume.Builder
enableMultiAttach
(Boolean enableMultiAttach) Indicates whether Amazon EBS Multi-Attach is enabled.Specifies whether the volume should be encrypted.encryptionKey
(IKey encryptionKey) The customer-managed encryption key that is used to encrypt the Volume.The number of I/O operations per second (IOPS) to provision for the volume.removalPolicy
(RemovalPolicy removalPolicy) Policy to apply when the volume is removed from the stack.The size of the volume, in GiBs.snapshotId
(String snapshotId) The snapshot from which to create the volume.volumeName
(String volumeName) The value of the physicalName property of this resource.volumeType
(EbsDeviceVolumeType volumeType) The type of the volume;
-
Method Details
-
create
@Stability(Stable) public static Volume.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope
- This parameter is required.id
- This parameter is required.- Returns:
- a new instance of
Volume.Builder
.
-
availabilityZone
The Availability Zone in which to create the volume.- Parameters:
availabilityZone
- The Availability Zone in which to create the volume. This parameter is required.- Returns:
this
-
autoEnableIo
Indicates whether the volume is auto-enabled for I/O operations.By default, Amazon EBS disables I/O to the volume from attached EC2 instances when it determines that a volume's data is potentially inconsistent. If the consistency of the volume is not a concern, and you prefer that the volume be made available immediately if it's impaired, you can configure the volume to automatically enable I/O.
Default: false
- Parameters:
autoEnableIo
- Indicates whether the volume is auto-enabled for I/O operations. This parameter is required.- Returns:
this
-
enableMultiAttach
Indicates whether Amazon EBS Multi-Attach is enabled.See
invalid @link
{@link https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-volumes-multi.html#considerations|Considerations
Default: false
- Parameters:
enableMultiAttach
- Indicates whether Amazon EBS Multi-Attach is enabled. This parameter is required.- Returns:
this
-
encrypted
Specifies whether the volume should be encrypted.The effect of setting the encryption state to true depends on the volume origin (new or from a snapshot), starting encryption state, ownership, and whether encryption by default is enabled. For more information, see
invalid @link
{@link https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html#encryption-by-default|Encryption
invalid @link
{@link https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html#EBSEncryption_supported_instances|Supported
Default: false
- Parameters:
encrypted
- Specifies whether the volume should be encrypted. This parameter is required.- Returns:
this
-
encryptionKey
The customer-managed encryption key that is used to encrypt the Volume.The encrypted property must be true if this is provided. Note: If using an
invalid @link
{@link aws-kms.IKey
invalid @link
{@link aws-kms.Key.fromKeyArn()
ex: arn:aws:iam::00000000000:root" }, "Resource": "*", "Action": [ "kms:DescribeKey", "kms:GenerateDataKeyWithoutPlainText", ], "Condition": { "StringEquals": { "kms:ViaService": "ec2. .amazonaws.com", (eg: ec2.us-east-1.amazonaws.com) "kms:CallerAccount": "0000000000" (your account ID) } } } ``` Default: The default KMS key for the account, region, and EC2 service is used.
- Parameters:
encryptionKey
- The customer-managed encryption key that is used to encrypt the Volume. This parameter is required.- Returns:
this
-
iops
The number of I/O operations per second (IOPS) to provision for the volume.The maximum ratio is 50 IOPS/GiB for PROVISIONED_IOPS_SSD, and 500 IOPS/GiB for both PROVISIONED_IOPS_SSD_IO2 and GENERAL_PURPOSE_SSD_GP3. See
invalid @link
{@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html
Default: None -- Required for io1 and io2 volumes. The default for gp3 volumes is 3,000 IOPS if omitted.
- Parameters:
iops
- The number of I/O operations per second (IOPS) to provision for the volume. This parameter is required.- Returns:
this
-
removalPolicy
Policy to apply when the volume is removed from the stack.Default: RemovalPolicy.RETAIN
- Parameters:
removalPolicy
- Policy to apply when the volume is removed from the stack. This parameter is required.- Returns:
this
-
size
The size of the volume, in GiBs.You must specify either a snapshot ID or a volume size. See
invalid @link
{@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html
Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.
- Parameters:
size
- The size of the volume, in GiBs. This parameter is required.- Returns:
this
-
snapshotId
The snapshot from which to create the volume.You must specify either a snapshot ID or a volume size.
Default: The EBS volume is not created from a snapshot.
- Parameters:
snapshotId
- The snapshot from which to create the volume. This parameter is required.- Returns:
this
-
volumeName
The value of the physicalName property of this resource.Default: The physical name will be allocated by CloudFormation at deployment time
- Parameters:
volumeName
- The value of the physicalName property of this resource. This parameter is required.- Returns:
this
-
volumeType
The type of the volume;what type of storage to use to form the EBS Volume.
Default:
invalid @link
EbsDeviceVolumeType.GENERAL_PURPOSE_SSD
- Parameters:
volumeType
- The type of the volume;. This parameter is required.- Returns:
this
-
build
-