Class: AWSCDK::Autoscaling::EbsDeviceOptions
- Inherits:
-
EbsDeviceOptionsBase
- Object
- EbsDeviceOptionsBase
- AWSCDK::Autoscaling::EbsDeviceOptions
- Defined in:
- autoscaling/ebs_device_options.rb
Overview
Block device options for an EBS volume.
Instance Attribute Summary collapse
-
#delete_on_termination ⇒ Boolean?
readonly
Indicates whether to delete the volume when the instance is terminated.
-
#encrypted ⇒ Boolean?
readonly
Specifies whether the EBS volume is encrypted.
-
#iops ⇒ Numeric?
readonly
The number of I/O operations per second (IOPS) to provision for the volume.
-
#throughput ⇒ Numeric?
readonly
The throughput that the volume supports, in MiB/s Takes a minimum of 125 and maximum of 2000.
-
#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, encrypted: nil) ⇒ EbsDeviceOptions
constructor
A new instance of EbsDeviceOptions.
- #to_jsii ⇒ Object
Constructor Details
#initialize(delete_on_termination: nil, iops: nil, throughput: nil, volume_type: nil, encrypted: nil) ⇒ EbsDeviceOptions
Returns a new instance of EbsDeviceOptions.
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'autoscaling/ebs_device_options.rb', line 12 def initialize(delete_on_termination: nil, iops: nil, throughput: nil, volume_type: nil, encrypted: 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? @encrypted = encrypted Jsii::Type.check_type(@encrypted, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "encrypted") unless @encrypted.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 'autoscaling/ebs_device_options.rb', line 29 def delete_on_termination @delete_on_termination end |
#encrypted ⇒ Boolean? (readonly)
Default: false
Specifies whether the EBS volume is encrypted.
Encrypted EBS volumes can only be attached to instances that support Amazon EBS encryption
60 61 62 |
# File 'autoscaling/ebs_device_options.rb', line 60 def encrypted @encrypted 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 'autoscaling/ebs_device_options.rb', line 40 def iops @iops 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.
46 47 48 |
# File 'autoscaling/ebs_device_options.rb', line 46 def throughput @throughput end |
#volume_type ⇒ AWSCDK::Autoscaling::EbsDeviceVolumeType? (readonly)
Default: EbsDeviceVolumeType.GP2
The EBS volume type.
52 53 54 |
# File 'autoscaling/ebs_device_options.rb', line 52 def volume_type @volume_type end |
Class Method Details
.jsii_properties ⇒ Object
62 63 64 65 66 67 68 69 70 |
# File 'autoscaling/ebs_device_options.rb', line 62 def self.jsii_properties { :delete_on_termination => "deleteOnTermination", :iops => "iops", :throughput => "throughput", :volume_type => "volumeType", :encrypted => "encrypted", } end |
Instance Method Details
#to_jsii ⇒ Object
72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'autoscaling/ebs_device_options.rb', line 72 def to_jsii result = {} result.merge!(super) result.merge!({ "deleteOnTermination" => @delete_on_termination, "iops" => @iops, "throughput" => @throughput, "volumeType" => @volume_type, "encrypted" => @encrypted, }) result.compact end |