Sha256: fe3b962aef6161afcbc598f9f2c4536dbf2fe370dfcc1b3baa1aeafd28e3d13d

Contents?: true

Size: 879 Bytes

Versions: 163

Compression:

Stored size: 879 Bytes

Contents

require_relative '../../query'

module Aws
  module Plugins
    module Protocols
      class EC2 < Seahorse::Client::Plugin

        class Handler < Aws::Query::Handler

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

          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.metadata[:request_id] = value
                end
              end
              data
            else
              EmptyStructure.new
            end
          end

        end

        handler(Handler)
        handler(Xml::ErrorHandler, step: :sign)

      end
    end
  end
end

Version data entries

163 entries across 163 versions & 1 rubygems

Version Path
aws-sdk-core-3.2.1 lib/aws-sdk-core/plugins/protocols/ec2.rb
aws-sdk-core-3.2.0 lib/aws-sdk-core/plugins/protocols/ec2.rb
aws-sdk-core-3.1.0 lib/aws-sdk-core/plugins/protocols/ec2.rb
aws-sdk-core-3.0.0 lib/aws-sdk-core/plugins/protocols/ec2.rb
aws-sdk-core-3.0.0.rc20 lib/aws-sdk-core/plugins/protocols/ec2.rb
aws-sdk-core-3.0.0.rc19 lib/aws-sdk-core/plugins/protocols/ec2.rb
aws-sdk-core-3.0.0.rc18 lib/aws-sdk-core/plugins/protocols/ec2.rb
aws-sdk-core-3.0.0.rc17 lib/aws-sdk-core/plugins/protocols/ec2.rb
aws-sdk-core-3.0.0.rc16 lib/aws-sdk-core/plugins/protocols/ec2.rb
aws-sdk-core-3.0.0.rc15 lib/aws-sdk-core/plugins/protocols/ec2.rb
aws-sdk-core-3.0.0.rc14 lib/aws-sdk-core/plugins/protocols/ec2.rb
aws-sdk-core-3.0.0.rc13 lib/aws-sdk-core/plugins/protocols/ec2.rb
aws-sdk-core-3.0.0.rc12 lib/aws-sdk-core/plugins/protocols/ec2.rb
aws-sdk-core-3.0.0.rc11 lib/aws-sdk-core/plugins/protocols/ec2.rb
aws-sdk-core-3.0.0.rc10 lib/aws-sdk-core/plugins/protocols/ec2.rb
aws-sdk-core-3.0.0.rc9 lib/aws-sdk-core/plugins/protocols/ec2.rb
aws-sdk-core-3.0.0.rc8 lib/aws-sdk-core/plugins/protocols/ec2.rb
aws-sdk-core-3.0.0.rc7 lib/aws-sdk-core/plugins/protocols/ec2.rb
aws-sdk-core-3.0.0.rc6 lib/aws-sdk-core/plugins/protocols/ec2.rb
aws-sdk-core-3.0.0.rc5 lib/aws-sdk-core/plugins/protocols/ec2.rb