aws-sdk-core 3.94.1 → 3.97.1
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/binary/event_parser.rb +3 -3
- data/lib/aws-sdk-core/log/param_filter.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 +1 -5
- data/lib/aws-sdk-core/rest/request/endpoint.rb +8 -3
- data/lib/aws-sdk-core/stubbing/protocols/rest.rb +28 -4
- data/lib/aws-sdk-sts.rb +1 -1
- data/lib/aws-sdk-sts/client.rb +4 -4
- 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: 03d0ced8fba32434ebe6a92f15a95655039252e24e590e3a7a342aff62830f31
|
4
|
+
data.tar.gz: 7eba95a4c50383fd101df33e8436551a846fda0d661abeb2bbb28450e38ddbd5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ebcc1cd3dca1bac74bf3a2b6d036863df4139e0111113ac5554a33add88c9baf74cbe0ee049e675aae7d49508958b1ae71f5581f2adba4b44c1318fbb626a953
|
7
|
+
data.tar.gz: abbabd1516240b7a25e89fcdae47381af64e939a54090c9ef4453fba16fe5d961a763d513b0caa6ea548d4367d65484a6e8890d17a2904e0fe4cc4d34d754c59
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.
|
1
|
+
3.97.1
|
@@ -78,9 +78,9 @@ module Aws
|
|
78
78
|
|
79
79
|
# locate event from eventstream
|
80
80
|
name, ref = @rules.shape.member_by_location_name(event_type)
|
81
|
-
unless ref.event
|
82
|
-
|
83
|
-
|
81
|
+
unless ref && ref.event
|
82
|
+
return Struct.new(:event_type, :raw_event_type, :raw_event)
|
83
|
+
.new(:unknown_event, event_type, raw_event)
|
84
84
|
end
|
85
85
|
|
86
86
|
event = ref.shape.struct_class.new
|
@@ -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 = {})
|
@@ -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
|
@@ -174,7 +174,7 @@ a clock skew correction and retry requests with skewed client clocks.
|
|
174
174
|
end
|
175
175
|
|
176
176
|
def self.resolve_max_attempts(cfg)
|
177
|
-
value = ENV['AWS_MAX_ATTEMPTS'] ||
|
177
|
+
value = (ENV['AWS_MAX_ATTEMPTS'] && ENV['AWS_MAX_ATTEMPTS'].to_i) ||
|
178
178
|
Aws.shared_config.max_attempts(profile: cfg.profile) ||
|
179
179
|
3
|
180
180
|
# Raise if provided value is not a positive integer
|
@@ -190,7 +190,6 @@ a clock skew correction and retry requests with skewed client clocks.
|
|
190
190
|
value = ENV['AWS_ADAPTIVE_RETRY_WAIT_TO_FILL'] ||
|
191
191
|
Aws.shared_config.adaptive_retry_wait_to_fill(profile: cfg.profile) ||
|
192
192
|
'true'
|
193
|
-
|
194
193
|
# Raise if provided value is not true or false
|
195
194
|
if value != 'true' && value != 'false'
|
196
195
|
raise ArgumentError,
|
@@ -198,7 +197,6 @@ a clock skew correction and retry requests with skewed client clocks.
|
|
198
197
|
'adaptive_retry_wait_to_fill profile option or for '\
|
199
198
|
'ENV[\'AWS_ADAPTIVE_RETRY_WAIT_TO_FILL\']'
|
200
199
|
end
|
201
|
-
|
202
200
|
value == 'true'
|
203
201
|
end
|
204
202
|
|
@@ -206,7 +204,6 @@ a clock skew correction and retry requests with skewed client clocks.
|
|
206
204
|
value = ENV['AWS_CORRECT_CLOCK_SKEW'] ||
|
207
205
|
Aws.shared_config.correct_clock_skew(profile: cfg.profile) ||
|
208
206
|
'true'
|
209
|
-
|
210
207
|
# Raise if provided value is not true or false
|
211
208
|
if value != 'true' && value != 'false'
|
212
209
|
raise ArgumentError,
|
@@ -214,7 +211,6 @@ a clock skew correction and retry requests with skewed client clocks.
|
|
214
211
|
'correct_clock_skew profile option or for '\
|
215
212
|
'ENV[\'AWS_CORRECT_CLOCK_SKEW\']'
|
216
213
|
end
|
217
|
-
|
218
214
|
value == 'true'
|
219
215
|
end
|
220
216
|
|
@@ -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)
|
@@ -43,7 +43,7 @@ module Aws
|
|
43
43
|
def build_body(api, operation, data)
|
44
44
|
rules = operation.output
|
45
45
|
if head_operation(operation)
|
46
|
-
|
46
|
+
''
|
47
47
|
elsif streaming?(rules)
|
48
48
|
data[rules[:payload]]
|
49
49
|
elsif rules[:payload]
|
@@ -73,7 +73,7 @@ module Aws
|
|
73
73
|
end
|
74
74
|
|
75
75
|
def head_operation(operation)
|
76
|
-
operation.http_method ==
|
76
|
+
operation.http_method == 'HEAD'
|
77
77
|
end
|
78
78
|
|
79
79
|
def eventstream?(rules)
|
@@ -116,8 +116,22 @@ module Aws
|
|
116
116
|
opts
|
117
117
|
end
|
118
118
|
|
119
|
-
def
|
120
|
-
|
119
|
+
def encode_unknown_event(opts, event_type, event_data)
|
120
|
+
# right now h2 events are only rest_json
|
121
|
+
opts[:payload] = StringIO.new(JSON.dump(event_data))
|
122
|
+
opts[:headers][':event-type'] = Aws::EventStream::HeaderValue.new(
|
123
|
+
value: event_type.to_s,
|
124
|
+
type: 'string'
|
125
|
+
)
|
126
|
+
opts[:headers][':message-type'] = Aws::EventStream::HeaderValue.new(
|
127
|
+
value: 'event',
|
128
|
+
type: 'string'
|
129
|
+
)
|
130
|
+
opts
|
131
|
+
end
|
132
|
+
|
133
|
+
def encode_modeled_event(opts, rules, event_type, event_data, builder)
|
134
|
+
event_ref = rules.shape.member(event_type)
|
121
135
|
explicit_payload = false
|
122
136
|
implicit_payload_members = {}
|
123
137
|
event_ref.shape.members.each do |name, ref|
|
@@ -166,6 +180,16 @@ module Aws
|
|
166
180
|
opts
|
167
181
|
end
|
168
182
|
|
183
|
+
def encode_event(opts, rules, event_data, builder)
|
184
|
+
event_type = event_data.delete(:event_type)
|
185
|
+
|
186
|
+
if rules.shape.member?(event_type)
|
187
|
+
encode_modeled_event(opts, rules, event_type, event_data, builder)
|
188
|
+
else
|
189
|
+
encode_unknown_event(opts, event_type, event_data)
|
190
|
+
end
|
191
|
+
end
|
192
|
+
|
169
193
|
end
|
170
194
|
end
|
171
195
|
end
|
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.1'
|
2189
2189
|
Seahorse::Client::Request.new(handlers, context)
|
2190
2190
|
end
|
2191
2191
|
|
@@ -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.1
|
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-06-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jmespath
|