fog--fog/lib/fog/aws/requests/ec2/describe_snapshots.rb

30 lines
1015 B
Ruby
Raw Normal View History

module Fog
module AWS
class EC2
# Describe all or specified snapshots
#
# ==== Parameters
# * snapshot_id<~Array> - List of snapshots to describe, defaults to all
#
# ==== Returns
2009-07-19 21:14:08 +00:00
# * response<~Fog::AWS::Response>:
# * body<~Hash>:
2009-08-01 08:15:44 +00:00
# * 'requestId'<~String> - Id of request
# * 'snapshotSet'<~Array>:
# * 'progress'<~String>: The percentage progress of the snapshot
# * 'snapshotId'<~String>: Id of the snapshot
# * 'startTime'<~Time>: Timestamp of when snapshot was initiated
# * 'status'<~String>: Snapshot state, in ['pending', 'completed']
# * 'volumeId'<~String>: Id of volume that snapshot contains
def describe_snapshots(snapshot_id = [])
params = indexed_params('SnapshotId', snapshot_id)
request({
'Action' => 'DescribeSnapshots'
}.merge!(params), Fog::Parsers::AWS::EC2::DescribeSnapshots.new)
end
end
end
end