aws-sdk-core 3.197.2 → 3.225.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +355 -0
- data/VERSION +1 -1
- data/lib/aws-defaults/default_configuration.rb +1 -2
- data/lib/aws-defaults.rb +4 -1
- data/lib/aws-sdk-core/arn.rb +1 -3
- data/lib/aws-sdk-core/assume_role_credentials.rb +13 -5
- data/lib/aws-sdk-core/assume_role_web_identity_credentials.rb +14 -7
- data/lib/aws-sdk-core/binary/decode_handler.rb +3 -4
- data/lib/aws-sdk-core/binary/encode_handler.rb +1 -1
- data/lib/aws-sdk-core/binary/event_stream_decoder.rb +1 -0
- data/lib/aws-sdk-core/binary/event_stream_encoder.rb +4 -3
- data/lib/aws-sdk-core/cbor/decoder.rb +308 -0
- data/lib/aws-sdk-core/cbor/encoder.rb +243 -0
- data/lib/aws-sdk-core/cbor.rb +53 -0
- data/lib/aws-sdk-core/client_side_monitoring.rb +9 -0
- data/lib/aws-sdk-core/client_stubs.rb +30 -55
- data/lib/aws-sdk-core/credential_provider.rb +4 -0
- data/lib/aws-sdk-core/credential_provider_chain.rb +37 -10
- data/lib/aws-sdk-core/credentials.rb +19 -6
- data/lib/aws-sdk-core/ecs_credentials.rb +1 -0
- data/lib/aws-sdk-core/endpoints/endpoint.rb +3 -1
- data/lib/aws-sdk-core/endpoints/matchers.rb +1 -8
- data/lib/aws-sdk-core/endpoints.rb +74 -18
- data/lib/aws-sdk-core/error_handler.rb +41 -0
- data/lib/aws-sdk-core/errors.rb +11 -2
- data/lib/aws-sdk-core/instance_profile_credentials.rb +1 -0
- data/lib/aws-sdk-core/json/error_handler.rb +8 -9
- data/lib/aws-sdk-core/json/handler.rb +6 -6
- data/lib/aws-sdk-core/json/json_engine.rb +3 -1
- data/lib/aws-sdk-core/json/oj_engine.rb +7 -1
- data/lib/aws-sdk-core/json/parser.rb +2 -0
- data/lib/aws-sdk-core/json.rb +43 -14
- data/lib/aws-sdk-core/log/param_filter.rb +2 -2
- data/lib/aws-sdk-core/log/param_formatter.rb +7 -3
- data/lib/aws-sdk-core/log.rb +10 -0
- data/lib/aws-sdk-core/param_validator.rb +1 -1
- data/lib/aws-sdk-core/plugins/bearer_authorization.rb +2 -0
- data/lib/aws-sdk-core/plugins/checksum_algorithm.rb +332 -169
- data/lib/aws-sdk-core/plugins/client_metrics_plugin.rb +0 -1
- data/lib/aws-sdk-core/plugins/credentials_configuration.rb +7 -3
- data/lib/aws-sdk-core/plugins/endpoint_pattern.rb +40 -32
- data/lib/aws-sdk-core/plugins/global_configuration.rb +8 -9
- data/lib/aws-sdk-core/plugins/http_checksum.rb +2 -8
- data/lib/aws-sdk-core/plugins/protocols/api_gateway.rb +3 -1
- data/lib/aws-sdk-core/plugins/protocols/ec2.rb +2 -24
- data/lib/aws-sdk-core/plugins/protocols/json_rpc.rb +6 -8
- data/lib/aws-sdk-core/plugins/protocols/query.rb +4 -2
- data/lib/aws-sdk-core/plugins/protocols/rest_json.rb +4 -3
- data/lib/aws-sdk-core/plugins/protocols/rest_xml.rb +5 -1
- data/lib/aws-sdk-core/plugins/protocols/rpc_v2.rb +17 -0
- data/lib/aws-sdk-core/plugins/regional_endpoint.rb +74 -25
- data/lib/aws-sdk-core/plugins/retry_errors.rb +0 -1
- data/lib/aws-sdk-core/plugins/sign.rb +28 -12
- data/lib/aws-sdk-core/plugins/signature_v2.rb +2 -1
- data/lib/aws-sdk-core/plugins/signature_v4.rb +2 -1
- data/lib/aws-sdk-core/plugins/stub_responses.rb +52 -9
- data/lib/aws-sdk-core/plugins/telemetry.rb +75 -0
- data/lib/aws-sdk-core/plugins/transfer_encoding.rb +16 -9
- data/lib/aws-sdk-core/plugins/user_agent.rb +48 -9
- data/lib/aws-sdk-core/plugins.rb +39 -0
- data/lib/aws-sdk-core/process_credentials.rb +3 -2
- data/lib/aws-sdk-core/query/ec2_handler.rb +27 -0
- data/lib/aws-sdk-core/query/handler.rb +4 -4
- data/lib/aws-sdk-core/query.rb +2 -1
- data/lib/aws-sdk-core/resources.rb +8 -0
- data/lib/aws-sdk-core/rest/{request/content_type.rb → content_type_handler.rb} +1 -1
- data/lib/aws-sdk-core/rest/handler.rb +3 -4
- data/lib/aws-sdk-core/rest/request/headers.rb +3 -3
- data/lib/aws-sdk-core/rest.rb +1 -1
- data/lib/aws-sdk-core/rpc_v2/builder.rb +62 -0
- data/lib/aws-sdk-core/rpc_v2/cbor_engine.rb +18 -0
- data/lib/aws-sdk-core/rpc_v2/content_type_handler.rb +47 -0
- data/lib/aws-sdk-core/rpc_v2/error_handler.rb +85 -0
- data/lib/aws-sdk-core/rpc_v2/handler.rb +79 -0
- data/lib/aws-sdk-core/rpc_v2/parser.rb +98 -0
- data/lib/aws-sdk-core/rpc_v2.rb +69 -0
- data/lib/aws-sdk-core/shared_config.rb +78 -22
- data/lib/aws-sdk-core/shared_credentials.rb +1 -7
- data/lib/aws-sdk-core/sso_credentials.rb +4 -1
- data/lib/aws-sdk-core/stubbing/protocols/ec2.rb +12 -11
- data/lib/aws-sdk-core/stubbing/protocols/json.rb +11 -10
- data/lib/aws-sdk-core/stubbing/protocols/query.rb +7 -6
- data/lib/aws-sdk-core/stubbing/protocols/rest.rb +2 -1
- data/lib/aws-sdk-core/stubbing/protocols/rest_json.rb +9 -8
- data/lib/aws-sdk-core/stubbing/protocols/rest_xml.rb +6 -5
- data/lib/aws-sdk-core/stubbing/protocols/rpc_v2.rb +39 -0
- data/lib/aws-sdk-core/stubbing.rb +22 -0
- data/lib/aws-sdk-core/telemetry/base.rb +177 -0
- data/lib/aws-sdk-core/telemetry/no_op.rb +70 -0
- data/lib/aws-sdk-core/telemetry/otel.rb +235 -0
- data/lib/aws-sdk-core/telemetry/span_kind.rb +22 -0
- data/lib/aws-sdk-core/telemetry/span_status.rb +59 -0
- data/lib/aws-sdk-core/telemetry.rb +78 -0
- data/lib/aws-sdk-core/waiters/poller.rb +9 -4
- data/lib/aws-sdk-core/xml/error_handler.rb +11 -37
- data/lib/aws-sdk-core/xml/parser.rb +2 -6
- data/lib/aws-sdk-core.rb +82 -108
- data/lib/aws-sdk-sso/client.rb +100 -39
- data/lib/aws-sdk-sso/client_api.rb +7 -0
- data/lib/aws-sdk-sso/endpoint_parameters.rb +9 -6
- data/lib/aws-sdk-sso/endpoint_provider.rb +14 -18
- data/lib/aws-sdk-sso/endpoints.rb +2 -54
- data/lib/aws-sdk-sso/plugins/endpoints.rb +19 -20
- data/lib/aws-sdk-sso/types.rb +1 -0
- data/lib/aws-sdk-sso.rb +15 -11
- data/lib/aws-sdk-ssooidc/client.rb +137 -59
- data/lib/aws-sdk-ssooidc/client_api.rb +11 -0
- data/lib/aws-sdk-ssooidc/endpoint_parameters.rb +9 -6
- data/lib/aws-sdk-ssooidc/endpoint_provider.rb +14 -18
- data/lib/aws-sdk-ssooidc/endpoints.rb +2 -54
- data/lib/aws-sdk-ssooidc/plugins/endpoints.rb +19 -20
- data/lib/aws-sdk-ssooidc/types.rb +49 -16
- data/lib/aws-sdk-ssooidc.rb +15 -11
- data/lib/aws-sdk-sts/client.rb +308 -91
- data/lib/aws-sdk-sts/client_api.rb +36 -10
- data/lib/aws-sdk-sts/customizations.rb +5 -1
- data/lib/aws-sdk-sts/endpoint_parameters.rb +10 -9
- data/lib/aws-sdk-sts/endpoint_provider.rb +50 -55
- data/lib/aws-sdk-sts/endpoints.rb +2 -118
- data/lib/aws-sdk-sts/errors.rb +16 -0
- data/lib/aws-sdk-sts/plugins/endpoints.rb +19 -28
- data/lib/aws-sdk-sts/types.rb +171 -28
- data/lib/aws-sdk-sts.rb +15 -11
- data/lib/seahorse/client/async_base.rb +4 -5
- data/lib/seahorse/client/base.rb +17 -21
- data/lib/seahorse/client/h2/connection.rb +18 -28
- data/lib/seahorse/client/h2/handler.rb +13 -3
- data/lib/seahorse/client/handler.rb +1 -1
- data/lib/seahorse/client/http/response.rb +1 -1
- data/lib/seahorse/client/net_http/connection_pool.rb +10 -2
- data/lib/seahorse/client/net_http/handler.rb +21 -9
- data/lib/seahorse/client/networking_error.rb +1 -1
- data/lib/seahorse/client/plugins/endpoint.rb +0 -1
- data/lib/seahorse/client/plugins/h2.rb +4 -4
- data/lib/seahorse/client/plugins/net_http.rb +9 -0
- data/lib/seahorse/client/request_context.rb +8 -1
- data/lib/seahorse/client/response.rb +2 -0
- data/sig/aws-sdk-core/async_client_stubs.rbs +21 -0
- data/sig/aws-sdk-core/telemetry/base.rbs +46 -0
- data/sig/aws-sdk-core/telemetry/otel.rbs +22 -0
- data/sig/aws-sdk-core/telemetry/span_kind.rbs +15 -0
- data/sig/aws-sdk-core/telemetry/span_status.rbs +24 -0
- data/sig/seahorse/client/async_base.rbs +18 -0
- metadata +80 -24
- /data/lib/aws-sdk-core/xml/parser/{engines/libxml.rb → libxml_engine.rb} +0 -0
- /data/lib/aws-sdk-core/xml/parser/{engines/nokogiri.rb → nokogiri_engine.rb} +0 -0
- /data/lib/aws-sdk-core/xml/parser/{engines/oga.rb → oga_engine.rb} +0 -0
- /data/lib/aws-sdk-core/xml/parser/{engines/ox.rb → ox_engine.rb} +0 -0
- /data/lib/aws-sdk-core/xml/parser/{engines/rexml.rb → rexml_engine.rb} +0 -0
@@ -0,0 +1,59 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Aws
|
4
|
+
module Telemetry
|
5
|
+
# Represents the status of a finished span.
|
6
|
+
class SpanStatus
|
7
|
+
class << self
|
8
|
+
private :new
|
9
|
+
|
10
|
+
# Returns a newly created {SpanStatus} with code, `UNSET`
|
11
|
+
# and an optional description.
|
12
|
+
#
|
13
|
+
# @param [optional String] description
|
14
|
+
# @return [SpanStatus]
|
15
|
+
def unset(description = '')
|
16
|
+
new(UNSET, description: description)
|
17
|
+
end
|
18
|
+
|
19
|
+
# Returns a newly created {SpanStatus} with code, `OK`
|
20
|
+
# and an optional description.
|
21
|
+
#
|
22
|
+
# @param [optional String] description
|
23
|
+
# @return [SpanStatus]
|
24
|
+
def ok(description = '')
|
25
|
+
new(OK, description: description)
|
26
|
+
end
|
27
|
+
|
28
|
+
# Returns a newly created {SpanStatus} with code, `ERROR`
|
29
|
+
# and an optional description.
|
30
|
+
#
|
31
|
+
# @param [optional String] description
|
32
|
+
# @return [SpanStatus]
|
33
|
+
def error(description = '')
|
34
|
+
new(ERROR, description: description)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
def initialize(code, description: '')
|
39
|
+
@code = code
|
40
|
+
@description = description
|
41
|
+
end
|
42
|
+
|
43
|
+
# @return [Integer] code
|
44
|
+
attr_reader :code
|
45
|
+
|
46
|
+
# @return [String] description
|
47
|
+
attr_reader :description
|
48
|
+
|
49
|
+
# The operation completed successfully.
|
50
|
+
OK = 0
|
51
|
+
|
52
|
+
# The default status.
|
53
|
+
UNSET = 1
|
54
|
+
|
55
|
+
# An error.
|
56
|
+
ERROR = 2
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
@@ -0,0 +1,78 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative 'telemetry/base'
|
4
|
+
require_relative 'telemetry/no_op'
|
5
|
+
require_relative 'telemetry/otel'
|
6
|
+
require_relative 'telemetry/span_kind'
|
7
|
+
require_relative 'telemetry/span_status'
|
8
|
+
|
9
|
+
module Aws
|
10
|
+
# Observability is the extent to which a system's current state can be
|
11
|
+
# inferred from the data it emits. The data emitted is commonly referred
|
12
|
+
# as Telemetry. The AWS SDK for Ruby currently supports traces as
|
13
|
+
# a telemetry signal.
|
14
|
+
#
|
15
|
+
# A telemetry provider is used to emit telemetry data. By default, the
|
16
|
+
# {NoOpTelemetryProvider} will not record or emit any telemetry data.
|
17
|
+
# The SDK currently supports OpenTelemetry (OTel) as a provider. See
|
18
|
+
# {OTelProvider} for more information.
|
19
|
+
#
|
20
|
+
# If a provider isn't supported, you can implement your own provider by
|
21
|
+
# inheriting the following base classes and implementing the interfaces
|
22
|
+
# defined:
|
23
|
+
# * {TelemetryProviderBase}
|
24
|
+
# * {ContextManagerBase}
|
25
|
+
# * {TracerProviderBase}
|
26
|
+
# * {TracerBase}
|
27
|
+
# * {SpanBase}
|
28
|
+
module Telemetry
|
29
|
+
class << self
|
30
|
+
# @api private
|
31
|
+
def module_to_tracer_name(module_name)
|
32
|
+
"#{module_name.gsub('::', '.')}.client".downcase
|
33
|
+
end
|
34
|
+
|
35
|
+
# @api private
|
36
|
+
def http_request_attrs(context)
|
37
|
+
{
|
38
|
+
'http.method' => context.http_request.http_method,
|
39
|
+
'net.protocol.name' => 'http'
|
40
|
+
}.tap do |h|
|
41
|
+
h['net.protocol.version'] =
|
42
|
+
if context.client.is_a? Seahorse::Client::AsyncBase
|
43
|
+
'2'
|
44
|
+
else
|
45
|
+
Net::HTTP::HTTPVersion
|
46
|
+
end
|
47
|
+
|
48
|
+
unless context.config.stub_responses
|
49
|
+
h['net.peer.name'] = context.http_request.endpoint.host
|
50
|
+
h['net.peer.port'] = context.http_request.endpoint.port.to_s
|
51
|
+
end
|
52
|
+
|
53
|
+
if context.http_request.headers.key?('Content-Length')
|
54
|
+
h['http.request_content_length'] =
|
55
|
+
context.http_request.headers['Content-Length']
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
# @api private
|
61
|
+
def http_response_attrs(context)
|
62
|
+
{
|
63
|
+
'http.status_code' => context.http_response.status_code.to_s
|
64
|
+
}.tap do |h|
|
65
|
+
if context.http_response.headers.key?('Content-Length')
|
66
|
+
h['http.response_content_length'] =
|
67
|
+
context.http_response.headers['Content-Length']
|
68
|
+
end
|
69
|
+
|
70
|
+
if context.http_response.headers.key?('x-amz-request-id')
|
71
|
+
h['aws.request_id'] =
|
72
|
+
context.http_response.headers['x-amz-request-id']
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
@@ -29,7 +29,7 @@ module Aws
|
|
29
29
|
# * `:retry` - The waiter may be retried.
|
30
30
|
# * `:error` - The waiter encountered an un-expected error.
|
31
31
|
#
|
32
|
-
# @example A
|
32
|
+
# @example A trivial (bad) example of a waiter that polls indefinetly.
|
33
33
|
#
|
34
34
|
# loop do
|
35
35
|
#
|
@@ -96,8 +96,13 @@ module Aws
|
|
96
96
|
end
|
97
97
|
|
98
98
|
def matches_error?(acceptor, response)
|
99
|
-
|
100
|
-
|
99
|
+
case acceptor['expected']
|
100
|
+
when 'false' then response.error.nil?
|
101
|
+
when 'true' then !response.error.nil?
|
102
|
+
else
|
103
|
+
response.error.is_a?(Aws::Errors::ServiceError) &&
|
104
|
+
response.error.code == acceptor['expected'].delete('.')
|
105
|
+
end
|
101
106
|
end
|
102
107
|
|
103
108
|
def path(acceptor)
|
@@ -107,7 +112,7 @@ module Aws
|
|
107
112
|
def non_empty_array(acceptor, response, &block)
|
108
113
|
if response.data
|
109
114
|
values = JMESPath.search(path(acceptor), response.data)
|
110
|
-
Array
|
115
|
+
values.is_a?(Array) && values.count > 0 ? yield(values) : false
|
111
116
|
else
|
112
117
|
false
|
113
118
|
end
|
@@ -4,7 +4,7 @@ require 'cgi'
|
|
4
4
|
|
5
5
|
module Aws
|
6
6
|
module Xml
|
7
|
-
class ErrorHandler <
|
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,
|
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
|
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
@@ -3,121 +3,80 @@
|
|
3
3
|
require 'aws-partitions'
|
4
4
|
require 'seahorse'
|
5
5
|
require 'jmespath'
|
6
|
+
require 'aws-sigv4'
|
6
7
|
|
7
8
|
require_relative 'aws-sdk-core/deprecations'
|
8
|
-
|
9
|
-
# credential providers
|
10
|
-
|
11
|
-
require_relative 'aws-sdk-core/credential_provider'
|
12
|
-
require_relative 'aws-sdk-core/refreshing_credentials'
|
13
|
-
require_relative 'aws-sdk-core/assume_role_credentials'
|
14
|
-
require_relative 'aws-sdk-core/assume_role_web_identity_credentials'
|
15
|
-
require_relative 'aws-sdk-core/credentials'
|
16
|
-
require_relative 'aws-sdk-core/credential_provider_chain'
|
17
|
-
require_relative 'aws-sdk-core/ecs_credentials'
|
18
|
-
require_relative 'aws-sdk-core/instance_profile_credentials'
|
19
|
-
require_relative 'aws-sdk-core/shared_credentials'
|
20
|
-
require_relative 'aws-sdk-core/process_credentials'
|
21
|
-
require_relative 'aws-sdk-core/sso_credentials'
|
22
|
-
|
23
|
-
# tokens and token providers
|
24
|
-
require_relative 'aws-sdk-core/token'
|
25
|
-
require_relative 'aws-sdk-core/token_provider'
|
26
|
-
require_relative 'aws-sdk-core/static_token_provider'
|
27
|
-
require_relative 'aws-sdk-core/refreshing_token'
|
28
|
-
require_relative 'aws-sdk-core/sso_token_provider'
|
29
|
-
require_relative 'aws-sdk-core/token_provider_chain'
|
30
|
-
require_relative 'aws-sdk-core/plugins/bearer_authorization'
|
31
|
-
|
32
|
-
# client modules
|
33
|
-
|
34
|
-
require_relative 'aws-sdk-core/client_stubs'
|
35
|
-
require_relative 'aws-sdk-core/async_client_stubs'
|
36
|
-
require_relative 'aws-sdk-core/eager_loader'
|
37
|
-
require_relative 'aws-sdk-core/errors'
|
38
|
-
require_relative 'aws-sdk-core/pageable_response'
|
39
|
-
require_relative 'aws-sdk-core/pager'
|
40
|
-
require_relative 'aws-sdk-core/param_converter'
|
41
|
-
require_relative 'aws-sdk-core/param_validator'
|
42
|
-
require_relative 'aws-sdk-core/shared_config'
|
43
|
-
require_relative 'aws-sdk-core/structure'
|
44
|
-
require_relative 'aws-sdk-core/type_builder'
|
45
|
-
require_relative 'aws-sdk-core/util'
|
46
|
-
|
47
|
-
# resource classes
|
48
|
-
|
49
|
-
require_relative 'aws-sdk-core/resources/collection'
|
50
|
-
|
51
|
-
# logging
|
52
|
-
|
53
|
-
require_relative 'aws-sdk-core/log/formatter'
|
54
|
-
require_relative 'aws-sdk-core/log/param_filter'
|
55
|
-
require_relative 'aws-sdk-core/log/param_formatter'
|
56
|
-
|
57
|
-
# stubbing
|
58
|
-
|
59
|
-
require_relative 'aws-sdk-core/stubbing/empty_stub'
|
60
|
-
require_relative 'aws-sdk-core/stubbing/data_applicator'
|
61
|
-
require_relative 'aws-sdk-core/stubbing/stub_data'
|
62
|
-
require_relative 'aws-sdk-core/stubbing/xml_error'
|
63
|
-
|
64
|
-
# stubbing protocols
|
65
|
-
|
66
|
-
require_relative 'aws-sdk-core/stubbing/protocols/ec2'
|
67
|
-
require_relative 'aws-sdk-core/stubbing/protocols/json'
|
68
|
-
require_relative 'aws-sdk-core/stubbing/protocols/query'
|
69
|
-
require_relative 'aws-sdk-core/stubbing/protocols/rest'
|
70
|
-
require_relative 'aws-sdk-core/stubbing/protocols/rest_json'
|
71
|
-
require_relative 'aws-sdk-core/stubbing/protocols/rest_xml'
|
72
|
-
require_relative 'aws-sdk-core/stubbing/protocols/api_gateway'
|
73
|
-
|
74
|
-
# protocols
|
75
|
-
|
76
|
-
require_relative 'aws-sdk-core/rest'
|
77
|
-
require_relative 'aws-sdk-core/xml'
|
78
|
-
require_relative 'aws-sdk-core/json'
|
79
|
-
|
80
|
-
# event stream
|
81
|
-
|
82
|
-
require_relative 'aws-sdk-core/binary'
|
83
|
-
require_relative 'aws-sdk-core/event_emitter'
|
84
|
-
|
85
|
-
# endpoint discovery
|
86
|
-
|
87
|
-
require_relative 'aws-sdk-core/endpoint_cache'
|
88
|
-
|
89
|
-
# client metrics
|
90
|
-
|
91
|
-
require_relative 'aws-sdk-core/client_side_monitoring/request_metrics'
|
92
|
-
require_relative 'aws-sdk-core/client_side_monitoring/publisher'
|
93
|
-
|
94
|
-
# utilities
|
95
|
-
|
96
|
-
require_relative 'aws-sdk-core/arn'
|
97
|
-
require_relative 'aws-sdk-core/arn_parser'
|
98
|
-
require_relative 'aws-sdk-core/ec2_metadata'
|
99
|
-
require_relative 'aws-sdk-core/lru_cache'
|
100
|
-
|
101
|
-
# dynamic endpoints
|
102
|
-
require_relative 'aws-sdk-core/endpoints'
|
103
|
-
require_relative 'aws-sdk-core/plugins/signature_v4'
|
104
|
-
|
105
9
|
# defaults
|
106
10
|
require_relative 'aws-defaults'
|
107
11
|
|
108
|
-
# plugins
|
109
|
-
# loaded through building STS or SSO ..
|
110
|
-
|
111
|
-
# aws-sdk-sts is included to support Aws::AssumeRoleCredentials
|
112
|
-
require_relative 'aws-sdk-sts'
|
113
|
-
|
114
|
-
# aws-sdk-sso is included to support Aws::SSOCredentials
|
115
|
-
require_relative 'aws-sdk-sso'
|
116
|
-
require_relative 'aws-sdk-ssooidc'
|
117
|
-
|
118
12
|
module Aws
|
119
13
|
|
120
|
-
|
14
|
+
autoload :IniParser, 'aws-sdk-core/ini_parser'
|
15
|
+
|
16
|
+
# Credentials and credentials providers
|
17
|
+
autoload :Credentials, 'aws-sdk-core/credentials'
|
18
|
+
autoload :CredentialProvider, 'aws-sdk-core/credential_provider'
|
19
|
+
autoload :RefreshingCredentials, 'aws-sdk-core/refreshing_credentials'
|
20
|
+
autoload :AssumeRoleCredentials, 'aws-sdk-core/assume_role_credentials'
|
21
|
+
autoload :AssumeRoleWebIdentityCredentials, 'aws-sdk-core/assume_role_web_identity_credentials'
|
22
|
+
autoload :CredentialProviderChain, 'aws-sdk-core/credential_provider_chain'
|
23
|
+
autoload :ECSCredentials, 'aws-sdk-core/ecs_credentials'
|
24
|
+
autoload :InstanceProfileCredentials, 'aws-sdk-core/instance_profile_credentials'
|
25
|
+
autoload :SharedCredentials, 'aws-sdk-core/shared_credentials'
|
26
|
+
autoload :ProcessCredentials, 'aws-sdk-core/process_credentials'
|
27
|
+
autoload :SSOCredentials, 'aws-sdk-core/sso_credentials'
|
28
|
+
|
29
|
+
|
30
|
+
# tokens and token providers
|
31
|
+
autoload :Token, 'aws-sdk-core/token'
|
32
|
+
autoload :TokenProvider, 'aws-sdk-core/token_provider'
|
33
|
+
autoload :StaticTokenProvider, 'aws-sdk-core/static_token_provider'
|
34
|
+
autoload :RefreshingToken, 'aws-sdk-core/refreshing_token'
|
35
|
+
autoload :SSOTokenProvider, 'aws-sdk-core/sso_token_provider'
|
36
|
+
autoload :TokenProviderChain, 'aws-sdk-core/token_provider_chain'
|
37
|
+
|
38
|
+
# client modules
|
39
|
+
autoload :ClientStubs, 'aws-sdk-core/client_stubs'
|
40
|
+
autoload :AsyncClientStubs, 'aws-sdk-core/async_client_stubs'
|
41
|
+
autoload :EagerLoader, 'aws-sdk-core/eager_loader'
|
42
|
+
autoload :Errors, 'aws-sdk-core/errors'
|
43
|
+
autoload :PageableResponse, 'aws-sdk-core/pageable_response'
|
44
|
+
autoload :Pager, 'aws-sdk-core/pager'
|
45
|
+
autoload :ParamConverter, 'aws-sdk-core/param_converter'
|
46
|
+
autoload :ParamValidator, 'aws-sdk-core/param_validator'
|
47
|
+
autoload :SharedConfig, 'aws-sdk-core/shared_config'
|
48
|
+
autoload :Structure, 'aws-sdk-core/structure'
|
49
|
+
autoload :EmptyStructure, 'aws-sdk-core/structure'
|
50
|
+
autoload :TypeBuilder, 'aws-sdk-core/type_builder'
|
51
|
+
autoload :Util, 'aws-sdk-core/util'
|
52
|
+
|
53
|
+
# protocols
|
54
|
+
autoload :ErrorHandler, 'aws-sdk-core/error_handler'
|
55
|
+
autoload :Rest, 'aws-sdk-core/rest'
|
56
|
+
autoload :Xml, 'aws-sdk-core/xml'
|
57
|
+
autoload :Json, 'aws-sdk-core/json'
|
58
|
+
autoload :Query, 'aws-sdk-core/query'
|
59
|
+
autoload :RpcV2, 'aws-sdk-core/rpc_v2'
|
60
|
+
|
61
|
+
# event stream
|
62
|
+
autoload :Binary, 'aws-sdk-core/binary'
|
63
|
+
autoload :EventEmitter, 'aws-sdk-core/event_emitter'
|
64
|
+
|
65
|
+
# endpoint discovery
|
66
|
+
autoload :EndpointCache, 'aws-sdk-core/endpoint_cache'
|
67
|
+
|
68
|
+
autoload :Telemetry, 'aws-sdk-core/telemetry'
|
69
|
+
|
70
|
+
# utilities
|
71
|
+
autoload :ARN, 'aws-sdk-core/arn'
|
72
|
+
autoload :ARNParser, 'aws-sdk-core/arn_parser'
|
73
|
+
autoload :EC2Metadata, 'aws-sdk-core/ec2_metadata'
|
74
|
+
autoload :LRUCache, 'aws-sdk-core/lru_cache'
|
75
|
+
|
76
|
+
# dynamic endpoints
|
77
|
+
autoload :Endpoints, 'aws-sdk-core/endpoints'
|
78
|
+
|
79
|
+
CORE_GEM_VERSION = File.read(File.expand_path('../VERSION', __dir__)).strip
|
121
80
|
|
122
81
|
@config = {}
|
123
82
|
|
@@ -201,3 +160,18 @@ module Aws
|
|
201
160
|
|
202
161
|
end
|
203
162
|
end
|
163
|
+
|
164
|
+
# Setup additional autoloads/modules
|
165
|
+
require_relative 'aws-sdk-core/client_side_monitoring'
|
166
|
+
require_relative 'aws-sdk-core/log'
|
167
|
+
require_relative 'aws-sdk-core/plugins'
|
168
|
+
require_relative 'aws-sdk-core/resources'
|
169
|
+
require_relative 'aws-sdk-core/stubbing'
|
170
|
+
require_relative 'aws-sdk-core/waiters'
|
171
|
+
|
172
|
+
# aws-sdk-sts is included to support Aws::AssumeRoleCredentials
|
173
|
+
require_relative 'aws-sdk-sts'
|
174
|
+
|
175
|
+
# aws-sdk-sso is included to support Aws::SSOCredentials
|
176
|
+
require_relative 'aws-sdk-sso'
|
177
|
+
require_relative 'aws-sdk-ssooidc'
|