lib/ec2/right_ec2_ebs.rb
# Modify snapshot attribute.
#
#  Attribute can take only 'createVolumePermission' value.
#  Value is a Hash {:add_user_ids, :add_groups, :remove_user_ids, :remove_groups }.
#
Modify snapshot attribute.
Attribute can take only 'createVolumePermission' value.
Modify snapshot attribute . Attribute can take only ' createVolumePermission ' value .
def modify_snapshot_attribute(snapshot_id, attribute, value)
      params = { 'SnapshotId' => snapshot_id }
      case attribute.to_s
      when 'createVolumePermission'
        params.update(amazonize_list('CreateVolumePermission.Add.?.UserId',    value[:add_user_ids]))
        params.update(amazonize_list('CreateVolumePermission.Add.?.Group',     value[:add_groups]))
        params.update(amazonize_list('CreateVolumePermission.Remove.?.UserId', value[:remove_user_ids]))
        params.update(amazonize_list('CreateVolumePermission.Remove.?.Group',  value[:remove_groups]))
      end
      link = generate_request("ModifySnapshotAttribute", params)
      request_info(link, RightBoolResponseParser.new(:logger => @logger))
    rescue Exception
      on_exception
    end
def modify_snapshot_attribute ( snapshot_id , attribute , value ) params = { 'SnapshotId' => snapshot_id } case attribute . to_s when 'createVolumePermission' params . update ( amazonize_list ( 'CreateVolumePermission.Add.?.UserId' , value [ :add_user_ids ] ) ) params . update ( amazonize_list ( 'CreateVolumePermission.Add.?.Group' , value [ :add_groups ] ) ) params . update ( amazonize_list ( 'CreateVolumePermission.Remove.?.UserId' , value [ :remove_user_ids ] ) ) params . update ( amazonize_list ( 'CreateVolumePermission.Remove.?.Group' , value [ :remove_groups ] ) ) end link = generate_request ( "ModifySnapshotAttribute" , params ) request_info ( link , RightBoolResponseParser . new ( :logger => @logger ) ) rescue Exception on_exception end
Modify snapshot attribute.
Modify snapshot attribute .
snapshot_id
<not_specific>
attribute
<not_specific>
value
<not_specific>