aws-sdk-core 3.101.0 → 3.104.1

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: 79d3719f7b5ab361df736ffe796f20d08e92490fb8e5d6738403227b270cde06
4
- data.tar.gz: 0f8c0f7b989107cf482ab2d7fe804e3d20ec92759778aa730d62804cf6ecc401
3
+ metadata.gz: 70a6905bf06dee70851564691ecbfd4df7e750c087d302c2c32c711c6d628c2e
4
+ data.tar.gz: 7a895028e693d8ec2b65930b212e2e83ff3edccce7f3cd594df31208d00e9796
5
5
  SHA512:
6
- metadata.gz: 660f5dc555dcbca125a9cda8ce2f13aab03c107c8f5eeefa58edfdcc63d4b7ee2baf85467db07a0b505e69219f0362e3e70388cb71b3e8e9463c5457b241392a
7
- data.tar.gz: 47f028368f3d4b081dc5e22c0f65147b91c09ad1d1b760d38ebd570bdeb62a9f07113ac44726229bc0063853003170ddb58bfdd27b544f8374b2ed8151057e6b
6
+ metadata.gz: 8a3c29b11ac10b61679545cb7c133b272f25f7717d8cbb935e85272ad588c77b8db61483e24f6d9624676704fc04db8c4c280e6d89f6399bd38816d3184a4172
7
+ data.tar.gz: 673a1eb3b3a33e181426f5585117834c9c69ee4226adcae4b5c9c05e9d8e59d8311d26befcadc0d6acba21de01d762557862ac88bc5124a67e763000e1abd40d
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.101.0
1
+ 3.104.1
@@ -6,9 +6,9 @@ require 'set'
6
6
  module Aws
7
7
  module Log
8
8
  class ParamFilter
9
- # DEPRECATED - this must exist for backwards compatibility. Sensitive
9
+ # DEPRECATED - This must exist for backwards compatibility. Sensitive
10
10
  # members are now computed for each request/response type. This can be
11
- # removed in a new major version.
11
+ # removed in a new major version. This list is no longer updated.
12
12
  #
13
13
  # A managed list of sensitive parameters that should be filtered from
14
14
  # logs. This is updated automatically as part of each release. See the
@@ -16,7 +16,7 @@ module Aws
16
16
  #
17
17
  # @api private
18
18
  # begin
19
- SENSITIVE = [:access_token, :account_name, :account_password, :address, :admin_contact, :admin_password, :alexa_for_business_room_arn, :artifact_credentials, :auth_code, :auth_parameters, :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, :content, :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]
19
+ SENSITIVE = [:access_token, :account_name, :account_password, :address, :admin_contact, :admin_password, :alexa_for_business_room_arn, :artifact_credentials, :auth_code, :auth_parameters, :authentication_token, :authorization_result, :backup_plan_tags, :backup_vault_tags, :base_32_string_seed, :basic_auth_credentials, :block, :block_address, :block_data, :blocks, :body, :bot_configuration, :bot_email, :calling_name, :cause, :client_id, :client_request_token, :client_secret, :comment, :configuration, :content, :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, :emergency_phone_number, :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, :oauth_token, :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, :test_phone_number, :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]
20
20
  # end
21
21
 
22
22
  def initialize(options = {})
@@ -1,14 +1,16 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Aws
4
-
5
4
  # Decorates a {Seahorse::Client::Response} with paging convenience methods.
6
5
  # Some AWS calls provide paged responses to limit the amount of data returned
7
- # with each response. To optimize for latency, some APIs may return an
8
- # inconsistent number of responses per page. You should rely on the values of
9
- # the `next_page?` method or using enumerable methods such as `each`
10
- # rather than the number of items returned to iterate through results.
11
- # See below for examples.
6
+ # with each response. To optimize for latency, some APIs may return an
7
+ # inconsistent number of responses per page. You should rely on the values of
8
+ # the `next_page?` method or using enumerable methods such as `each` rather
9
+ # than the number of items returned to iterate through results. See below for
10
+ # examples.
11
+ #
12
+ # @note Methods such as `to_json` will enumerate all of the responses before
13
+ # returning the full response as JSON.
12
14
  #
13
15
  # # Paged Responses Are Enumerable
14
16
  # The simplest way to handle paged response data is to use the built-in
@@ -23,7 +23,9 @@ When provided, `x-api-key` header will be injected with the value provided.
23
23
  class OptionHandler < Seahorse::Client::Handler
24
24
  def call(context)
25
25
  if context.operation.require_apikey
26
- api_key = context.params.delete(:api_key)
26
+ if context.params.is_a?(Hash)
27
+ api_key = context.params.delete(:api_key)
28
+ end
27
29
  api_key = context.config.api_key if api_key.nil?
28
30
  context[:api_key] = api_key
29
31
  end
@@ -40,6 +40,8 @@ requests are made, and retries are disabled.
40
40
  client.handlers.remove(ClientMetricsPlugin::Handler)
