Sha256: e57ece0b929aece98ac1369b3804128240b6ffdc45617afacf6b6fb03fe583b3

Contents?: true

Size: 1.24 KB

Versions: 38

Compression:

Stored size: 1.24 KB

Contents

module Fog
  module AWS
    module EC2
      class Real

        # Modify image attributes
        #
        # ==== Parameters
        # * image_id<~String> - Id of machine image to modify
        # * attribute<~String> - Attribute to modify, in ['launchPermission', 'productCodes']
        # * operation_type<~String> - Operation to perform on attribute, in ['add', 'remove']
        #
        def modify_image_attributes(image_id, attribute, operation_type, options = {})
          params = {}
          params.merge!(AWS.indexed_param('UserId', options['UserId']))
          params.merge!(AWS.indexed_param('UserGroup', options['UserGroup']))
          params.merge!(AWS.indexed_param('ProductCode', options['ProductCode']))
          request({
            'Action'        => 'ModifyImageAttribute',
            'Attribute'     => attribute,
            'ImageId'       => image_id,
            'OperationType' => operation_type,
            :idempotent     => true,
            :parser         => Fog::Parsers::AWS::EC2::Basic.new
          }.merge!(params))
        end

      end

      class Mock

        def modify_image_attributes(image_id, attribute, operation_type, options = {})
          Fog::Mock.not_implemented
        end

      end
    end
  end
end

Version data entries

38 entries across 38 versions & 2 rubygems

Version Path
fog-0.2.30 lib/fog/aws/requests/ec2/modify_image_attributes.rb
fog-0.2.28 lib/fog/aws/requests/ec2/modify_image_attributes.rb
fog-0.2.27 lib/fog/aws/requests/ec2/modify_image_attributes.rb
fog-0.2.26 lib/fog/aws/requests/ec2/modify_image_attributes.rb
fog-0.2.25 lib/fog/aws/requests/ec2/modify_image_attributes.rb
fog-0.2.24 lib/fog/aws/requests/ec2/modify_image_attributes.rb
tecnh-fog-0.2.23.vpc lib/fog/aws/requests/ec2/modify_image_attributes.rb
fog-0.2.23 lib/fog/aws/requests/ec2/modify_image_attributes.rb
fog-0.2.22 lib/fog/aws/requests/ec2/modify_image_attributes.rb
fog-0.2.21 lib/fog/aws/requests/ec2/modify_image_attributes.rb
fog-0.2.20 lib/fog/aws/requests/ec2/modify_image_attributes.rb
fog-0.2.19 lib/fog/aws/requests/ec2/modify_image_attributes.rb
fog-0.2.18 lib/fog/aws/requests/ec2/modify_image_attributes.rb
fog-0.2.17 lib/fog/aws/requests/ec2/modify_image_attributes.rb
fog-0.2.16 lib/fog/aws/requests/ec2/modify_image_attributes.rb
fog-0.2.15 lib/fog/aws/requests/ec2/modify_image_attributes.rb
fog-0.2.14 lib/fog/aws/requests/ec2/modify_image_attributes.rb
fog-0.2.13 lib/fog/aws/requests/ec2/modify_image_attributes.rb
fog-0.2.12 lib/fog/aws/requests/ec2/modify_image_attributes.rb
fog-0.2.11 lib/fog/aws/requests/ec2/modify_image_attributes.rb