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.
213 214 215 |
# File 'lib/aws_cloud_map.rb', line 213 def initialize(attributes) @attributes = attributes end |
Class Method Details
.all ⇒ Object
270 271 272 |
# File 'lib/aws_cloud_map.rb', line 270 def self.all @@ec2.describe_volumes.map { |volume| new(volume) } end |
.find(volume_id) ⇒ Object
274 275 276 |
# File 'lib/aws_cloud_map.rb', line 274 def self.find(volume_id) new(@@ec2.describe_volumes([volume_id]).first) end |
Instance Method Details
#aws_attached_at ⇒ Object
253 254 255 |
# File 'lib/aws_cloud_map.rb', line 253 def aws_attached_at @attributes[:aws_attached_at] end |
#aws_attachment_status ⇒ Object
245 246 247 |
# File 'lib/aws_cloud_map.rb', line 245 def @attributes[:aws_attachment_status] end |
#aws_created_at ⇒ Object
217 218 219 |
# File 'lib/aws_cloud_map.rb', line 217 def aws_created_at @attributes[:aws_created_at] end |
#aws_device ⇒ Object
225 226 227 |
# File 'lib/aws_cloud_map.rb', line 225 def aws_device @attributes[:aws_device] end |
#aws_id ⇒ Object Also known as: id
249 250 251 |
# File 'lib/aws_cloud_map.rb', line 249 def aws_id @attributes[:aws_id] end |
#aws_instance_id ⇒ Object
233 234 235 |
# File 'lib/aws_cloud_map.rb', line 233 def aws_instance_id @attributes[:aws_instance_id] end |
#aws_size ⇒ Object
221 222 223 |
# File 'lib/aws_cloud_map.rb', line 221 def aws_size @attributes[:aws_size] end |
#aws_status ⇒ Object
229 230 231 |
# File 'lib/aws_cloud_map.rb', line 229 def aws_status @attributes[:aws_status] end |
#instance ⇒ Object
TODO test
260 261 262 263 |
# File 'lib/aws_cloud_map.rb', line 260 def instance return nil if aws_instance_id.nil? @instance ||= Instance.find(aws_instance_id) end |
#snapshot_id ⇒ Object
241 242 243 |
# File 'lib/aws_cloud_map.rb', line 241 def snapshot_id @attributes[:snapshot_id] end |
#snapshots ⇒ Object
265 266 267 268 |
# File 'lib/aws_cloud_map.rb', line 265 def snapshots #TODO [] end |
#zone ⇒ Object
237 238 239 |
# File 'lib/aws_cloud_map.rb', line 237 def zone @attributes[:zone] end |