aws-sdk-core 3.69.1 → 3.73.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
  SHA1:
3
- metadata.gz: 83adfca19b60fb51036a316415306b57ac9808e1
4
- data.tar.gz: bff748a3e09817422ea1787d0b2f5f584e2c958b
3
+ metadata.gz: bd5e2584e6ccc2055b85be114926a7617501771f
4
+ data.tar.gz: ef5015027f1d817f6b1a89b9a713e069048bc991
5
5
  SHA512:
6
- metadata.gz: 13e8be68d1868d2404c09a2093f2d00597c4195a43ec0be4d4850f7f3e2ad986798e26a4f080826b924185041add4eddd0831543eded435ae0e3e40dda12c84c
7
- data.tar.gz: dfe652bbeb582756a1144d43bac5b9a6814cbc7b563afb12edca85ce08aa9420701dddd109ed07c471465f1015891bc3ffeb83bcba2e866f4b21e9a9ff45e0ec
6
+ metadata.gz: 5619ed949559a96fbcd3e2a0b42216f455b857f973b75af0c485afffff0c5f94598a6528bb4ff74c687190037b422b6b0750d2990df8161423c49375011c4638
7
+ data.tar.gz: a2c965991bce20698c6725a82960b2d062a917e863c36bdfd2b1ee3a9b79e06f1fa6463f5951e95a7110d91c9dc1a22663775334df7a27dd51897074d7d371d6
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.69.1
1
+ 3.73.0
@@ -47,8 +47,8 @@ module Aws
47
47
  @mutex.synchronize do
48
48
  # delete the least recent used endpoint when cache is full
49
49
  unless @entries.size < @max_entries
50
- old_key, _ = @entries.shift
51
- self.delete_polling_thread(old_key)
50
+ old_key, = @entries.shift
51
+ delete_polling_thread(old_key)
52
52
  end
53
53
  # delete old value if exists
54
54
  @entries.delete(key)
@@ -60,10 +60,12 @@ module Aws
60
60
  # @param [String] key
61
61
  # @return [Boolean]
62
62
  def key?(key)
63
- if @entries.key?(key) && (@entries[key].nil? || @entries[key].expired?)
64
- self.delete(key)
63
+ @mutex.synchronize do
64
+ if @entries.key?(key) && (@entries[key].nil? || @entries[key].expired?)
65
+ @entries.delete(key)
66
+ end
67
+ @entries.key?(key)
65
68
  end
66
- @entries.key?(key)
67
69
  end
68
70
 
69
71
  # checking whether an polling thread exist for the key
@@ -84,7 +86,7 @@ module Aws
84
86
  # kill the old polling thread and remove it from pool
85
87
  # @param [String] key
86
88
  def delete_polling_thread(key)
87
- Thread.kill(@pool[key]) if self.threads_key?(key)
89
+ Thread.kill(@pool[key]) if threads_key?(key)
88
90
  @pool.delete(key)
89
91
  end
90
92
 
@@ -109,7 +111,7 @@ module Aws
109
111
  if _endpoint_operation_identifier(ctx)
110
112
  parts << ctx.operation_name
111
113
  ctx.operation.input.shape.members.inject(parts) do |p, (name, ref)|
112
- p << ctx.params[name] if ref["endpointdiscoveryid"]
114
+ p << ctx.params[name] if ref['endpointdiscoveryid']
113
115
  p
114
116
  end
115
117
  end
@@ -141,7 +143,7 @@ module Aws
141
143
  # build identifier params when available
142
144
  params[:operation] = ctx.operation.name
143
145
  ctx.operation.input.shape.members.inject(params) do |p, (name, ref)|
144
- if ref["endpointdiscoveryid"]
146
+ if ref['endpointdiscoveryid']
145
147
  p[:identifiers] ||= {}
146
148
  p[:identifiers][ref.location_name] = ctx.params[name]
147
149
  end
@@ -153,19 +155,20 @@ module Aws
153
155
  endpoint_operation_name = ctx.config.api.endpoint_operation
154
156
  ctx.client.send(endpoint_operation_name, params)
155
157
  rescue Aws::Errors::ServiceError
156
- nil
158
+ nil
157
159
  end
158
160
  end
159
161
 
160
162
  def _endpoint_operation_identifier(ctx)
161
163
  return @require_identifier unless @require_identifier.nil?
164
+
162
165
  operation_name = ctx.config.api.endpoint_operation
163
166
  operation = ctx.config.api.operation(operation_name)
164
167
  @require_identifier = operation.input.shape.members.any?
165
168
  end
166
169
 
167
170
  class Endpoint
168
-
171
+
169
172
  # default endpoint cache time, 1 minute
