Sha256: 2f607c4844d370a31252a00a7a61714c62cd135015144a7b9b57acc6b66b2797

Contents?: true

Size: 1.17 KB

Versions: 9

Compression:

Stored size: 1.17 KB

Contents

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'], 1))
          params.merge!(AWS.indexed_param('UserGroup', options['UserGroup'], 1))
          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

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
fog-0.2.30 lib/fog/aws/requests/ec2/modify_snapshot_attribute.rb
fog-0.2.28 lib/fog/aws/requests/ec2/modify_snapshot_attribute.rb
fog-0.2.27 lib/fog/aws/requests/ec2/modify_snapshot_attribute.rb
fog-0.2.26 lib/fog/aws/requests/ec2/modify_snapshot_attribute.rb
fog-0.2.25 lib/fog/aws/requests/ec2/modify_snapshot_attribute.rb
fog-0.2.24 lib/fog/aws/requests/ec2/modify_snapshot_attribute.rb
tecnh-fog-0.2.23.vpc lib/fog/aws/requests/ec2/modify_snapshot_attribute.rb
fog-0.2.23 lib/fog/aws/requests/ec2/modify_snapshot_attribute.rb
fog-0.2.22 lib/fog/aws/requests/ec2/modify_snapshot_attribute.rb