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.10 lib/fog/aws/requests/ec2/modify_image_attributes.rb
fog-0.2.9 lib/fog/aws/requests/ec2/modify_image_attributes.rb
fog-0.2.8 lib/fog/aws/requests/ec2/modify_image_attributes.rb
fog-0.2.7 lib/fog/aws/requests/ec2/modify_image_attributes.rb
fog-0.2.6 lib/fog/aws/requests/ec2/modify_image_attributes.rb
fog-0.2.5 lib/fog/aws/requests/ec2/modify_image_attributes.rb
fog-0.2.4 lib/fog/aws/requests/ec2/modify_image_attributes.rb
fog-0.2.3 lib/fog/aws/requests/ec2/modify_image_attributes.rb
fog-0.2.2 lib/fog/aws/requests/ec2/modify_image_attributes.rb
fog-0.2.1 lib/fog/aws/requests/ec2/modify_image_attributes.rb
fog-0.2.0 lib/fog/aws/requests/ec2/modify_image_attributes.rb
fog-0.1.10 lib/fog/aws/requests/ec2/modify_image_attributes.rb
fog-0.1.9 lib/fog/aws/requests/ec2/modify_image_attributes.rb
fog-0.1.8 lib/fog/aws/requests/ec2/modify_image_attributes.rb
fog-0.1.7 lib/fog/aws/requests/ec2/modify_image_attributes.rb
fog-0.1.6 lib/fog/aws/requests/ec2/modify_image_attributes.rb
fog-0.1.5 lib/fog/aws/requests/ec2/modify_image_attributes.rb
fog-0.1.4 lib/fog/aws/requests/ec2/modify_image_attributes.rb