aws-sdk-core 3.68.0 → 3.71.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 18f71473382cc66ef7fd9cd1ed94577fa4dbe75f
4
- data.tar.gz: f37cf085eee73f4f766a5c80492690bdae5e1f6e
3
+ metadata.gz: baef9364982f05b50ce49aec481c67f013b8d4b2
4
+ data.tar.gz: 816c82b64b0ad53c2ad46589eb0dee360e889504
5
5
  SHA512:
6
- metadata.gz: 656dbc36316496f11445a6e5b6a47dcabbb20ea2604f9e9e9fb3ca379eaaba14eec5ef7ca90d5420533e2780282c9564e924abd3835dd099a779ed7a7f208ac9
7
- data.tar.gz: 41a797745b6dd3b7fdbdf9a272b423a7361051d42470c9af93d7cc1dadb2d41d44f36fd2e6f09416a1710424c4a3065c15b766cbcbb7782d72cfd1c785463a4f
6
+ metadata.gz: 85e5b9133be8849c738f9744bef031d85168a41ae295c4339ef3b4e3eb62868dcc77ca63e2b08db7888fe6df6acb9aa844dc0b60361c09f2c383c358fbf300fb
7
+ data.tar.gz: 461ec0a49091bedcb0a8da524c8e0dc4303b114cb19f078028b84c966119c2e33e703bd8175bfba03400ec584efd7f13ae9728fac03082440836238f26d8e831
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.68.0
1
+ 3.71.0
@@ -13,32 +13,29 @@ module Aws
13
13
  !!credentials && credentials.set?
14
14
  end
15
15
 
16
- # @deprecated Deprecated in 2.1.0. This method is subject to errors
17
- # from a race condition when called against refreshable credential
18
- # objects. Will be removed in 2.2.0.
16
+ # @deprecated This method is subject to errors from a race condition when
17
+ # called against refreshable credential objects. This will be removed.
19
18
  # @see #credentials
20
19
  def access_key_id
21
20
  credentials ? credentials.access_key_id : nil
22
21
  end
23
- deprecated(:access_key_id, use: '#credentials')
22
+ deprecated(:access_key_id, use: '#credentials', version: '3.75')
24
23
 
25
- # @deprecated Deprecated in 2.1.0. This method is subject to errors
26
- # from a race condition when called against refreshable credential
27
- # objects. Will be removed in 2.2.0.
24
+ # @deprecated This method is subject to errors from a race condition when
25
+ # called against refreshable credential objects. This will be removed.
28
26
  # @see #credentials
29
27
  def secret_access_key
30
28
  credentials ? credentials.secret_access_key : nil
31
29
  end
32
- deprecated(:secret_access_key, use: '#credentials')
30
+ deprecated(:secret_access_key, use: '#credentials', version: '3.75')
33
31
 
34
- # @deprecated Deprecated in 2.1.0. This method is subject to errors
35
- # from a race condition when called against refreshable credential
36
- # objects. Will be removed in 2.2.0.
32
+ # @deprecated This method is subject to errors from a race condition when
33
+ # called against refreshable credential objects. This will be removed.
37
34
  # @see #credentials
38
35
  def session_token
39
36
  credentials ? credentials.session_token : nil
40
37
  end
41
- deprecated(:session_token, use: '#credentials')
38
+ deprecated(:session_token, use: '#credentials', version: '3.75')
42
39
 
43
40
  end
44
41
  end
@@ -35,33 +35,39 @@ module Aws
35
35
  # @api private
36
36
  module Deprecations
37
37
 
38
- # @param [Symbol] method_name The name of the deprecated method.
38
+ # @param [Symbol] method The name of the deprecated method.
39
39
  #
40
40
  # @option options [String] :message The warning message to issue
41
41
  # when the deprecated method is called.
42
42
  #
43
- # @option options [Symbol] :use The name of an use
44
- # method that should be used.
43
+ # @option options [String] :use The name of a method that should be used.
45
44
  #
46
- def deprecated(method_name, options = {})
45
+ # @option options [String] :version The version that will remove the
46
+ # deprecated method.
47
+ #
48
+ def deprecated(method, options = {})
47
49
 
