Class: Elasticity::EbsBlockDeviceConfig
- Inherits:
-
Object
- Object
- Elasticity::EbsBlockDeviceConfig
- Defined in:
- lib/elasticity/instance_group.rb
Instance Attribute Summary collapse
-
#iops ⇒ Object
Returns the value of attribute iops.
-
#size_in_gb ⇒ Object
Returns the value of attribute size_in_gb.
-
#volume_type ⇒ Object
Returns the value of attribute volume_type.
-
#volumes_per_instance ⇒ Object
Returns the value of attribute volumes_per_instance.
Instance Method Summary collapse
-
#initialize ⇒ EbsBlockDeviceConfig
constructor
A new instance of EbsBlockDeviceConfig.
- #to_aws_ebs_block_device_config ⇒ Object
Constructor Details
#initialize ⇒ EbsBlockDeviceConfig
Returns a new instance of EbsBlockDeviceConfig.
107 108 109 110 111 112 |
# File 'lib/elasticity/instance_group.rb', line 107 def initialize @volume_type = "gp2" @iops = 1 @size_in_gb = 1 @volumes_per_instance = 1 end |
Instance Attribute Details
#iops ⇒ Object
Returns the value of attribute iops.
103 104 105 |
# File 'lib/elasticity/instance_group.rb', line 103 def iops @iops end |
#size_in_gb ⇒ Object
Returns the value of attribute size_in_gb.
104 105 106 |
# File 'lib/elasticity/instance_group.rb', line 104 def size_in_gb @size_in_gb end |
#volume_type ⇒ Object
Returns the value of attribute volume_type.
102 103 104 |
# File 'lib/elasticity/instance_group.rb', line 102 def volume_type @volume_type end |
#volumes_per_instance ⇒ Object
Returns the value of attribute volumes_per_instance.
105 106 107 |
# File 'lib/elasticity/instance_group.rb', line 105 def volumes_per_instance @volumes_per_instance end |
Instance Method Details
#to_aws_ebs_block_device_config ⇒ Object
114 115 116 117 118 119 120 121 122 123 124 |
# File 'lib/elasticity/instance_group.rb', line 114 def to_aws_ebs_block_device_config { :volume_specification => { :volume_type => @volume_type, :size_in_g_b => @size_in_gb, }.tap do |spec| spec.merge!(:iops => @iops) if @volume_type == "io1" end, :volumes_per_instance => @volumes_per_instance } end |