aws-sdk-core 3.197.1 → 3.199.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +27 -0
  3. data/VERSION +1 -1
  4. data/lib/aws-sdk-core/binary/decode_handler.rb +3 -4
  5. data/lib/aws-sdk-core/binary/encode_handler.rb +1 -1
  6. data/lib/aws-sdk-core/binary/event_stream_decoder.rb +1 -0
  7. data/lib/aws-sdk-core/binary/event_stream_encoder.rb +4 -3
  8. data/lib/aws-sdk-core/cbor/cbor_engine.rb +19 -0
  9. data/lib/aws-sdk-core/cbor/decoder.rb +310 -0
  10. data/lib/aws-sdk-core/cbor/encoder.rb +243 -0
  11. data/lib/aws-sdk-core/cbor.rb +106 -0
  12. data/lib/aws-sdk-core/client_stubs.rb +3 -2
  13. data/lib/aws-sdk-core/endpoints/matchers.rb +5 -1
  14. data/lib/aws-sdk-core/error_handler.rb +41 -0
  15. data/lib/aws-sdk-core/json/error_handler.rb +6 -8
  16. data/lib/aws-sdk-core/json/handler.rb +5 -6
  17. data/lib/aws-sdk-core/json/json_engine.rb +3 -1
  18. data/lib/aws-sdk-core/json/oj_engine.rb +7 -1
  19. data/lib/aws-sdk-core/json/parser.rb +2 -0
  20. data/lib/aws-sdk-core/json.rb +43 -14
  21. data/lib/aws-sdk-core/plugins/global_configuration.rb +8 -9
  22. data/lib/aws-sdk-core/plugins/protocols/api_gateway.rb +3 -1
  23. data/lib/aws-sdk-core/plugins/protocols/ec2.rb +2 -24
  24. data/lib/aws-sdk-core/plugins/protocols/json_rpc.rb +6 -8
  25. data/lib/aws-sdk-core/plugins/protocols/query.rb +4 -2
  26. data/lib/aws-sdk-core/plugins/protocols/rest_json.rb +4 -3
  27. data/lib/aws-sdk-core/plugins/protocols/rest_xml.rb +5 -1
  28. data/lib/aws-sdk-core/plugins/protocols/rpc_v2.rb +17 -0
  29. data/lib/aws-sdk-core/plugins/retry_errors.rb +0 -1
  30. data/lib/aws-sdk-core/query/ec2_handler.rb +27 -0
  31. data/lib/aws-sdk-core/query/handler.rb +4 -4
  32. data/lib/aws-sdk-core/query.rb +2 -1
  33. data/lib/aws-sdk-core/rest/{request/content_type.rb → content_type_handler.rb} +1 -1
  34. data/lib/aws-sdk-core/rest/handler.rb +3 -4
  35. data/lib/aws-sdk-core/rest/request/endpoint.rb +3 -1
  36. data/lib/aws-sdk-core/rest.rb +1 -1
  37. data/lib/aws-sdk-core/rpc_v2/builder.rb +62 -0
  38. data/lib/aws-sdk-core/rpc_v2/content_type_handler.rb +45 -0
  39. data/lib/aws-sdk-core/rpc_v2/error_handler.rb +84 -0
  40. data/lib/aws-sdk-core/rpc_v2/handler.rb +74 -0
  41. data/lib/aws-sdk-core/rpc_v2/parser.rb +90 -0
  42. data/lib/aws-sdk-core/rpc_v2.rb +6 -0
  43. data/lib/aws-sdk-core/stubbing/protocols/rpc_v2.rb +41 -0
  44. data/lib/aws-sdk-core/xml/error_handler.rb +11 -37
  45. data/lib/aws-sdk-core/xml/parser.rb +2 -6
  46. data/lib/aws-sdk-core.rb +6 -2
  47. data/lib/aws-sdk-sso/client.rb +6 -3
  48. data/lib/aws-sdk-sso.rb +1 -1
  49. data/lib/aws-sdk-ssooidc/client.rb +6 -3
  50. data/lib/aws-sdk-ssooidc.rb +1 -1
  51. data/lib/aws-sdk-sts/client.rb +6 -3
  52. data/lib/aws-sdk-sts.rb +1 -1
  53. data/lib/seahorse/client/base.rb +17 -7
  54. data/lib/seahorse/client/handler.rb +1 -1
  55. data/lib/seahorse/client/plugins/endpoint.rb +0 -1
  56. metadata +22 -8
  57. /data/lib/aws-sdk-core/xml/parser/{engines/libxml.rb → libxml_engine.rb} +0 -0
  58. /data/lib/aws-sdk-core/xml/parser/{engines/nokogiri.rb → nokogiri_engine.rb} +0 -0
  59. /data/lib/aws-sdk-core/xml/parser/{engines/oga.rb → oga_engine.rb} +0 -0
  60. /data/lib/aws-sdk-core/xml/parser/{engines/ox.rb → ox_engine.rb} +0 -0
  61. /data/lib/aws-sdk-core/xml/parser/{engines/rexml.rb → rexml_engine.rb} +0 -0