41
41
  client.handlers.remove(ClientMetricsSendPlugin::LatencyHandler)
42
42
  client.handlers.remove(ClientMetricsSendPlugin::AttemptHandler)
43
+ client.handlers.remove(Seahorse::Client::Plugins::RequestCallback::OptionHandler)
44
+ client.handlers.remove(Seahorse::Client::Plugins::RequestCallback::ReadCallbackHandler)
43
45
  end
44
46
  end
45
47
 
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'open3'
4
-
5
3
  module Aws
6
4
 
7
5
  # A credential provider that executes a given process and attempts
@@ -36,7 +34,8 @@ module Aws
36
34
  private
37
35
  def credentials_from_process(proc_invocation)
38
36
  begin
39
- raw_out, process_status = Open3.capture2(proc_invocation)
37
+ raw_out = `#{proc_invocation}`
38
+ process_status = $?
40
39
  rescue Errno::ENOENT
41
40
  raise Errors::InvalidProcessCredentialsPayload.new("Could not find process #{proc_invocation}")
42
41
  end
@@ -45,6 +45,6 @@ require_relative 'aws-sdk-sts/customizations'
45
45
  # @service
46
46
  module Aws::STS
47
47
 
48
- GEM_VERSION = '3.101.0'
48
+ GEM_VERSION = '3.104.1'
49
49
 
50
50
  end
@@ -2189,7 +2189,7 @@ module Aws::STS
2189
2189
  params: params,
2190
2190
  config: config)
2191
2191
  context[:gem_name] = 'aws-sdk-core'
2192
- context[:gem_version] = '3.101.0'
2192
+ context[:gem_version] = '3.104.1'
2193
2193
  Seahorse::Client::Request.new(handlers, context)
2194
2194
  end
2195
2195
 
@@ -50,6 +50,7 @@ require_relative 'seahorse/client/plugins/net_http'
50
50
  require_relative 'seahorse/client/plugins/h2'
51
51
  require_relative 'seahorse/client/plugins/raise_response_errors'
52
52
  require_relative 'seahorse/client/plugins/response_target'
53
+ require_relative 'seahorse/client/plugins/request_callback'
53
54
 
54
55
  # model
55
56
 
@@ -14,6 +14,7 @@ module Seahorse
14
14
  Plugins::NetHttp,
15
15
  Plugins::RaiseResponseErrors,
16
16
  Plugins::ResponseTarget,
17
+ Plugins::RequestCallback
17
18
  ])
18
19
 
19
20
  # @api private
@@ -4,7 +4,8 @@ module Seahorse
4
4
  module Client
5
5
  class BlockIO
6
6
 
7
- def initialize(&block)
7
+ def initialize(headers = nil, &block)
8
+ @headers = headers
8
9
  @block = block
9
10
  @size = 0
10
11
  end
@@ -12,7 +13,7 @@ module Seahorse
12
13
  # @param [String] chunk
13
14
  # @return [Integer]
14
15
  def write(chunk)
15
- @block.call(chunk)
16
+ @block.call(chunk, @headers)
16
17
  ensure
17
18
  chunk.bytesize.tap { |chunk_size| @size += chunk_size }
18
19
  end
@@ -73,7 +73,7 @@ module Seahorse
73
73
 
74
74
  # Completes the http response.
75
75
  #
76
- # @example Completing the response in a singal call
76
+ # @example Completing the response in a single call
77
77
  #
78
78
  # http_response.signal_done(
79
79
  # status_code: 200,
