aws-sdk-core 3.95.0 → 3.98.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 60b1a6f829f927c518b36451d51a48b0231376c64eb6c96f37733654321f684c
4
- data.tar.gz: 4eb47d3fd67a5cd7feefc457109f8d4d3cc603ca60eb412fdb6418f4e52ab9b1
3
+ metadata.gz: 900cd1a6cbe9b35c88cabe17a5722dc050118ae959fc95e314c9d6b37d50fa2f
4
+ data.tar.gz: 72ec66eb30d622b0b4fbdfa2a3d6c63e7b9a1667dd0d8a72ec2f7bece92212e6
5
5
  SHA512:
6
- metadata.gz: a9719d38da7156226ea29e74c13412b662453554ab964371ac5508c5ef1d498f51144f9581838df85e3830999eb765579aea787b2bf07b54b9d5ea21783409be
7
- data.tar.gz: aa50cf81b58ec28fe1a80995caa34101c7519450e99983dd64c4dcfc49e2a3329ad7526442673b887ccb9a5e4225fb1a00a15fb98bec2b36980f6cbbca4b73e5
6
+ metadata.gz: 79c25a4a03c167df01e62959cd8613ff3f62a4cbca3a1d8202c4327ea0dbb1db7e797ae4c1b6ab3b35483179e00965c587d71f0e8c2414cd87016a02d66e2aa8
7
+ data.tar.gz: bb899f25cdc80a804e11b31881dba290cba5512c8ccd935135a52a93767d12cad8affa7700e91c2a3ef6955080a5071398220735ae8c9f16f36b9eb4c41654c6
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.95.0
1
+ 3.98.0
@@ -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
- raise Aws::Errors::EventStreamParserError.new(
83
- "Failed to locate event shape for the event")
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, :filter_expression, :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
- default: false,
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. Defaults to `false`.
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
@@ -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
- value = params[param_name(placeholder)].to_s
39
- placeholder.include?('+') ?
40
- value.gsub(/[^\/]+/) { |v| escape(v) } :
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 == "HEAD"
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 encode_event(opts, rules, event_data, builder)
120
- event_ref = rules.shape.member(event_data.delete(:event_type))
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
@@ -43,6 +43,6 @@ require_relative 'aws-sdk-sts/customizations'
43
43
  # @service
44
44
  module Aws::STS
45
45
 
46
- GEM_VERSION = '3.95.0'
46
+ GEM_VERSION = '3.98.0'
47
47
 
48
48
  end
@@ -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. Defaults to `false`.
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.95.0'
2188
+ context[:gem_version] = '3.98.0'
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 === default
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
 
@@ -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.95.0
4
+ version: 3.98.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-05-07 00:00:00.000000000 Z
11
+ date: 2020-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jmespath