@@ -7,10 +7,9 @@ module Aws
7
7
 
8
8
  def call(context)
9
9
  Rest::Request::Builder.new.apply(context)
10
- resp = @handler.call(context)
11
- resp.on(200..299) { |response| Response::Parser.new.apply(response) }
12
- resp.on(200..599) { |response| apply_request_id(context) }
13
- resp
10
+ response = @handler.call(context)
11
+ response.on(200..299) { |resp| Response::Parser.new.apply(resp) }
12
+ response.on(200..599) { |_resp| apply_request_id(context) }
14
13
  end
15
14
 
16
15
  private
@@ -30,7 +30,9 @@ module Aws
30
30
  private
31
31
 
32
32
  def apply_path_params(uri, params)
33
- path = uri.path.sub(%r{/$}, '') + @path_pattern.split('?')[0]
33
+ path = uri.path.sub(%r{/$}, '')
34
+ # handle trailing slash
35
+ path += @path_pattern.split('?')[0] if path.empty? || @path_pattern != '/'
34
36
  uri.path = path.gsub(/{.+?}/) do |placeholder|
35
37
  param_value_for_placeholder(placeholder, params)
36
38
  end
@@ -1,12 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative 'rest/handler'
4
+ require_relative 'rest/content_type_handler'
4
5
  require_relative 'rest/request/body'
5
6
  require_relative 'rest/request/builder'
6
7
  require_relative 'rest/request/endpoint'
7
8
  require_relative 'rest/request/headers'
8
9
  require_relative 'rest/request/querystring_builder'
9
- require_relative 'rest/request/content_type'
10
10
  require_relative 'rest/response/body'
11
11
  require_relative 'rest/response/headers'
12
12
  require_relative 'rest/response/parser'
