Class: AWSCDK::EC2::EbsDeviceSnapshotOptions
- Inherits:
-
EbsDeviceOptionsBase
- Object
- EbsDeviceOptionsBase
- AWSCDK::EC2::EbsDeviceSnapshotOptions
- Defined in:
- ec2/ebs_device_snapshot_options.rb
Overview
Block device options for an EBS volume created from a snapshot.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#delete_on_termination ⇒ Boolean?
readonly
Indicates whether to delete the volume when the instance is terminated.
-
#iops ⇒ Numeric?
readonly
The number of I/O operations per second (IOPS) to provision for the volume.
-
#throughput ⇒ Numeric?
readonly
The throughput to provision for a
gp3volume. -
#volume_size ⇒ Numeric?
readonly
The volume size, in Gibibytes (GiB).
-
#volume_type ⇒ AWSCDK::EC2::EbsDeviceVolumeType?
readonly
The EBS volume type.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(delete_on_termination: nil, iops: nil, throughput: nil, volume_type: nil, volume_size: nil) ⇒ EbsDeviceSnapshotOptions
constructor
A new instance of EbsDeviceSnapshotOptions.
- #to_jsii ⇒ Object
Constructor Details
#initialize(delete_on_termination: nil, iops: nil, throughput: nil, volume_type: nil, volume_size: nil) ⇒ EbsDeviceSnapshotOptions
Returns a new instance of EbsDeviceSnapshotOptions.
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'ec2/ebs_device_snapshot_options.rb', line 12 def initialize(delete_on_termination: nil, iops: nil, throughput: nil, volume_type: nil, volume_size: nil) @delete_on_termination = delete_on_termination Jsii::Type.check_type(@delete_on_termination, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "deleteOnTermination") unless @delete_on_termination.nil? @iops = iops Jsii::Type.check_type(@iops, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "iops") unless @iops.nil? @throughput = throughput Jsii::Type.check_type(@throughput, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "throughput") unless @throughput.nil? @volume_type = volume_type Jsii::Type.check_type(@volume_type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLkVic0RldmljZVZvbHVtZVR5cGUifQ==")), "volumeType") unless @volume_type.nil? @volume_size = volume_size Jsii::Type.check_type(@volume_size, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "volumeSize") unless @volume_size.nil? end |
Instance Attribute Details
#delete_on_termination ⇒ Boolean? (readonly)
Default: - true for Amazon EC2 Auto Scaling, false otherwise (e.g. EBS)
Indicates whether to delete the volume when the instance is terminated.
29 30 31 |
# File 'ec2/ebs_device_snapshot_options.rb', line 29 def delete_on_termination @delete_on_termination end |
#iops ⇒ Numeric? (readonly)
Default: - none, required for EbsDeviceVolumeType.IO1
The number of I/O operations per second (IOPS) to provision for the volume.
Must only be set for volume_type: EbsDeviceVolumeType.IO1
The maximum ratio of IOPS to volume size (in GiB) is 50:1, so for 5,000 provisioned IOPS, you need at least 100 GiB storage on the volume.
40 41 42 |
# File 'ec2/ebs_device_snapshot_options.rb', line 40 def iops @iops end |
#throughput ⇒ Numeric? (readonly)
Default: - 125 MiB/s.
The throughput to provision for a gp3 volume.
Valid Range: Minimum value of 125. Maximum value of 2000.
gp3 volumes deliver a consistent baseline throughput performance of 125 MiB/s.
You can provision additional throughput for an additional cost at a ratio of 0.25 MiB/s per provisioned IOPS.
51 52 53 |
# File 'ec2/ebs_device_snapshot_options.rb', line 51 def throughput @throughput end |
#volume_size ⇒ Numeric? (readonly)
Default: - The snapshot size
The volume size, in Gibibytes (GiB).
If you specify volumeSize, it must be equal or greater than the size of the snapshot.
64 65 66 |
# File 'ec2/ebs_device_snapshot_options.rb', line 64 def volume_size @volume_size end |
#volume_type ⇒ AWSCDK::EC2::EbsDeviceVolumeType? (readonly)
Default: EbsDeviceVolumeType.GENERAL_PURPOSE_SSD or EbsDeviceVolumeType.GENERAL_PURPOSE_SSD_GP3 if @aws-cdk/aws-ec2:ebsDefaultGp3Volume is enabled.
The EBS volume type.
57 58 59 |
# File 'ec2/ebs_device_snapshot_options.rb', line 57 def volume_type @volume_type end |
Class Method Details
.jsii_properties ⇒ Object
66 67 68 69 70 71 72 73 74 |
# File 'ec2/ebs_device_snapshot_options.rb', line 66 def self.jsii_properties { :delete_on_termination => "deleteOnTermination", :iops => "iops", :throughput => "throughput", :volume_type => "volumeType", :volume_size => "volumeSize", } end |
Instance Method Details
#to_jsii ⇒ Object
76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'ec2/ebs_device_snapshot_options.rb', line 76 def to_jsii result = {} result.merge!(super) result.merge!({ "deleteOnTermination" => @delete_on_termination, "iops" => @iops, "throughput" => @throughput, "volumeType" => @volume_type, "volumeSize" => @volume_size, }) result.compact end |