Method: Fog::Compute::AWS::Real#modify_snapshot_attribute
- Defined in:
- lib/fog/aws/requests/compute/modify_snapshot_attribute.rb
#modify_snapshot_attribute(snapshot_id, attributes) ⇒ Object
Modify snapshot attributes
Parameters
-
snapshot_id<~String> - Id of snapshot to modify
-
attributes<~Hash>:
-
‘Add.Group’<~Array> - One or more groups to grant volume create permission to
-
‘Add.UserId’<~Array> - One or more account ids to grant volume create permission to
-
‘Remove.Group’<~Array> - One or more groups to revoke volume create permission from
-
‘Remove.UserId’<~Array> - One or more account ids to revoke volume create permission from
-
20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/fog/aws/requests/compute/modify_snapshot_attribute.rb', line 20 def modify_snapshot_attribute(snapshot_id, attributes) params = {} params.merge!(Fog::AWS.indexed_param('CreateVolumePermission.Add.%d.Group', attributes['Add.Group'] || [])) params.merge!(Fog::AWS.indexed_param('CreateVolumePermission.Add.%d.UserId', attributes['Add.UserId'] || [])) params.merge!(Fog::AWS.indexed_param('CreateVolumePermission.Remove.%d.Group', attributes['Remove.Group'] || [])) params.merge!(Fog::AWS.indexed_param('CreateVolumePermission.Remove.%d.UserId', attributes['Remove.UserId'] || [])) request({ 'Action' => 'ModifySnapshotAttribute', 'SnapshotId' => snapshot_id, :idempotent => true, :parser => Fog::Parsers::Compute::AWS::Basic.new }.merge!(params)) end |