Class: AWSCDK::Autoscaling::EbsDeviceProps
- Inherits:
-
EbsDeviceSnapshotOptions
- Object
- EbsDeviceSnapshotOptions
- AWSCDK::Autoscaling::EbsDeviceProps
- Defined in:
- autoscaling/ebs_device_props.rb
Overview
Properties of an EBS block device.
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.
-
#snapshot_id ⇒ String?
readonly
The snapshot ID of the volume to use.
-
#throughput ⇒ Numeric?
readonly
The throughput that the volume supports, in MiB/s Takes a minimum of 125 and maximum of 2000.
-
#volume_size ⇒ Numeric?
readonly
The volume size, in Gibibytes (GiB).
-
#volume_type ⇒ AWSCDK::Autoscaling::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, snapshot_id: nil) ⇒ EbsDeviceProps
constructor
A new instance of EbsDeviceProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(delete_on_termination: nil, iops: nil, throughput: nil, volume_type: nil, volume_size: nil, snapshot_id: nil) ⇒ EbsDeviceProps
Returns a new instance of EbsDeviceProps.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'autoscaling/ebs_device_props.rb', line 13 def initialize(delete_on_termination: nil, iops: nil, throughput: nil, volume_type: nil, volume_size: nil, snapshot_id: 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("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXV0b3NjYWxpbmcuRWJzRGV2aWNlVm9sdW1lVHlwZSJ9")), "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? @snapshot_id = snapshot_id Jsii::Type.check_type(@snapshot_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "snapshotId") unless @snapshot_id.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.
32 33 34 |
# File 'autoscaling/ebs_device_props.rb', line 32 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.
43 44 45 |
# File 'autoscaling/ebs_device_props.rb', line 43 def iops @iops end |
#snapshot_id ⇒ String? (readonly)
Default: - No snapshot will be used
The snapshot ID of the volume to use.
67 68 69 |
# File 'autoscaling/ebs_device_props.rb', line 67 def snapshot_id @snapshot_id end |
#throughput ⇒ Numeric? (readonly)
Default: - 125 MiB/s. Only valid on gp3 volumes.
The throughput that the volume supports, in MiB/s Takes a minimum of 125 and maximum of 2000.
49 50 51 |
# File 'autoscaling/ebs_device_props.rb', line 49 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.
62 63 64 |
# File 'autoscaling/ebs_device_props.rb', line 62 def volume_size @volume_size end |
#volume_type ⇒ AWSCDK::Autoscaling::EbsDeviceVolumeType? (readonly)
Default: EbsDeviceVolumeType.GP2
The EBS volume type.
55 56 57 |
# File 'autoscaling/ebs_device_props.rb', line 55 def volume_type @volume_type end |
Class Method Details
.jsii_properties ⇒ Object
69 70 71 72 73 74 75 76 77 78 |
# File 'autoscaling/ebs_device_props.rb', line 69 def self.jsii_properties { :delete_on_termination => "deleteOnTermination", :iops => "iops", :throughput => "throughput", :volume_type => "volumeType", :volume_size => "volumeSize", :snapshot_id => "snapshotId", } end |
Instance Method Details
#to_jsii ⇒ Object
80 81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'autoscaling/ebs_device_props.rb', line 80 def to_jsii result = {} result.merge!(super) result.merge!({ "deleteOnTermination" => @delete_on_termination, "iops" => @iops, "throughput" => @throughput, "volumeType" => @volume_type, "volumeSize" => @volume_size, "snapshotId" => @snapshot_id, }) result.compact end |