170
173
  CACHE_PERIOD = 1
171
174
 
@@ -175,7 +178,7 @@ module Aws
175
178
  @created_time = Time.now
176
179
  end
177
180
 
178
- # [String] valid URI address (with path)
181
+ # [String] valid URI address (with path)
179
182
  attr_reader :address
180
183
 
181
184
  def expired?
@@ -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, :artifact_credentials, :auth_code, :authentication_token, :authorization_result, :backup_plan_tags, :backup_vault_tags, :base_32_string_seed, :block, :block_address, :body, :bot_configuration, :bot_email, :cause, :client_id, :client_secret, :comment, :configuration, :copy_source_sse_customer_key, :credentials, :current_password, :custom_attributes, :db_password, :default_phone_number, :definition, :description, :digest_tip_address, :display_name, :e164_phone_number, :email, :email_address, :email_message, :embed_url, :error, :feedback_token, :file, :first_name, :host_key, :id, :id_token, :input, :input_text, :ion_text, :key_id, :key_store_password, :kms_key_id, :kms_master_key_id, :lambda_function_arn, :last_name, :local_console_password, :master_account_email, :master_user_password, :message, :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, :proof, :proposed_password, :public_key, :qr_code_png, :query, :random_password, :recovery_point_tags, :refresh_token, :registrant_contact, :request_attributes, :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, :share_notes, :shared_secret, :slots, :sse_customer_key, :ssekms_encryption_context, :ssekms_key_id, :status_message, :tag_key_list, :tags, :task_parameters, :tech_contact, :temporary_password, :text, :token, :trust_password, :type, :upload_credentials, :upload_url, :uri, :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, :artifact_credentials, :auth_code, :authentication_token, :authorization_result, :backup_plan_tags, :backup_vault_tags, :base_32_string_seed, :block, :block_address, :body, :bot_configuration, :bot_email, :calling_name, :cause, :client_id, :client_secret, :comment, :configuration, :copy_source_sse_customer_key, :credentials, :current_password, :custom_attributes, :custom_private_key, :db_password, :default_phone_number, :definition, :description, :digest_tip_address, :display_name, :e164_phone_number, :email, :email_address, :email_message, :embed_url, :error, :feedback_token, :file, :first_name, :host_key, :id, :id_token, :input, :input_text, :ion_text, :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_password, :message, :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, :proof, :proposed_password, :public_key, :qr_code_png, :query, :random_password, :recovery_point_tags, :refresh_token, :registrant_contact, :request_attributes, :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, :share_notes, :shared_secret, :slots, :sse_customer_key, :ssekms_encryption_context, :ssekms_key_id, :status_message, :tag_key_list, :tags, :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]
15
15
  # end
16
16
 
17
17
  def initialize(options = {})
@@ -35,7 +35,9 @@ to test endpoints. This should be avalid HTTP(S) URI.
35
35
  DOCS
36
36
  endpoint_prefix = cfg.api.metadata['endpointPrefix']
37
37
  if cfg.region && endpoint_prefix
38
- Aws::Partitions::EndpointProvider.resolve(cfg.region, endpoint_prefix)
38
+ sts_regional = cfg.respond_to?(:sts_regional_endpoints) ? cfg.sts_regional_endpoints : nil
39
+ Aws::Partitions::EndpointProvider.resolve(
40
+ cfg.region, endpoint_prefix, sts_regional)
39
41
  end
40
42
  end
41
43
 
@@ -153,6 +153,21 @@ module Aws
153
153
  end
154
154
  end
155
155
 
156
+ def sts_regional_endpoints(opts = {})
157
+ p = opts[:profile] || @profile_name
158
+ if @config_enabled
159
+ if @parsed_credentials
160
+ mode = @parsed_credentials.fetch(p, {})["sts_regional_endpoints"]
161
+ end
162
+ if @parsed_config
163
+ mode ||= @parsed_config.fetch(p, {})["sts_regional_endpoints"]
164
+ end
165
+ mode
166
+ else
167
+ nil
168
+ end
169
+ end
170
+
156
171
  def endpoint_discovery(opts = {})
157
172
  p = opts[:profile] || @profile_name
158
173
  if @config_enabled && @parsed_config
@@ -40,6 +40,6 @@ require_relative 'aws-sdk-sts/customizations'
40
40
  # @service
41
41
  module Aws::STS
42
42
 
43
- GEM_VERSION = '3.69.1'
43
+ GEM_VERSION = '3.73.0'
44
44
 
45
45
  end
@@ -26,6 +26,7 @@ require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
26
26
  require 'aws-sdk-core/plugins/transfer_encoding.rb'
27
27
  require 'aws-sdk-core/plugins/signature_v4.rb'