@@ -0,0 +1,62 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'base64'
4
+
5
+ module Aws
6
+ module RpcV2
7
+ class Builder
8
+ include Seahorse::Model::Shapes
9
+
10
+ def initialize(rules, _options = {})
11
+ @rules = rules
12
+ end
13
+
14
+ def serialize(params)
15
+ # If the input shape is empty, do not set a body. This is
16
+ # different than if the input shape is a structure with no members.
17
+ return nil if @rules.shape.struct_class == EmptyStructure
18
+
19
+ Cbor.encode(format(@rules, params))
20
+ end
21
+
22
+ private
23
+
24
+ def structure(ref, values)
25
+ shape = ref.shape
26
+ values.each_pair.with_object({}) do |(key, value), data|
27
+ if shape.member?(key) && !value.nil?
28
+ member_ref = shape.member(key)
29
+ member_name = member_ref.location_name || key
30
+ data[member_name] = format(member_ref, value)
31
+ end
32
+ end
33
+ end
34
+
35
+ def list(ref, values)
36
+ member_ref = ref.shape.member
37
+ values.collect { |value| format(member_ref, value) }
38
+ end
39
+
40
+ def map(ref, values)
41
+ value_ref = ref.shape.value
42
+ values.each.with_object({}) do |(key, value), data|
43
+ data[key] = format(value_ref, value)
44
+ end
45
+ end
46
+
47
+ def blob(value)
48
+ (String === value ? value : value.read).force_encoding(Encoding::BINARY)
49
+ end
50
+
51
+ def format(ref, value)
52
+ case ref.shape
53
+ when StructureShape then structure(ref, value)
54
+ when ListShape then list(ref, value)
55
+ when MapShape then map(ref, value)
56
+ when BlobShape then blob(value)
57
+ else value
58
+ end
59
+ end
60
+ end
61
+ end
62
+ end
@@ -0,0 +1,45 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Aws
4
+ module RpcV2
5
+ class ContentTypeHandler < Seahorse::Client::Handler
6
+ def call(context)
7
+ content_type =
8
+ if eventstream_input?(context)
9
+ 'application/vnd.amazon.eventstream'
10
+ elsif !empty_input_structure?(context)
11
+ 'application/cbor'
12
+ end
13
+ accept =
14
+ if eventstream_output?(context)
15
+ 'application/vnd.amazon.eventstream'
16
+ end
17
+
18
+ headers = context.http_request.headers
19
+ headers['Content-Type'] ||= content_type if content_type
20
+ headers['Accept'] ||= accept if accept
21
+ @handler.call(context)
22
+ end
23
+
24
+ private
25
+
26
+ def eventstream_input?(context)
27
+ context.operation.input.shape.members.each do |_, ref|
28
+ return true if ref.eventstream
29
+ end
30
+ false
31
+ end
32
+
33
+ def eventstream_output?(context)
34
+ context.operation.output.shape.members.each do |_, ref|
35
+ return true if ref.eventstream
36
+ end
37
+ false
38
+ end
39
+
40
+ def empty_input_structure?(context)
41
+ context.operation.input.shape.struct_class == EmptyStructure
42
+ end
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,84 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Aws
4
+ module RpcV2
5
+ class ErrorHandler < Aws::ErrorHandler
6
+
7
+ def call(context)
8
+ # Malformed responses should throw an http based error, so we check
9
+ # 200 range for error handling only for this case.
10
+ @handler.call(context).on(200..599) do |response|
11
+ if !valid_response?(context)
12
+ code, message, data = http_status_error(context)
13
+ response.error = build_error(context, code, message, data)
14
+ elsif (300..599).cover?(context.http_response.status_code)
15
+ response.error = error(context)
16
+ end
17
+ response.data = nil
18
+ end
19
+ end
20
+
21
+ private
22
+
23
+ def valid_response?(context)
24
+ req_header = context.http_request.headers['smithy-protocol']
25
+ resp_header = context.http_response.headers['smithy-protocol']
26
+ req_header == resp_header
27
+ end
28
+
29
+ def extract_error(body, context)
30
+ data = Cbor.decode(body)
31
+ code = error_code(data, context)
32
+ message = data['message']
33
+ data = parse_error_data(context, body, code)
34
+ [code, message, data]
35
+ rescue Cbor::Error
36
+ [http_status_error_code(context), '', EmptyStructure.new]
37
+ end
38
+
39
+ def error_code(data, context)
40
+ code =
41
+ if aws_query_error?(context)
42
+ error = context.http_response.headers['x-amzn-query-error'].split(';')[0]
43
+ remove_prefix(error, context)
44
+ else
45
+ data['__type']
46
+ end
47
+ if code
48
+ code.split('#').last
49
+ else
50
+ http_status_error_code(context)
51
+ end
52
+ end
53
+
54
+ def parse_error_data(context, body, code)
55
+ data = EmptyStructure.new
56
+ if (error_rules = context.operation.errors)
57
+ error_rules.each do |rule|
58
+ # match modeled shape name with the type(code) only
59
+ # some type(code) might contains invalid characters
60
+ # such as ':' (efs) etc
61
+ match = rule.shape.name == code.gsub(/[^^a-zA-Z0-9]/, '')
62
+ next unless match && rule.shape.members.any?
63
+
64
+ data = Parser.new(rule).parse(body)
65
+ end
66
+ end
67
+ data
68
+ end
69
+
70
+ def aws_query_error?(context)
71
+ context.config.api.metadata['awsQueryCompatible'] &&
72
+ context.http_response.headers['x-amzn-query-error']
73
+ end
74
+
75
+ def remove_prefix(error_code, context)
76
+ if (prefix = context.config.api.metadata['errorPrefix'])
77
+ error_code.sub(/^#{prefix}/, '')
78
+ else
79
+ error_code
80
+ end
81
+ end
82
+ end
83
+ end
84
+ end
@@ -0,0 +1,74 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Aws
4
+ module RpcV2
5
+ class Handler < Seahorse::Client::Handler
6
+ # @param [Seahorse::Client::RequestContext] context
7
+ # @return [Seahorse::Client::Response]
8
+ def call(context)
9
+ build_request(context)
10
+ response = @handler.call(context)
11
+ response.on(200..299) { |resp| resp.data = parse_body(context) }
12
+ response.on(200..599) { |_resp| apply_request_id(context) }
13
+ response
14
+ end
15
+
16
+ private
17
+
18
+ def build_request(context)
19
+ context.http_request.headers['smithy-protocol'] = 'rpc-v2-cbor'
20
+ context.http_request.http_method = 'POST'
21
+ context.http_request.body = build_body(context)
22
+ build_url(context)
23
+ end
24
+
25
+ def build_url(context)
26
+ base = context.http_request.endpoint
27
+ service_name = context.config.api.metadata['targetPrefix']
28
+ base.path += "/service/#{service_name}/operation/#{context.operation.name}"
29
+ end
30
+
31
+ def build_body(context)
32
+ Builder.new(context.operation.input).serialize(context.params)
33
+ end
34
+
35
+ def parse_body(context)
36
+ cbor = context.http_response.body_contents
37
+ if (rules = context.operation.output)
38
+ if cbor.is_a?(Array)
39
+ # an array of emitted events
40
+ if cbor[0].respond_to?(:response)
41
+ # initial response exists
42
+ # it must be the first event arrived
43
+ resp_struct = cbor.shift.response
44
+ else
45
+ resp_struct = context.operation.output.shape.struct_class.new
46
+ end
47
+
48
+ rules.shape.members.each do |name, ref|
49
+ if ref.eventstream
50
+ resp_struct.send("#{name}=", cbor.to_enum)
51
+ end
52
+ end
53
+ resp_struct
54
+ else
55
+ Parser.new(
56
+ rules,
57
+ query_compatible: query_compatible?(context)
58
+ ).parse(cbor)
59
+ end
60
+ else
61
+ EmptyStructure.new
62
+ end
63
+ end
64
+
65
+ def apply_request_id(context)
66
+ context[:request_id] = context.http_response.headers['x-amzn-requestid']
67
+ end
68
+
69
+ def query_compatible?(context)
70
+ context.config.api.metadata.key?('awsQueryCompatible')
71
+ end
72
+ end
73
+ end
74
+ end
@@ -0,0 +1,90 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'time'
4
+
5
+ module Aws
6
+ module RpcV2
7
+ class Parser
8
+ include Seahorse::Model::Shapes
9
+
10
+ # @param [Seahorse::Model::ShapeRef] rules
11
+ def initialize(rules, query_compatible: false)
12
+ @rules = rules
13
+ @query_compatible = query_compatible
14
+ end
15
+
16
+ def parse(cbor, target = nil)
17
+ return {} if cbor.empty?
18
+
19
+ parse_ref(@rules, Cbor.decode(cbor), target)
20
+ end
21
+
22
+ private
23
+
24
+ def structure(ref, values, target = nil)
25
+ shape = ref.shape
26
+ target = ref.shape.struct_class.new if target.nil?
27
+ values.each do |key, value|
28
+ member_name, member_ref = shape.member_by_location_name(key)
29
+ if member_ref
30
+ target[member_name] = parse_ref(member_ref, value)
31
+ elsif shape.union && key != '__type'
32
+ target[:unknown] = { 'name' => key, 'value' => value }
33
+ end
34
+ end
35
+ # In services that were previously Query/XML, members that were
36
+ # "flattened" defaulted to empty lists. In JSON, these values are nil,
37
+ # which is backwards incompatible. To preserve backwards compatibility,
38
+ # we set a default value of [] for these members.
39
+ if @query_compatible
40
+ ref.shape.members.each do |member_name, member_target|
41
+ next unless target[member_name].nil?
42
+
43
+ if flattened_list?(member_target.shape)
44
+ target[member_name] = []
45
+ elsif flattened_map?(member_target.shape)
46
+ target[member_name] = {}
47
+ end
48
+ end
49
+ end
50
+
51
+ if shape.union
52
+ # convert to subclass
53
+ member_subclass = shape.member_subclass(target.member).new
54
+ member_subclass[target.member] = target.value
55
+ target = member_subclass
56
+ end
57
+ target
58
+ end
59
+
60
+ def list(ref, values, target = nil)
61
+ target = [] if target.nil?
62
+ values.each do |value|
63
+ target << parse_ref(ref.shape.member, value)
64
+ end
65
+ target
66
+ end
67
+
68
+ def map(ref, values, target = nil)
69
+ target = {} if target.nil?
70
+ values.each do |key, value|
71
+ target[key] = parse_ref(ref.shape.value, value) unless value.nil?
72
+ end
73
+ target
74
+ end
75
+
76
+ def parse_ref(ref, value, target = nil)
77
+ if value.nil?
78
+ nil
79
+ else
80
+ case ref.shape
81
+ when StructureShape then structure(ref, value, target)
82
+ when ListShape then list(ref, value, target)
83
+ when MapShape then map(ref, value, target)
84
+ else value
85
+ end
86
+ end
87
+ end
88
+ end
89
+ end
90
+ end
@@ -0,0 +1,6 @@
1
+ require_relative 'cbor'
2
+ require_relative 'rpc_v2/handler'
3
+ require_relative 'rpc_v2/content_type_handler'
4
+ require_relative 'rpc_v2/error_handler'
5
+ require_relative 'rpc_v2/builder'
6
+ require_relative 'rpc_v2/parser'
@@ -0,0 +1,41 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Aws
4
+ module Stubbing
5
+ module Protocols
6
+ class RpcV2
7
+
8
+ def stub_data(api, operation, data)
9
+ resp = Seahorse::Client::Http::Response.new
10
+ resp.status_code = 200
11
+ resp.headers['Content-Type'] = content_type(api)
12
+ resp.headers['x-amzn-RequestId'] = 'stubbed-request-id'
13
+ resp.body = build_body(operation, data)
14
+ resp
15
+ end
16
+
17
+ def stub_error(error_code)
18
+ http_resp = Seahorse::Client::Http::Response.new
19
+ http_resp.status_code = 400
20
+ http_resp.body = <<-JSON.strip
21
+ {
22
+ "code": #{error_code.inspect},
23
+ "message": "stubbed-response-error-message"
24
+ }
25
+ JSON
26
+ http_resp
27
+ end
28
+
29
+ private
30
+
31
+ def content_type(api)
32
+ 'application/cbor'
33
+ end
34
+
35
+ def build_body(operation, data)
36
+ Aws::RpcV2::Builder.new(operation.output).serialize(data)
37
+ end
38
+ end
39
+ end
40
+ end
41
+ end
@@ -4,7 +4,7 @@ require 'cgi'
4
4
 
5
5
  module Aws
6
6
  module Xml
7
- class ErrorHandler < Seahorse::Client::Handler
7
+ class ErrorHandler < Aws::ErrorHandler
8
8
 
9
9
  def call(context)
10
10
  @handler.call(context).on(300..599) do |response|
@@ -15,32 +15,19 @@ module Aws
15
15
 
16
16
  private
17
17
 
18
- def error(context)
19
- body = context.http_response.body_contents
20
- if body.empty?
21
- code = http_status_error_code(context)
22
- message = ''
23
- data = EmptyStructure.new
24
- else
25
- code, message, data = extract_error(body, context)
26
- end
27
- context[:request_id] = request_id(body)
28
- errors_module = context.client.class.errors_module
29
- errors_module.error_class(code).new(context, message, data)
30
- end
31
-
32
18
  def extract_error(body, context)
19
+ context[:request_id] = request_id(body)
33
20
  code = error_code(body, context)
34
21
  [
35
22
  code,
36
23
  error_message(body),
37
- error_data(context, code)
24
+ error_data(context, body, code)
38
25
  ]
39
26
  end
40
27
 
41
- def error_data(context, code)
28
+ def error_data(context, body, code)
42
29
  data = EmptyStructure.new
43
- if error_rules = context.operation.errors
30
+ if (error_rules = context.operation.errors)
44
31
  error_rules.each do |rule|
45
32
  # query protocol may have custom error code
46
33
  # reference: https://smithy.io/2.0/aws/protocols/aws-query-protocol.html#error-code-resolution
@@ -48,7 +35,7 @@ module Aws
48
35
  match = (code == error_shape_code || code == rule.shape.name)
49
36
  next unless match && rule.shape.members.any?
50
37
 
51
- data = parse_error_data(rule, context.http_response.body_contents)
38
+ data = parse_error_data(rule, body)
52
39
  # supporting HTTP bindings
53
40
  apply_error_headers(rule, context, data)
54
41
  end
@@ -62,7 +49,7 @@ module Aws
62
49
  # errors may nested under <Errors><Error>structure_data</Error></Errors>
63
50
  # Or may be flat and under <Error>structure_data</Error>
64
51
  body = body.tr("\n", '')
65
- if matches = body.match(/<Error>(.+?)<\/Error>/)
52
+ if (matches = body.match(/<Error>(.+?)<\/Error>/))
66
53
  Parser.new(rule).parse("<#{rule.shape.name}>#{matches[1]}</#{rule.shape.name}>")
67
54
  else
68
55
  EmptyStructure.new
@@ -75,28 +62,15 @@ module Aws
75
62
  end
76
63
 
77
64
  def error_code(body, context)
78
- if matches = body.match(/<Code>(.+?)<\/Code>/)
65
+ if (matches = body.match(/<Code>(.+?)<\/Code>/))
79
66
  remove_prefix(unescape(matches[1]), context)
80
67
  else
81
68
  http_status_error_code(context)
82
69
  end
83
70
  end
84
71
 
85
- def http_status_error_code(context)
86
- status_code = context.http_response.status_code
87
- {
88
- 302 => 'MovedTemporarily',
89
- 304 => 'NotModified',
90
- 400 => 'BadRequest',
91
- 403 => 'Forbidden',
92
- 404 => 'NotFound',
93
- 412 => 'PreconditionFailed',
94
- 413 => 'RequestEntityTooLarge',
95
- }[status_code] || "Http#{status_code}Error"
96
- end
97
-
98
72
  def remove_prefix(error_code, context)
99
- if prefix = context.config.api.metadata['errorPrefix']
73
+ if (prefix = context.config.api.metadata['errorPrefix'])
100
74
  error_code.sub(/^#{prefix}/, '')
101
75
  else
102
76
  error_code
@@ -104,7 +78,7 @@ module Aws
104
78
  end
105
79
 
106
80
  def error_message(body)
107
- if matches = body.match(/<Message>(.+?)<\/Message>/m)
81
+ if (matches = body.match(/<Message>(.+?)<\/Message>/m))
108
82
  unescape(matches[1])
109
83
  else
110
84
  ''
@@ -112,7 +86,7 @@ module Aws
112
86
  end
113
87
 
114
88
  def request_id(body)
115
- if matches = body.match(/<RequestId>(.+?)<\/RequestId>/m)
89
+ if (matches = body.match(/<RequestId>(.+?)<\/RequestId>/m))
116
90
  matches[1]
117
91
  end
118
92
  end
@@ -5,7 +5,6 @@ module Aws
5
5
  module Xml
6
6
  # A SAX-style XML parser that uses a shape context to handle types.
7
7
  class Parser
8
-
9
8
  # @param [Seahorse::Model::ShapeRef] rules
10
9
  def initialize(rules, options = {})
11
10
  @rules = rules
@@ -47,8 +46,7 @@ module Aws
47
46
  # * :libxml
48
47
  # * :nokogiri
49
48
  # * :rexml
50
- #
51
- def engine= engine
49
+ def engine=(engine)
52
50
  @engine = Class === engine ? engine : load_engine(engine)
53
51
  end
54
52
 
@@ -60,7 +58,6 @@ module Aws
60
58
  # * {LibxmlEngine}
61
59
  # * {NokogiriEngine}
62
60
  # * {RexmlEngine}
63
- #
64
61
  def engine
65
62
  set_default_engine unless @engine
66
63
  @engine
@@ -80,7 +77,7 @@ module Aws
80
77
  private
81
78
 
82
79
  def load_engine(name)
83
- require "aws-sdk-core/xml/parser/engines/#{name}"
80
+ require "aws-sdk-core/xml/parser/#{name}_engine"
84
81
  const_name = name[0].upcase + name[1..-1] + 'Engine'
85
82
  const_get(const_name)
86
83
  end
@@ -94,7 +91,6 @@ module Aws
94
91
  end
95
92
 
96
93
  set_default_engine
97
-
98
94
  end
99
95
  end
100
96
  end
data/lib/aws-sdk-core.rb CHANGED
@@ -63,19 +63,23 @@ require_relative 'aws-sdk-core/stubbing/xml_error'
63
63
 
64
64
  # stubbing protocols
65
65
 
66
- require_relative 'aws-sdk-core/stubbing/protocols/ec2'
67
66
  require_relative 'aws-sdk-core/stubbing/protocols/json'
68
- require_relative 'aws-sdk-core/stubbing/protocols/query'
69
67
  require_relative 'aws-sdk-core/stubbing/protocols/rest'
70
68
  require_relative 'aws-sdk-core/stubbing/protocols/rest_json'
71
69
  require_relative 'aws-sdk-core/stubbing/protocols/rest_xml'
70
+ require_relative 'aws-sdk-core/stubbing/protocols/query'
71
+ require_relative 'aws-sdk-core/stubbing/protocols/ec2'
72
+ require_relative 'aws-sdk-core/stubbing/protocols/rpc_v2'
72
73
  require_relative 'aws-sdk-core/stubbing/protocols/api_gateway'
73
74
 
74
75
  # protocols
75
76
 
77
+ require_relative 'aws-sdk-core/error_handler'
76
78
  require_relative 'aws-sdk-core/rest'
77
79
  require_relative 'aws-sdk-core/xml'
78
80
  require_relative 'aws-sdk-core/json'
81
+ require_relative 'aws-sdk-core/query'
82
+ require_relative 'aws-sdk-core/rpc_v2'
79
83
 
80
84
  # event stream
81
85
 
@@ -89,6 +89,11 @@ module Aws::SSO
89
89
 
90
90
  # @overload initialize(options)
91
91
  # @param [Hash] options
92
+ #
93
+ # @option options [Array<Seahorse::Client::Plugin>] :plugins ([]])
94
+ # A list of plugins to apply to the client. Each plugin is either a
95
+ # class name or an instance of a plugin class.
96
+ #
92
97
  # @option options [required, Aws::CredentialProvider] :credentials
93
98
  # Your AWS credentials. This can be an instance of any one of the
94
99
  # following classes:
@@ -209,7 +214,6 @@ module Aws::SSO
209
214
  # 'https://example.com'
210
215
  # 'http://example.com:123'
211
216
  #
212
- #
213
217
  # @option options [Integer] :endpoint_cache_max_entries (1000)
214
218
  # Used for the maximum size limit of the LRU cache storing endpoints data
215
219
  # for endpoint discovery enabled operations. Defaults to 1000.
@@ -298,7 +302,6 @@ module Aws::SSO
298
302
  # throttling. This is a provisional mode that may change behavior
299
303
  # in the future.
300
304
  #
301
- #
302
305
  # @option options [String] :sdk_ua_app_id
303
306
  # A unique and opaque application ID that is appended to the
304
307
  # User-Agent header as app/sdk_ua_app_id. It should have a
@@ -630,7 +633,7 @@ module Aws::SSO
630
633
  params: params,
631
634
  config: config)
632
635
  context[:gem_name] = 'aws-sdk-core'
633
- context[:gem_version] = '3.197.1'
636
+ context[:gem_version] = '3.199.0'
634
637
  Seahorse::Client::Request.new(handlers, context)
635
638
  end
636
639
 
data/lib/aws-sdk-sso.rb CHANGED
@@ -54,6 +54,6 @@ require_relative 'aws-sdk-sso/customizations'
54
54
  # @!group service
55
55
  module Aws::SSO
56
56
 
57
- GEM_VERSION = '3.197.1'
57
+ GEM_VERSION = '3.199.0'
58
58
 
59
59
  end