Class: AWS::Volume
Class Method Summary collapse
Instance Method Summary collapse
- #aws_attached_at ⇒ Object
- #aws_attachment_status ⇒ Object
- #aws_created_at ⇒ Object
- #aws_device ⇒ Object
- #aws_id ⇒ Object (also: #id)
- #aws_instance_id ⇒ Object
- #aws_size ⇒ Object
- #aws_status ⇒ Object
-
#initialize(attributes) ⇒ Volume
constructor
A new instance of Volume.
-
#instance ⇒ Object
TODO test.
- #snapshot_id ⇒ Object
- #snapshots ⇒ Object
- #zone ⇒ Object
Methods included from AWS
Constructor Details
#initialize(attributes) ⇒ Volume
Returns a new instance of Volume.
182 183 184 |
# File 'lib/aws_cloud_map.rb', line 182 def initialize(attributes) @attributes = attributes end |
Class Method Details
.all ⇒ Object
239 240 241 |
# File 'lib/aws_cloud_map.rb', line 239 def self.all @@ec2.describe_volumes.map { |volume| new(volume) } end |
.find(volume_id) ⇒ Object
243 244 245 |
# File 'lib/aws_cloud_map.rb', line 243 def self.find(volume_id) new(@@ec2.describe_volumes([volume_id]).first) end |
Instance Method Details
#aws_attached_at ⇒ Object
222 223 224 |
# File 'lib/aws_cloud_map.rb', line 222 def aws_attached_at @attributes[:aws_attached_at] end |
#aws_attachment_status ⇒ Object
214 215 216 |
# File 'lib/aws_cloud_map.rb', line 214 def @attributes[:aws_attachment_status] end |
#aws_created_at ⇒ Object
186 187 188 |
# File 'lib/aws_cloud_map.rb', line 186 def aws_created_at @attributes[:aws_created_at] end |
#aws_device ⇒ Object
194 195 196 |
# File 'lib/aws_cloud_map.rb', line 194 def aws_device @attributes[:aws_device] end |
#aws_id ⇒ Object Also known as: id
218 219 220 |
# File 'lib/aws_cloud_map.rb', line 218 def aws_id @attributes[:aws_id] end |
#aws_instance_id ⇒ Object
202 203 204 |
# File 'lib/aws_cloud_map.rb', line 202 def aws_instance_id @attributes[:aws_instance_id] end |
#aws_size ⇒ Object
190 191 192 |
# File 'lib/aws_cloud_map.rb', line 190 def aws_size @attributes[:aws_size] end |
#aws_status ⇒ Object
198 199 200 |
# File 'lib/aws_cloud_map.rb', line 198 def aws_status @attributes[:aws_status] end |
#instance ⇒ Object
TODO test
229 230 231 232 |
# File 'lib/aws_cloud_map.rb', line 229 def instance return nil if aws_instance_id.nil? @instance ||= Instance.find(aws_instance_id) end |
#snapshot_id ⇒ Object
210 211 212 |
# File 'lib/aws_cloud_map.rb', line 210 def snapshot_id @attributes[:snapshot_id] end |
#snapshots ⇒ Object
234 235 236 237 |
# File 'lib/aws_cloud_map.rb', line 234 def snapshots #TODO [] end |
#zone ⇒ Object
206 207 208 |
# File 'lib/aws_cloud_map.rb', line 206 def zone @attributes[:zone] end |