28
28
  require 'aws-sdk-core/plugins/protocols/query.rb'
29
+ require 'aws-sdk-sts/plugins/sts_regional_endpoints.rb'
29
30
 
30
31
  Aws::Plugins::GlobalConfiguration.add_identifier(:sts)
31
32
 
@@ -59,6 +60,7 @@ module Aws::STS
59
60
  add_plugin(Aws::Plugins::TransferEncoding)
60
61
  add_plugin(Aws::Plugins::SignatureV4)
61
62
  add_plugin(Aws::Plugins::Protocols::Query)
63
+ add_plugin(Aws::STS::Plugins::STSRegionalEndpoints)
62
64
 
63
65
  # @overload initialize(options)
64
66
  # @param [Hash] options
@@ -192,6 +194,11 @@ module Aws::STS
192
194
  #
193
195
  # @option options [String] :session_token
194
196
  #
197
+ # @option options [String] :sts_regional_endpoints ("legacy")
198
+ # Passing in 'regional' to enable regional endpoint for STS for all supported
199
+ # regions (except 'aws-global'), defaults to 'legacy' mode, using global endpoint
200
+ # for legacy regions.
201
+ #
195
202
  # @option options [Boolean] :stub_responses (false)
196
203
  # Causes the client to return stubbed responses. By default
197
204
  # fake responses are generated and returned. You can specify
@@ -1808,7 +1815,7 @@ module Aws::STS
1808
1815
  params: params,
1809
1816
  config: config)
1810
1817
  context[:gem_name] = 'aws-sdk-core'
1811
- context[:gem_version] = '3.69.1'
1818
+ context[:gem_version] = '3.73.0'
1812
1819
  Seahorse::Client::Request.new(handlers, context)
1813
1820
  end
1814
1821
 
@@ -0,0 +1,32 @@
1
+ module Aws
2
+ module STS
3
+ module Plugins
4
+
5
+ class STSRegionalEndpoints < Seahorse::Client::Plugin
6
+
7
+ option(:sts_regional_endpoints,
8
+ default: 'legacy',
9
+ doc_type: String,
10
+ docstring: <<-DOCS) do |cfg|
11
+ Passing in 'regional' to enable regional endpoint for STS for all supported
12
+ regions (except 'aws-global'), defaults to 'legacy' mode, using global endpoint
13
+ for legacy regions.
14
+ DOCS
15
+ resolve_sts_regional_endpoints(cfg)
16
+ end
17
+
18
+ private
19
+
20
+ def self.resolve_sts_regional_endpoints(cfg)
21
+ env_mode = ENV['AWS_STS_REGIONAL_ENDPOINTS']
22
+ env_mode = nil if env_mode == ''
23
+ cfg_mode = Aws.shared_config.sts_regional_endpoints(
24
+ profile: cfg.profile)
25
+ env_mode || cfg_mode || 'legacy'
26
+ end
27
+
28
+ end
29
+
30
+ end
31
+ end
32
+ end
@@ -1205,7 +1205,7 @@ module Aws::STS
1205
1205
  include Aws::Structure
1206
1206
  end
1207
1207
 
1208
- # The error returned if the message passed to
1208
+ # This error is returned if the message passed to
1209
1209
  # `DecodeAuthorizationMessage` was invalid. This can happen if the token
1210
1210
  # contains invalid characters, such as linebreaks.
1211
1211
  #
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.69.1
4
+ version: 3.73.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: 2019-10-18 00:00:00.000000000 Z
11
+ date: 2019-11-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jmespath
@@ -30,14 +30,20 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '1.0'
33
+ version: '1'
34
+ - - ">="
35
+ - !ruby/object:Gem::Version
36
+ version: 1.228.0
34
37
  type: :runtime
35
38
  prerelease: false
36
39
  version_requirements: !ruby/object:Gem::Requirement
37
40
  requirements:
38
41
  - - "~>"
39
42
  - !ruby/object:Gem::Version
40
- version: '1.0'
43
+ version: '1'
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: 1.228.0
41
47
  - !ruby/object:Gem::Dependency
42
48
  name: aws-sigv4
43
49
  requirement: !ruby/object:Gem::Requirement
@@ -213,6 +219,7 @@ files:
213
219
  - lib/aws-sdk-sts/client_api.rb
214
220
  - lib/aws-sdk-sts/customizations.rb
215
221
  - lib/aws-sdk-sts/errors.rb
222
+ - lib/aws-sdk-sts/plugins/sts_regional_endpoints.rb
216
223
  - lib/aws-sdk-sts/resource.rb
217
224
  - lib/aws-sdk-sts/types.rb
218
225
  - lib/seahorse.rb