48
50
  deprecation_msg = options[:message] || begin
49
- msg = "DEPRECATION WARNING: called deprecated method `#{method_name}' "
50
- msg << "of an #{self}"
51
- msg << ", use #{options[:use]} instead" if options[:use]
51
+ msg = "#################### DEPRECATION WARNING ####################\n"
52
+ msg << "Called deprecated method `#{method}` of #{self}."
53
+ msg << " Use `#{options[:use]}` instead.\n" if options[:use]
54
+ if options[:version]
55
+ msg << "Method `#{method}` will be removed in #{options[:version]}."
56
+ end
57
+ msg << "\n#############################################################"
52
58
  msg
53
59
  end
54
60
 
55
- alias_method(:"deprecated_#{method_name}", method_name)
61
+ alias_method(:"deprecated_#{method}", method)
56
62
 
57
63
  warned = false # we only want to issue this warning once
58
64
 
59
- define_method(method_name) do |*args,&block|
65
+ define_method(method) do |*args, &block|
60
66
  unless warned
61
67
  warned = true
62
68
  warn(deprecation_msg + "\n" + caller.join("\n"))
63
69
  end
64
- send("deprecated_#{method_name}", *args, &block)
70
+ send("deprecated_#{method}", *args, &block)
65
71
  end
66
72
  end
67
73
 
@@ -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, :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, :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_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]
15
15
  # end
16
16
 
17
17
  def initialize(options = {})
@@ -141,8 +141,8 @@ module Aws
141
141
  errors << expected_got(context, "true or false", value)
142
142
  end
143
143
  when BlobShape
144
- unless io_like?(value) or value.is_a?(String)
145
- errors << expected_got(context, "a String or IO object", value)
144
+ unless value.is_a?(String) || io_like?(value)
145
+ errors << expected_got(context, "a String or File object", value)
146
146
  end
147
147
  else
148
148
  raise "unhandled shape type: #{ref.shape.class.name}"
@@ -166,9 +166,8 @@ module Aws
166
166
  end
167
167
 
168
168
  def io_like?(value)
169
- value.respond_to?(:read) &&
170
- value.respond_to?(:rewind) &&
171
- value.respond_to?(:size)
169
+ value.respond_to?(:read) && value.respond_to?(:rewind) &&
170
+ value.respond_to?(:size)
172
171
  end
173
172
 
174
173
  def error_messages(errors)
@@ -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.68.0'
43
+ GEM_VERSION = '3.71.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.68.0'
1818
+ context[:gem_version] = '3.71.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
  #
@@ -194,13 +194,15 @@ module Seahorse
194
194
  private
195
195
 
196
196
  def define_operation_methods
197
+ operations_module = Module.new
197
198
  @api.operation_names.each do |method_name|
198
- define_method(method_name) do |*args, &block|
199
+ operations_module.send(:define_method, method_name) do |*args, &block|
199
200
  params = args[0] || {}
200
201
  options = args[1] || {}
201
202
  build_request(method_name, params).send_request(options, &block)
202
203
  end
203
204
  end
205
+ include(operations_module)
204
206
  end
205
207
 
206
208
  def build_plugins
@@ -119,7 +119,7 @@ module Seahorse
119
119
  attr_accessor :default_block
120
120
  attr_accessor :required
121
121
  attr_accessor :doc_type
122
- attr_accessor :doc_default
122
+ attr_writer :doc_default
123
123
  attr_accessor :docstring
124
124
 
125
125
  def doc_default
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.68.0
4
+ version: 3.71.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-09-16 00:00:00.000000000 Z
11
+ date: 2019-10-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jmespath
@@ -213,6 +213,7 @@ files:
213
213
  - lib/aws-sdk-sts/client_api.rb
214
214
  - lib/aws-sdk-sts/customizations.rb
215
215
  - lib/aws-sdk-sts/errors.rb
216
+ - lib/aws-sdk-sts/plugins/sts_regional_endpoints.rb
216
217
  - lib/aws-sdk-sts/resource.rb
217
218
  - lib/aws-sdk-sts/types.rb
218
219
  - lib/seahorse.rb