Sha256: 9cfb97931c7a2814bd0e9665f8842b669211214606dc5e8dcabc865c1f8419e8
Contents?: true
Size: 1.13 KB
Versions: 6
Compression:
Stored size: 1.13 KB
Contents
module Fog module AWS class Compute class Real require 'fog/compute/parsers/aws/basic' # 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::Compute::Basic.new }.merge!(params)) end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems