mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[ec2] - add modify_snapshot_attribute call
This commit is contained in:
parent
0270dcef0f
commit
60ebfd67f8
2 changed files with 40 additions and 1 deletions
|
@ -54,6 +54,7 @@ module Fog
|
|||
request 'disassociate_address'
|
||||
request 'get_console_output'
|
||||
request 'modify_image_attributes'
|
||||
request 'modify_snapshot_attribute'
|
||||
request 'reboot_instances'
|
||||
request 'release_address'
|
||||
request 'revoke_security_group_ingress'
|
||||
|
|
38
lib/fog/aws/requests/ec2/modify_snapshot_attribute.rb
Normal file
38
lib/fog/aws/requests/ec2/modify_snapshot_attribute.rb
Normal file
|
@ -0,0 +1,38 @@
|
|||
module Fog
|
||||
module AWS
|
||||
module EC2
|
||||
class Real
|
||||
|
||||
# Modify snapshot attributes
|
||||
#
|
||||
# ==== Parameters
|
||||
# * snapshot_id<~String> - Id of snapshot to modify
|
||||
# * attribute<~String> - Attribute to modify, in ['createVolumePermission']
|
||||
# * operation_type<~String> - Operation to perform on attribute, in ['add', 'remove']
|
||||
#
|
||||
def modify_snapshot_attribute(snapshot_id, attribute, operation_type, options = {})
|
||||
params = {}
|
||||
params.merge!(AWS.indexed_param('UserId', options['UserId']))
|
||||
params.merge!(AWS.indexed_param('UserGroup', options['UserGroup']))
|
||||
request({
|
||||
'Action' => 'ModifySnapshotAttribute',
|
||||
'Attribute' => attribute,
|
||||
'SnapshotId' => snapshot_id,
|
||||
'OperationType' => operation_type,
|
||||
:idempotent => true,
|
||||
:parser => Fog::Parsers::AWS::EC2::Basic.new
|
||||
}.merge!(params))
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
class Mock
|
||||
|
||||
def modify_snapshot_attribute(snapshot_id, attribute, operation_type, options = {})
|
||||
Fog::Mock.not_implemented
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue