Exception: NoSuchVolumeException

Inherits:
Exception
  • Object
show all
Defined in:
lib/ec2_volume_snapshoter.rb

Overview

This class is responsible of the snapshoting of given disks to EC2 EC2 related permissions in IAM Sid“: ”Stmt1344254048404“,

"Action": [
  "ec2:CreateSnapshot",
  "ec2:DeleteSnapshot",
  "ec2:DescribeSnapshots",
  "ec2:CreateTags",
  "ec2:DescribeTags",
  "ec2:DescribeVolumes"
],
"Effect": "Allow",
"Resource": [
  "*"
]

Instance Method Summary collapse

Constructor Details

#initialize(instance, volume, details) ⇒ NoSuchVolumeException

Returns a new instance of NoSuchVolumeException.



22
23
24
# File 'lib/ec2_volume_snapshoter.rb', line 22

def initialize(instance, volume, details)
  @instance, @volume, @details = instance, volume, details
end

Instance Method Details

#to_sObject



25
26
27
# File 'lib/ec2_volume_snapshoter.rb', line 25

def to_s
  "Unable to locate volume \"#{@volume}\" on #{@instance}\nKnow volumes for this instance are:\n#{@details.inspect}"
end