mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[ec2] default to only listing your own snapshots
This commit is contained in:
parent
ad8952cc2c
commit
4d1a833ecf
1 changed files with 7 additions and 3 deletions
|
@ -7,6 +7,9 @@ module Fog
|
|||
#
|
||||
# ==== Parameters
|
||||
# * snapshot_id<~Array> - List of snapshots to describe, defaults to all
|
||||
# * options<~Array>:
|
||||
# * 'Owner'<~String> - Owner of snapshot in ['self', 'amazon', account_id]
|
||||
# * 'RestorableBy'<~String> - Account id of user who can create volumes from this snapshot
|
||||
#
|
||||
# ==== Returns
|
||||
# * response<~Excon::Response>:
|
||||
|
@ -18,12 +21,13 @@ module Fog
|
|||
# * '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 = AWS.indexed_param('SnapshotId', snapshot_id)
|
||||
def describe_snapshots(snapshot_id = [], options = {})
|
||||
options['Owner'] ||= 'self'
|
||||
options.merge!(AWS.indexed_param('SnapshotId', snapshot_id))
|
||||
request({
|
||||
'Action' => 'DescribeSnapshots',
|
||||
:parser => Fog::Parsers::AWS::EC2::DescribeSnapshots.new
|
||||
}.merge!(params))
|
||||
}.merge!(options))
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue