Class: Aws::Plugins::Protocols::EC2::Handler

Inherits:
Query::Handler show all
Defined in:
lib/aws-sdk-core/plugins/protocols/ec2.rb

Constant Summary

Constants inherited from Query::Handler

Query::Handler::CONTENT_TYPE, Query::Handler::METADATA_REF

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Handler

#handler

Instance Method Summary collapse

Methods inherited from Query::Handler

#call

Methods inherited from Seahorse::Client::Handler

#call, #initialize, #inspect

Constructor Details

This class inherits a constructor from Seahorse::Client::Handler

Instance Method Details

#apply_params(param_list, params, rules) ⇒ Object


12
13
14
# File 'lib/aws-sdk-core/plugins/protocols/ec2.rb', line 12

def apply_params(param_list, params, rules)
  Aws::Query::EC2ParamBuilder.new(param_list).apply(rules, params)
end

#parse_xml(context) ⇒ Object


16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/aws-sdk-core/plugins/protocols/ec2.rb', line 16

def parse_xml(context)
  if rules = context.operation.output
    parser = Xml::Parser.new(rules)
    data = parser.parse(xml(context)) do |path, value|
      if path.size == 2 && path.last == 'requestId'
        context.[:request_id] = value
      end
    end
    data
  else
    EmptyStructure.new
  end
end