77: def describe_image_attribute( options = {} )
78:
79:
80: options = {:image_id => "",
81: :attribute => "launchPermission"
82: }.merge(options)
83:
84: raise ArgumentError, "No ':image_id' provided" if options[:image_id].nil? || options[:image_id].empty?
85: raise ArgumentError, "No ':attribute' provided" if options[:attribute].nil? || options[:attribute].empty?
86:
87: params = { "ImageId" => options[:image_id], "Attribute" => options[:attribute] }
88:
89:
90: case options[:attribute]
91: when "launchPermission", "productCodes"
92:
93: else
94: raise ArgumentError, "attribute : #{options[:attribute].to_s} is not an known attribute."
95: end
96:
97: return response_generator(:action => "DescribeImageAttribute", :params => params)
98:
99: end