@@ -0,0 +1,110 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'pathname'
4
+ require 'forwardable'
5
+
6
+ module Seahorse
7
+ module Client
8
+ module Plugins
9
+
10
+ # @api private
11
+ class ReadCallbackIO
12
+ extend Forwardable
13
+ def_delegators :@io, :size
14
+
15
+ def initialize(io, on_read = nil)
16
+ @io = io
17
+ @on_read = on_read if on_read.is_a? Proc
18
+ @bytes_read = 0
19
+
20
+ # Some IO objects support readpartial - IO.copy_stream used by the
21
+ # request will call readpartial if available, so define a wrapper
22
+ # for it if the underlying IO supports it.
23
+ if @io.respond_to?(:readpartial)
24
+ def self.readpartial(*args)
25
+ @io.readpartial(*args).tap do |chunk|
26
+ handle_chunk(chunk)
27
+ end
28
+ end
29
+ end
30
+ end
31
+
32
+ attr_reader :io
33
+
34
+ def read(*args)
35
+ @io.read(*args).tap do |chunk|
36
+ handle_chunk(chunk)
37
+ end
38
+ end
39
+
40
+ private
41
+
42
+ def handle_chunk(chunk)
43
+ @bytes_read += chunk.bytesize if chunk && chunk.respond_to?(:bytesize)
44
+ total_size = @io.respond_to?(:size) ? @io.size : nil
45
+ @on_read.call(chunk, @bytes_read, total_size) if @on_read
46
+ end
47
+ end
48
+
49
+ # @api private
50
+ class RequestCallback < Plugin
51
+
52
+ option(
53
+ :on_chunk_sent,
54
+ default: nil,
55
+ doc_type: 'Proc',
56
+ docstring: <<-DOCS)
57
+ When a Proc object is provided, it will be used as callback when each chunk
58
+ of the request body is sent. It provides three arguments: the chunk,
59
+ the number of bytes read from the body, and the total number of
60
+ bytes in the body.
61
+ DOCS
62
+
63
+ # @api private
64
+ class OptionHandler < Client::Handler
65
+ def call(context)
66
+ if context.params.is_a?(Hash)
67
+ on_chunk_sent = context.params.delete(:on_chunk_sent)
68
+ end
69
+ on_chunk_sent = context.config.on_chunk_sent if on_chunk_sent.nil?
70
+ context[:on_chunk_sent] = on_chunk_sent if on_chunk_sent
71
+ @handler.call(context)
72
+ end
73
+ end
74
+
75
+ # @api private
76
+ class ReadCallbackHandler < Client::Handler
77
+ def call(context)
78
+ if (callback = context[:on_chunk_sent])
79
+ context.http_request.body = ReadCallbackIO.new(
80
+ context.http_request.body,
81
+ callback
82
+ )
83
+ add_event_listeners(context)
84
+ end
85
+ @handler.call(context)
86
+ end
87
+
88
+ def add_event_listeners(context)
89
+ # unwrap the request body as soon as we start receiving a response
90
+ context.http_response.on_headers do
91
+ body = context.http_request.body
92
+ if body.is_a? ReadCallbackIO
93
+ context.http_request.body = body.io
94
+ end
95
+ end
96
+ end
97
+ end
98
+
99
+ # OptionHandler is needed to remove :on_chunk_sent
100
+ # from the params before build
101
+ handler(OptionHandler, step: :initialize)
102
+
103
+ # ReadCallbackHandlerneeds to go late in the call stack
104
+ # other plugins including Sigv4 and content_md5 read the request body
105
+ # and rewind it
106
+ handler(ReadCallbackHandler, step: :sign, priority: 0)
107
+ end
108
+ end
109
+ end
110
+ end
@@ -17,10 +17,9 @@ module Seahorse
17
17
 
18
18
  def call(context)
19
19
  if context.params.is_a?(Hash) && context.params[:response_target]
20
- target = context.params.delete(:response_target)
21
- else
22
- target = context[:response_target]
20
+ context[:response_target] = context.params.delete(:response_target)
23
21
  end
22
+ target = context[:response_target]
24
23
  add_event_listeners(context, target) if target
25
24
  @handler.call(context)
26
25
  end
@@ -35,13 +34,13 @@ module Seahorse
35
34
  # an existing ManagedFile or BlockIO and those
36
35
  # should be reused.
37
36
  if context.http_response.body.is_a? StringIO
38
- context.http_response.body = handler.send(:io, target)
37
+ context.http_response.body = io(target, context.http_response.headers)
39
38
  end
40
39
  end
41
40
 
42
41
  context.http_response.on_success(200..299) do
43
42
  body = context.http_response.body
44
- if ManagedFile === body && body.open?
43
+ if body.is_a?(ManagedFile) && body.open?
45
44
  body.close
46
45
  end
47
46
  end
@@ -63,9 +62,9 @@ module Seahorse
63
62
  end
64
63
  end
65
64
 
66
- def io(target)
65
+ def io(target, headers)
67
66
  case target
68
- when Proc then BlockIO.new(&target)
67
+ when Proc then BlockIO.new(headers, &target)
69
68
  when String, Pathname then ManagedFile.new(target, 'w+b')
70
69
  else target
71
70
  end
@@ -19,7 +19,7 @@ module Seahorse
19
19
  @operation = options[:operation]
20
20
  @authorizer = options[:authorizer]
21
21
  @client = options[:client]
22
- @params = options[:params] || {}
22
+ @params = options[:params] ? options[:params].dup : {}
23
23
  @config = options[:config]
24
24
  @http_request = options[:http_request] || Http::Request.new
25
25
  @http_response = options[:http_response] || Http::Response.new
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.101.0
4
+ version: 3.104.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-06-23 00:00:00.000000000 Z
11
+ date: 2020-07-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jmespath
@@ -263,6 +263,7 @@ files:
263
263
  - lib/seahorse/client/plugins/net_http.rb
264
264
  - lib/seahorse/client/plugins/operation_methods.rb
265
265
  - lib/seahorse/client/plugins/raise_response_errors.rb
266
+ - lib/seahorse/client/plugins/request_callback.rb
266
267
  - lib/seahorse/client/plugins/response_target.rb
267
268
  - lib/seahorse/client/request.rb
268
269
  - lib/seahorse/client/request_context.rb