aws-sdk-core 3.94.0 → 3.97.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/aws-sdk-core.rb +2 -2
- data/lib/aws-sdk-core/async_client_stubs.rb +2 -2
- data/lib/aws-sdk-core/client_stubs.rb +4 -4
- data/lib/aws-sdk-core/deprecations.rb +6 -8
- data/lib/aws-sdk-core/errors.rb +9 -9
- data/lib/aws-sdk-core/log/param_filter.rb +1 -1
- data/lib/aws-sdk-core/param_validator.rb +1 -1
- data/lib/aws-sdk-core/plugins/endpoint_discovery.rb +9 -3
- data/lib/aws-sdk-core/plugins/regional_endpoint.rb +2 -2
- data/lib/aws-sdk-core/plugins/retry_errors.rb +10 -10
- data/lib/aws-sdk-core/rest/request/endpoint.rb +8 -3
- data/lib/aws-sdk-core/rest/request/querystring_builder.rb +2 -2
- data/lib/aws-sdk-core/shared_config.rb +11 -9
- data/lib/aws-sdk-core/stubbing/protocols/query.rb +2 -2
- data/lib/aws-sdk-core/stubbing/protocols/rest.rb +3 -3
- data/lib/aws-sdk-core/xml/builder.rb +1 -1
- data/lib/aws-sdk-core/xml/doc_builder.rb +7 -3
- data/lib/aws-sdk-core/xml/error_handler.rb +1 -1
- data/lib/aws-sdk-core/xml/parser/engines/rexml.rb +2 -1
- data/lib/aws-sdk-sts.rb +1 -1
- data/lib/aws-sdk-sts/client.rb +4 -4
- data/lib/seahorse/client/h2/connection.rb +12 -12
- data/lib/seahorse/client/handler_list_entry.rb +2 -2
- data/lib/seahorse/client/http/request.rb +3 -3
- data/lib/seahorse/client/http/response.rb +2 -2
- data/lib/seahorse/client/net_http/handler.rb +2 -2
- data/lib/seahorse/client/plugin.rb +3 -3
- data/lib/seahorse/model/api.rb +4 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8040701313c65f31f4fb21f28cd445117a92efe0e8a20c68c9e45dd809eb51c0
|
4
|
+
data.tar.gz: 60761f067db272bd8d3ac08e37c59df4f9ab9590ccda3841231edb0f9838e427
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 750115a58ba1d6cc4bdcda1d879ed7f2a70bf61759680dc4302665ac35819c897a151b0317aa05392cddfff97fb93c7ca34fb3524d98b3ee32893953f72e5733
|
7
|
+
data.tar.gz: 177614051a23194fbb686326a248f014483de6218e3f57934d092bc819bbbf77d12e52e5a460038cf57691f033b0226db959cd26563ee5f3933f526d04d89a3a
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.
|
1
|
+
3.97.0
|
data/lib/aws-sdk-core.rb
CHANGED
@@ -167,8 +167,8 @@ module Aws
|
|
167
167
|
|
168
168
|
# @api private
|
169
169
|
def eager_autoload!(*args)
|
170
|
-
msg = 'Aws.eager_autoload is no longer needed, usage of '
|
171
|
-
|
170
|
+
msg = 'Aws.eager_autoload is no longer needed, usage of '\
|
171
|
+
'autoload has been replaced with require statements'
|
172
172
|
warn(msg)
|
173
173
|
end
|
174
174
|
|
@@ -42,8 +42,8 @@ module Aws
|
|
42
42
|
if config.stub_responses
|
43
43
|
@send_events
|
44
44
|
else
|
45
|
-
msg = 'This method is only implemented for stubbed clients, and is '
|
46
|
-
|
45
|
+
msg = 'This method is only implemented for stubbed clients, and is '\
|
46
|
+
'available when you enable stubbing in the constructor with `stub_responses: true`'
|
47
47
|
raise NotImplementedError.new(msg)
|
48
48
|
end
|
49
49
|
end
|
@@ -175,8 +175,8 @@ module Aws
|
|
175
175
|
if config.stub_responses
|
176
176
|
apply_stubs(operation_name, stubs.flatten)
|
177
177
|
else
|
178
|
-
msg = 'stubbing is not enabled; enable stubbing in the constructor '
|
179
|
-
|
178
|
+
msg = 'stubbing is not enabled; enable stubbing in the constructor '\
|
179
|
+
'with `:stub_responses => true`'
|
180
180
|
raise msg
|
181
181
|
end
|
182
182
|
end
|
@@ -198,8 +198,8 @@ module Aws
|
|
198
198
|
@api_requests
|
199
199
|
end
|
200
200
|
else
|
201
|
-
msg = 'This method is only implemented for stubbed clients, and is '
|
202
|
-
|
201
|
+
msg = 'This method is only implemented for stubbed clients, and is '\
|
202
|
+
'available when you enable stubbing in the constructor with `stub_responses: true`'
|
203
203
|
raise NotImplementedError.new(msg)
|
204
204
|
end
|
205
205
|
end
|
@@ -48,14 +48,12 @@ module Aws
|
|
48
48
|
def deprecated(method, options = {})
|
49
49
|
|
50
50
|
deprecation_msg = options[:message] || begin
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
msg << "\n#############################################################"
|
58
|
-
msg
|
51
|
+
"#################### DEPRECATION WARNING ####################\n"\
|
52
|
+
"Called deprecated method `#{method}` of #{self}."\
|
53
|
+
"#{" Use `#{options[:use]}` instead.\n" if options[:use]}"\
|
54
|
+
"#{"Method `#{method}` will be removed in #{options[:version]}."\
|
55
|
+
if options[:version]}"\
|
56
|
+
"\n#############################################################"
|
59
57
|
end
|
60
58
|
|
61
59
|
alias_method(:"deprecated_#{method}", method)
|
data/lib/aws-sdk-core/errors.rb
CHANGED
@@ -52,7 +52,7 @@ module Aws
|
|
52
52
|
# EcsCredentialsProvider fails to parse the metadata response after retries
|
53
53
|
class MetadataParserError < RuntimeError
|
54
54
|
def initialize(*args)
|
55
|
-
msg =
|
55
|
+
msg = 'Failed to parse metadata service response.'
|
56
56
|
super(msg)
|
57
57
|
end
|
58
58
|
end
|
@@ -71,7 +71,7 @@ module Aws
|
|
71
71
|
class EndpointDiscoveryError < RuntimeError
|
72
72
|
def initialize(*args)
|
73
73
|
msg = 'Endpoint discovery failed for the operation or discovered endpoint is not working, '\
|
74
|
-
|
74
|
+
'request will keep failing until endpoint discovery succeeds or :endpoint option is provided.'
|
75
75
|
super(msg)
|
76
76
|
end
|
77
77
|
end
|
@@ -83,8 +83,8 @@ module Aws
|
|
83
83
|
|
84
84
|
def initialize(name)
|
85
85
|
msg = "Missing required parameter #{name} to construct"\
|
86
|
-
|
87
|
-
|
86
|
+
' endpoint host prefix. You can disable host prefix by'\
|
87
|
+
' setting :disable_host_prefix_injection to `true`.'
|
88
88
|
super(msg)
|
89
89
|
end
|
90
90
|
|
@@ -195,8 +195,8 @@ module Aws
|
|
195
195
|
class MissingWebIdentityTokenFile < RuntimeError
|
196
196
|
def initialize(*args)
|
197
197
|
msg = 'Missing :web_identity_token_file parameter or'\
|
198
|
-
|
199
|
-
|
198
|
+
' invalid file path provided for'\
|
199
|
+
' Aws::AssumeRoleWebIdentityCredentials provider'
|
200
200
|
super(msg)
|
201
201
|
end
|
202
202
|
end
|
@@ -208,8 +208,8 @@ module Aws
|
|
208
208
|
# Raised when a client is constructed and region is not specified.
|
209
209
|
class MissingRegionError < ArgumentError
|
210
210
|
def initialize(*args)
|
211
|
-
msg =
|
212
|
-
|
211
|
+
msg = 'missing region; use :region option or '\
|
212
|
+
"export region name to ENV['AWS_REGION']"
|
213
213
|
super(msg)
|
214
214
|
end
|
215
215
|
end
|
@@ -289,7 +289,7 @@ Known AWS regions include (not specific to this service):
|
|
289
289
|
module DynamicErrors
|
290
290
|
|
291
291
|
def self.extended(submodule)
|
292
|
-
submodule.instance_variable_set(
|
292
|
+
submodule.instance_variable_set('@const_set_mutex', Mutex.new)
|
293
293
|
submodule.const_set(:ServiceError, Class.new(ServiceError))
|
294
294
|
end
|
295
295
|
|
@@ -11,7 +11,7 @@ module Aws
|
|
11
11
|
#
|
12
12
|
# @api private
|
13
13
|
# begin
|
14
|
-
SENSITIVE = [:access_token, :account_name, :account_password, :address, :admin_contact, :admin_password, :alexa_for_business_room_arn, :artifact_credentials, :auth_code, :authentication_token, :authorization_result, :backup_plan_tags, :backup_vault_tags, :base_32_string_seed, :block, :block_address, :block_data, :blocks, :body, :bot_configuration, :bot_email, :calling_name, :cause, :client_id, :client_request_token, :client_secret, :comment, :configuration, :copy_source_sse_customer_key, :credentials, :current_password, :custom_attributes, :custom_private_key, :db_password, :default_phone_number, :definition, :description, :destination_access_token, :digest_tip_address, :display_name, :domain_signing_private_key, :e164_phone_number, :email, :email_address, :email_message, :embed_url, :error, :external_meeting_id, :external_model_endpoint_data_blobs, :external_user_id, :fall_back_phone_number, :feedback_token, :file, :first_name, :full_name, :host_key, :id, :id_token, :input, :input_text, :ion_text, :join_token, :key, :key_id, :key_material, :key_store_password, :kms_key_id, :kms_master_key_id, :lambda_function_arn, :last_name, :local_console_password, :master_account_email, :master_user_name, :master_user_password, :meeting_host_id, :message, :metadata, :name, :new_password, :next_password, :notes, :number, :old_password, :outbound_events_https_endpoint, :output, :owner_information, :parameters, :passphrase, :password, :payload, :phone_number, :plaintext, :previous_password, :primary_email, :primary_provisioned_number, :private_key, :private_key_plaintext, :proof, :proposed_password, :proxy_phone_number, :public_key, :qr_code_png, :query, :random_password, :recovery_point_tags, :refresh_token, :registrant_contact, :request_attributes, :resource_arn, :restore_metadata, :revision, :search_query, :secret_access_key, :secret_binary, :secret_code, :secret_hash, :secret_string, :secret_to_authenticate_initiator, :secret_to_authenticate_target, :security_token, :service_password, :session_attributes, :session_token, :share_notes, :shared_secret, :slots, :sns_topic_arn, :source_access_token, :sqs_queue_arn, :sse_customer_key, :ssekms_encryption_context, :ssekms_key_id, :status_message, :tag_key_list, :tags, :target_address, :task_parameters, :tech_contact, :temporary_password, :text, :token, :trust_password, :type, :upload_credentials, :upload_url, :uri, :user_data, :user_email, :user_name, :user_password, :username, :value, :values, :variables, :vpn_psk, :zip_file]
|
14
|
+
SENSITIVE = [:access_token, :account_name, :account_password, :address, :admin_contact, :admin_password, :alexa_for_business_room_arn, :artifact_credentials, :auth_code, :authentication_token, :authorization_result, :backup_plan_tags, :backup_vault_tags, :base_32_string_seed, :block, :block_address, :block_data, :blocks, :body, :bot_configuration, :bot_email, :calling_name, :cause, :client_id, :client_request_token, :client_secret, :comment, :configuration, :copy_source_sse_customer_key, :credentials, :current_password, :custom_attributes, :custom_private_key, :db_password, :default_phone_number, :definition, :description, :destination_access_token, :digest_tip_address, :display_name, :domain_signing_private_key, :e164_phone_number, :email, :email_address, :email_message, :embed_url, :error, :external_meeting_id, :external_model_endpoint_data_blobs, :external_user_id, :fall_back_phone_number, :feedback_token, :file, :first_name, :full_name, :host_key, :id, :id_token, :input, :input_text, :ion_text, :join_token, :key, :key_id, :key_material, :key_store_password, :kms_key_id, :kms_master_key_id, :lambda_function_arn, :last_name, :local_console_password, :master_account_email, :master_user_name, :master_user_password, :meeting_host_id, :message, :metadata, :name, :new_password, :next_password, :notes, :number, :old_password, :outbound_events_https_endpoint, :output, :owner_information, :parameters, :passphrase, :password, :payload, :phone_number, :plaintext, :previous_password, :primary_email, :primary_provisioned_number, :private_key, :private_key_plaintext, :proof, :proposed_password, :proxy_phone_number, :public_key, :qr_code_png, :query, :random_password, :recovery_point_tags, :refresh_token, :registrant_contact, :request_attributes, :resource_arn, :restore_metadata, :revision, :saml_assertion, :search_query, :secret_access_key, :secret_binary, :secret_code, :secret_hash, :secret_string, :secret_to_authenticate_initiator, :secret_to_authenticate_target, :security_token, :service_password, :session_attributes, :session_token, :share_notes, :shared_secret, :slots, :sns_topic_arn, :source_access_token, :sqs_queue_arn, :sse_customer_key, :ssekms_encryption_context, :ssekms_key_id, :status_message, :tag_key_list, :tags, :target_address, :task_parameters, :tech_contact, :temporary_password, :text, :token, :trust_password, :type, :upload_credentials, :upload_url, :uri, :user_data, :user_email, :user_name, :user_password, :username, :value, :values, :variables, :vpn_psk, :web_identity_token, :zip_file]
|
15
15
|
# end
|
16
16
|
|
17
17
|
def initialize(options = {})
|
@@ -152,7 +152,7 @@ module Aws
|
|
152
152
|
def correct_type?(ref, value, errors, context)
|
153
153
|
if ref.eventstream && @input
|
154
154
|
errors << "instead of providing value directly for eventstreams at input,"\
|
155
|
-
|
155
|
+
" expected to use #signal events per stream"
|
156
156
|
return false
|
157
157
|
end
|
158
158
|
case value
|
@@ -4,10 +4,10 @@ module Aws
|
|
4
4
|
class EndpointDiscovery < Seahorse::Client::Plugin
|
5
5
|
|
6
6
|
option(:endpoint_discovery,
|
7
|
-
|
7
|
+
doc_default: Proc.new { |options| options[:require_endpoint_discovery] },
|
8
8
|
doc_type: 'Boolean',
|
9
9
|
docstring: <<-DOCS) do |cfg|
|
10
|
-
When set to `true`, endpoint discovery will be enabled for operations when available.
|
10
|
+
When set to `true`, endpoint discovery will be enabled for operations when available.
|
11
11
|
DOCS
|
12
12
|
resolve_endpoint_discovery(cfg)
|
13
13
|
end
|
@@ -102,6 +102,10 @@ the background every 60 secs (default). Defaults to `false`.
|
|
102
102
|
key = cache.extract_key(ctx)
|
103
103
|
|
104
104
|
if required
|
105
|
+
unless ctx.config.endpoint_discovery
|
106
|
+
raise ArgumentError, "Operation #{ctx.operation.name} requires "\
|
107
|
+
'endpoint_discovery to be enabled.'
|
108
|
+
end
|
105
109
|
# required for the operation
|
106
110
|
unless cache.key?(key)
|
107
111
|
cache.update(key, ctx)
|
@@ -151,8 +155,10 @@ the background every 60 secs (default). Defaults to `false`.
|
|
151
155
|
|
152
156
|
def self.resolve_endpoint_discovery(cfg)
|
153
157
|
env = ENV['AWS_ENABLE_ENDPOINT_DISCOVERY']
|
158
|
+
default = cfg.api.require_endpoint_discovery
|
154
159
|
shared_cfg = Aws.shared_config.endpoint_discovery_enabled(profile: cfg.profile)
|
155
|
-
Aws::Util.str_2_bool(env) || Aws::Util.str_2_bool(shared_cfg)
|
160
|
+
resolved = Aws::Util.str_2_bool(env) || Aws::Util.str_2_bool(shared_cfg)
|
161
|
+
env.nil? && shared_cfg.nil? ? default : !!resolved
|
156
162
|
end
|
157
163
|
|
158
164
|
end
|
@@ -14,7 +14,7 @@ module Aws
|
|
14
14
|
docstring: <<-DOCS) do |cfg|
|
15
15
|
The AWS region to connect to. The configured `:region` is
|
16
16
|
used to determine the service `:endpoint`. When not passed,
|
17
|
-
a default `:region` is
|
17
|
+
a default `:region` is searched for in the following locations:
|
18
18
|
|
19
19
|
* `Aws.config[:region]`
|
20
20
|
* `ENV['AWS_REGION']`
|
@@ -31,7 +31,7 @@ a default `:region` is search for in the following locations:
|
|
31
31
|
option(:endpoint, doc_type: String, docstring: <<-DOCS) do |cfg|
|
32
32
|
The client endpoint is normally constructed from the `:region`
|
33
33
|
option. You should only configure an `:endpoint` when connecting
|
34
|
-
to test endpoints. This should be
|
34
|
+
to test endpoints. This should be a valid HTTP(S) URI.
|
35
35
|
DOCS
|
36
36
|
endpoint_prefix = cfg.api.metadata['endpointPrefix']
|
37
37
|
if cfg.region && endpoint_prefix
|
@@ -167,8 +167,8 @@ a clock skew correction and retry requests with skewed client clocks.
|
|
167
167
|
# Raise if provided value is not one of the retry modes
|
168
168
|
if value != 'legacy' && value != 'standard' && value != 'adaptive'
|
169
169
|
raise ArgumentError,
|
170
|
-
|
171
|
-
|
170
|
+
'Must provide either `legacy`, `standard`, or `adaptive` for '\
|
171
|
+
'retry_mode profile option or for ENV[\'AWS_RETRY_MODE\']'
|
172
172
|
end
|
173
173
|
value
|
174
174
|
end
|
@@ -180,8 +180,8 @@ a clock skew correction and retry requests with skewed client clocks.
|
|
180
180
|
# Raise if provided value is not a positive integer
|
181
181
|
if !value.is_a?(Integer) || value <= 0
|
182
182
|
raise ArgumentError,
|
183
|
-
|
184
|
-
|
183
|
+
'Must provide a positive integer for max_attempts profile '\
|
184
|
+
'option or for ENV[\'AWS_MAX_ATTEMPTS\']'
|
185
185
|
end
|
186
186
|
value
|
187
187
|
end
|
@@ -194,9 +194,9 @@ a clock skew correction and retry requests with skewed client clocks.
|
|
194
194
|
# Raise if provided value is not true or false
|
195
195
|
if value != 'true' && value != 'false'
|
196
196
|
raise ArgumentError,
|
197
|
-
|
198
|
-
|
199
|
-
|
197
|
+
'Must provide either `true` or `false` for '\
|
198
|
+
'adaptive_retry_wait_to_fill profile option or for '\
|
199
|
+
'ENV[\'AWS_ADAPTIVE_RETRY_WAIT_TO_FILL\']'
|
200
200
|
end
|
201
201
|
|
202
202
|
value == 'true'
|
@@ -210,9 +210,9 @@ a clock skew correction and retry requests with skewed client clocks.
|
|
210
210
|
# Raise if provided value is not true or false
|
211
211
|
if value != 'true' && value != 'false'
|
212
212
|
raise ArgumentError,
|
213
|
-
|
214
|
-
|
215
|
-
|
213
|
+
'Must provide either `true` or `false` for '\
|
214
|
+
'correct_clock_skew profile option or for '\
|
215
|
+
'ENV[\'AWS_CORRECT_CLOCK_SKEW\']'
|
216
216
|
end
|
217
217
|
|
218
218
|
value == 'true'
|
@@ -35,10 +35,15 @@ module Aws
|
|
35
35
|
end
|
36
36
|
|
37
37
|
def param_value_for_placeholder(placeholder, params)
|
38
|
-
|
39
|
-
|
40
|
-
|
38
|
+
name = param_name(placeholder)
|
39
|
+
value = params[name].to_s
|
40
|
+
raise ArgumentError, ":#{name} must not be blank" if value.empty?
|
41
|
+
|
42
|
+
if placeholder.include?('+')
|
43
|
+
value.gsub(/[^\/]+/) { |v| escape(v) }
|
44
|
+
else
|
41
45
|
escape(value)
|
46
|
+
end
|
42
47
|
end
|
43
48
|
|
44
49
|
def param_name(placeholder)
|
@@ -50,8 +50,8 @@ module Aws
|
|
50
50
|
if StringShape === shape_ref.shape.member.shape
|
51
51
|
list_of_strings(shape_ref.location_name, param_value)
|
52
52
|
else
|
53
|
-
msg = "Only list of strings supported, got "
|
54
|
-
|
53
|
+
msg = "Only list of strings supported, got "\
|
54
|
+
"#{shape_ref.shape.member.shape.class.name}"
|
55
55
|
raise NotImplementedError, msg
|
56
56
|
end
|
57
57
|
else
|
@@ -184,9 +184,9 @@ module Aws
|
|
184
184
|
credential_source ||= prof_cfg['credential_source']
|
185
185
|
if opts[:source_profile] && credential_source
|
186
186
|
raise Errors::CredentialSourceConflictError,
|
187
|
-
|
188
|
-
|
189
|
-
|
187
|
+
"Profile #{profile} has a source_profile, and "\
|
188
|
+
'a credential_source. For assume role credentials, must '\
|
189
|
+
'provide only source_profile or credential_source, not both.'
|
190
190
|
elsif opts[:source_profile]
|
191
191
|
opts[:credentials] = resolve_source_profile(opts[:source_profile], opts)
|
192
192
|
if opts[:credentials]
|
@@ -199,8 +199,9 @@ module Aws
|
|
199
199
|
opts[:profile] = opts.delete(:source_profile)
|
200
200
|
AssumeRoleCredentials.new(opts)
|
201
201
|
else
|
202
|
-
raise Errors::NoSourceProfileError,
|
203
|
-
|
202
|
+
raise Errors::NoSourceProfileError,
|
203
|
+
"Profile #{profile} has a role_arn, and source_profile, but the"\
|
204
|
+
' source_profile does not have credentials.'
|
204
205
|
end
|
205
206
|
elsif credential_source
|
206
207
|
opts[:credentials] = credentials_from_source(
|
@@ -217,8 +218,9 @@ module Aws
|
|
217
218
|
opts.delete(:source_profile) # Cleanup
|
218
219
|
AssumeRoleCredentials.new(opts)
|
219
220
|
else
|
220
|
-
raise Errors::NoSourceCredentials,
|
221
|
-
|
221
|
+
raise Errors::NoSourceCredentials,
|
222
|
+
"Profile #{profile} could not get source credentials from"\
|
223
|
+
" provider #{credential_source}"
|
222
224
|
end
|
223
225
|
elsif prof_cfg['role_arn']
|
224
226
|
raise Errors::NoSourceProfileError, "Profile #{profile} has a role_arn, but no source_profile."
|
@@ -306,8 +308,8 @@ module Aws
|
|
306
308
|
def validate_profile_exists(profile)
|
307
309
|
unless (@parsed_credentials && @parsed_credentials[profile]) ||
|
308
310
|
(@parsed_config && @parsed_config[profile])
|
309
|
-
msg = "Profile `#{profile}' not found in #{@credentials_path}"
|
310
|
-
|
311
|
+
msg = "Profile `#{profile}' not found in #{@credentials_path}"\
|
312
|
+
"#{" or #{@config_path}" if @config_path}"
|
311
313
|
raise Errors::NoSuchProfileError, msg
|
312
314
|
end
|
313
315
|
end
|
@@ -23,9 +23,9 @@ module Aws
|
|
23
23
|
xml = []
|
24
24
|
builder = Aws::Xml::DocBuilder.new(target: xml, indent: ' ')
|
25
25
|
builder.node(operation.name + 'Response', xmlns: xmlns(api)) do
|
26
|
-
if rules = operation.output
|
26
|
+
if (rules = operation.output)
|
27
27
|
rules.location_name = operation.name + 'Result'
|
28
|
-
Xml::Builder.new(rules, target:xml, pad:' ').to_xml(data)
|
28
|
+
Xml::Builder.new(rules, target: xml, pad:' ').to_xml(data)
|
29
29
|
end
|
30
30
|
builder.node('ResponseMetadata') do
|
31
31
|
builder.node('RequestId', 'stubbed-request-id')
|
@@ -94,9 +94,9 @@ module Aws
|
|
94
94
|
# Pending
|
95
95
|
raise 'Stubbing :exception event is not supported'
|
96
96
|
end
|
97
|
-
stream
|
98
|
-
Aws::EventStream::Message.new(opts)
|
99
|
-
|
97
|
+
[stream, Aws::EventStream::Encoder.new.encode(
|
98
|
+
Aws::EventStream::Message.new(opts)
|
99
|
+
)].pack('a*a*')
|
100
100
|
end
|
101
101
|
end
|
102
102
|
|
@@ -11,7 +11,7 @@ module Aws
|
|
11
11
|
@xml = options[:target] || []
|
12
12
|
indent = options[:indent] || ' '
|
13
13
|
pad = options[:pad] || ''
|
14
|
-
@builder = DocBuilder.new(target
|
14
|
+
@builder = DocBuilder.new(target: @xml, indent: indent, pad: pad)
|
15
15
|
end
|
16
16
|
|
17
17
|
def to_xml(params)
|
@@ -6,7 +6,11 @@ module Aws
|
|
6
6
|
# @option options [String] :pad ('')
|
7
7
|
# @option options [String] :indent ('')
|
8
8
|
def initialize(options = {})
|
9
|
-
@target = options[:target] ||
|
9
|
+
@target = options[:target] || (
|
10
|
+
# The String has to be mutable
|
11
|
+
# because @target implements `<<` method.
|
12
|
+
String.new
|
13
|
+
)
|
10
14
|
@indent = options[:indent] || ''
|
11
15
|
@pad = options[:pad] || ''
|
12
16
|
@end_of_line = @indent == '' ? '' : "\n"
|
@@ -32,7 +36,7 @@ module Aws
|
|
32
36
|
if block_given?
|
33
37
|
@target << open_el(name, attrs)
|
34
38
|
@target << @end_of_line
|
35
|
-
increase_pad
|
39
|
+
increase_pad(&block)
|
36
40
|
@target << @pad
|
37
41
|
@target << close_el(name)
|
38
42
|
elsif args.empty?
|
@@ -77,7 +81,7 @@ module Aws
|
|
77
81
|
def increase_pad(&block)
|
78
82
|
pre_increase = @pad
|
79
83
|
@pad = @pad + @indent
|
80
|
-
|
84
|
+
block.call
|
81
85
|
@pad = pre_increase
|
82
86
|
end
|
83
87
|
|
@@ -15,7 +15,8 @@ module Aws
|
|
15
15
|
|
16
16
|
def parse(xml)
|
17
17
|
begin
|
18
|
-
|
18
|
+
mutable_xml = xml.dup # REXML only accepts mutable string
|
19
|
+
source = REXML::Source.new(mutable_xml)
|
19
20
|
REXML::Parsers::StreamParser.new(source, self).parse
|
20
21
|
rescue REXML::ParseException => error
|
21
22
|
@stack.error(error.message)
|
data/lib/aws-sdk-sts.rb
CHANGED
data/lib/aws-sdk-sts/client.rb
CHANGED
@@ -107,7 +107,7 @@ module Aws::STS
|
|
107
107
|
# @option options [required, String] :region
|
108
108
|
# The AWS region to connect to. The configured `:region` is
|
109
109
|
# used to determine the service `:endpoint`. When not passed,
|
110
|
-
# a default `:region` is
|
110
|
+
# a default `:region` is searched for in the following locations:
|
111
111
|
#
|
112
112
|
# * `Aws.config[:region]`
|
113
113
|
# * `ENV['AWS_REGION']`
|
@@ -163,7 +163,7 @@ module Aws::STS
|
|
163
163
|
# @option options [String] :endpoint
|
164
164
|
# The client endpoint is normally constructed from the `:region`
|
165
165
|
# option. You should only configure an `:endpoint` when connecting
|
166
|
-
# to test endpoints. This should be
|
166
|
+
# to test endpoints. This should be a valid HTTP(S) URI.
|
167
167
|
#
|
168
168
|
# @option options [Integer] :endpoint_cache_max_entries (1000)
|
169
169
|
# Used for the maximum size limit of the LRU cache storing endpoints data
|
@@ -178,7 +178,7 @@ module Aws::STS
|
|
178
178
|
# requests fetching endpoints information. Defaults to 60 sec.
|
179
179
|
#
|
180
180
|
# @option options [Boolean] :endpoint_discovery (false)
|
181
|
-
# When set to `true`, endpoint discovery will be enabled for operations when available.
|
181
|
+
# When set to `true`, endpoint discovery will be enabled for operations when available.
|
182
182
|
#
|
183
183
|
# @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
|
184
184
|
# The log formatter.
|
@@ -2185,7 +2185,7 @@ module Aws::STS
|
|
2185
2185
|
params: params,
|
2186
2186
|
config: config)
|
2187
2187
|
context[:gem_name] = 'aws-sdk-core'
|
2188
|
-
context[:gem_version] = '3.
|
2188
|
+
context[:gem_version] = '3.97.0'
|
2189
2189
|
Seahorse::Client::Request.new(handlers, context)
|
2190
2190
|
end
|
2191
2191
|
|
@@ -76,7 +76,7 @@ module Seahorse
|
|
76
76
|
tcp, addr = _tcp_socket(endpoint)
|
77
77
|
debug_output("opening connection to #{endpoint.host}:#{endpoint.port} ...")
|
78
78
|
_nonblocking_connect(tcp, addr)
|
79
|
-
debug_output(
|
79
|
+
debug_output('opened')
|
80
80
|
|
81
81
|
@socket = OpenSSL::SSL::SSLSocket.new(tcp, _tls_context)
|
82
82
|
@socket.sync_close = true
|
@@ -84,12 +84,12 @@ module Seahorse
|
|
84
84
|
|
85
85
|
debug_output("starting TLS for #{endpoint.host}:#{endpoint.port} ...")
|
86
86
|
@socket.connect
|
87
|
-
debug_output(
|
87
|
+
debug_output('TLS established')
|
88
88
|
_register_h2_callbacks
|
89
89
|
@status = :active
|
90
90
|
elsif @status == :closed
|
91
|
-
msg =
|
92
|
-
|
91
|
+
msg = 'Async Client HTTP2 Connection is closed, you may'\
|
92
|
+
' use #new_connection to create a new HTTP2 Connection for this client'
|
93
93
|
raise Http2ConnectionClosedError.new(msg)
|
94
94
|
end
|
95
95
|
}
|
@@ -106,7 +106,7 @@ module Seahorse
|
|
106
106
|
rescue IO::WaitReadable
|
107
107
|
begin
|
108
108
|
unless IO.select([@socket], nil, nil, connection_read_timeout)
|
109
|
-
self.debug_output(
|
109
|
+
self.debug_output('socket connection read time out')
|
110
110
|
self.close!
|
111
111
|
else
|
112
112
|
# available, retry to start reading
|
@@ -132,7 +132,7 @@ module Seahorse
|
|
132
132
|
|
133
133
|
def close!
|
134
134
|
@mutex.synchronize {
|
135
|
-
self.debug_output(
|
135
|
+
self.debug_output('closing connection ...')
|
136
136
|
if @socket
|
137
137
|
@socket.close
|
138
138
|
@socket = nil
|
@@ -151,10 +151,10 @@ module Seahorse
|
|
151
151
|
|
152
152
|
def debug_output(msg, type = nil)
|
153
153
|
prefix = case type
|
154
|
-
when :send then
|
155
|
-
when :receive then
|
154
|
+
when :send then '-> '
|
155
|
+
when :receive then '<- '
|
156
156
|
else
|
157
|
-
|
157
|
+
''
|
158
158
|
end
|
159
159
|
return unless @logger
|
160
160
|
_debug_entry(prefix + msg)
|
@@ -170,8 +170,8 @@ module Seahorse
|
|
170
170
|
def _register_h2_callbacks
|
171
171
|
@h2_client.on(:frame) do |bytes|
|
172
172
|
if @socket.nil?
|
173
|
-
msg =
|
174
|
-
|
173
|
+
msg = 'Connection is closed due to errors, '\
|
174
|
+
'you can find errors at async_client.connection.errors'
|
175
175
|
raise Http2ConnectionClosedError.new(msg)
|
176
176
|
else
|
177
177
|
@socket.print(bytes)
|
@@ -223,7 +223,7 @@ module Seahorse
|
|
223
223
|
ssl_ctx.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
224
224
|
end
|
225
225
|
if enable_alpn
|
226
|
-
debug_output(
|
226
|
+
debug_output('enabling ALPN for TLS ...')
|
227
227
|
ssl_ctx.alpn_protocols = ['h2']
|
228
228
|
end
|
229
229
|
ssl_ctx
|
@@ -86,8 +86,8 @@ module Seahorse
|
|
86
86
|
if STEPS.key?(step)
|
87
87
|
@step = step
|
88
88
|
else
|
89
|
-
msg = "invalid :step `%s', must be one of :initialize, :validate, "
|
90
|
-
|
89
|
+
msg = "invalid :step `%s', must be one of :initialize, :validate, "\
|
90
|
+
':build, :sign or :send'
|
91
91
|
raise ArgumentError, msg % step.inspect
|
92
92
|
end
|
93
93
|
end
|
@@ -34,8 +34,8 @@ module Seahorse
|
|
34
34
|
if endpoint.nil? or URI::HTTP === endpoint or URI::HTTPS === endpoint
|
35
35
|
@endpoint = endpoint
|
36
36
|
else
|
37
|
-
msg =
|
38
|
-
|
37
|
+
msg = 'invalid endpoint, expected URI::HTTP, URI::HTTPS, or nil, '\
|
38
|
+
"got #{endpoint.inspect}"
|
39
39
|
raise ArgumentError, msg
|
40
40
|
end
|
41
41
|
end
|
@@ -55,7 +55,7 @@ module Seahorse
|
|
55
55
|
|
56
56
|
# @param [#read, #size, #rewind] io
|
57
57
|
def body=(io)
|
58
|
-
@body =case io
|
58
|
+
@body = case io
|
59
59
|
when nil then StringIO.new('')
|
60
60
|
when String then StringIO.new(io)
|
61
61
|
else io
|
@@ -109,8 +109,8 @@ module Seahorse
|
|
109
109
|
@done = true
|
110
110
|
emit(:done)
|
111
111
|
else
|
112
|
-
msg =
|
113
|
-
|
112
|
+
msg = 'options must be empty or must contain :status_code, :headers, '\
|
113
|
+
'and :body'
|
114
114
|
raise ArgumentError, msg
|
115
115
|
end
|
116
116
|
end
|
@@ -13,8 +13,8 @@ module Seahorse
|
|
13
13
|
# @api private
|
14
14
|
class TruncatedBodyError < IOError
|
15
15
|
def initialize(bytes_expected, bytes_received)
|
16
|
-
msg = "http response body truncated, expected #{bytes_expected} "
|
17
|
-
|
16
|
+
msg = "http response body truncated, expected #{bytes_expected} "\
|
17
|
+
"bytes, received #{bytes_received} bytes"
|
18
18
|
super(msg)
|
19
19
|
end
|
20
20
|
end
|
@@ -53,7 +53,7 @@ module Seahorse
|
|
53
53
|
# For backwards-compat reasons, the default value can be passed as 2nd
|
54
54
|
# positional argument (before the options hash) or as the `:default` option
|
55
55
|
# in the options hash.
|
56
|
-
if Hash
|
56
|
+
if default.is_a? Hash
|
57
57
|
options = default
|
58
58
|
else
|
59
59
|
options[:default] = default
|
@@ -123,11 +123,11 @@ module Seahorse
|
|
123
123
|
attr_writer :doc_default
|
124
124
|
attr_accessor :docstring
|
125
125
|
|
126
|
-
def doc_default
|
126
|
+
def doc_default(options)
|
127
127
|
if @doc_default.nil? && !default.is_a?(Proc)
|
128
128
|
default
|
129
129
|
else
|
130
|
-
@doc_default
|
130
|
+
@doc_default.respond_to?(:call) ? @doc_default.call(options) : @doc_default
|
131
131
|
end
|
132
132
|
end
|
133
133
|
|
data/lib/seahorse/model/api.rb
CHANGED
@@ -7,6 +7,7 @@ module Seahorse
|
|
7
7
|
@operations = {}
|
8
8
|
@authorizers = {}
|
9
9
|
@endpoint_operation = nil
|
10
|
+
@require_endpoint_discovery = false
|
10
11
|
end
|
11
12
|
|
12
13
|
# @return [String, nil]
|
@@ -18,6 +19,9 @@ module Seahorse
|
|
18
19
|
# @return [Symbol|nil]
|
19
20
|
attr_accessor :endpoint_operation
|
20
21
|
|
22
|
+
# @return [Boolean|nil]
|
23
|
+
attr_accessor :require_endpoint_discovery
|
24
|
+
|
21
25
|
def operations(&block)
|
22
26
|
if block_given?
|
23
27
|
@operations.each(&block)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-sdk-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.97.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Amazon Web Services
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-05-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jmespath
|