aws-sdk-core 3.102.0 → 3.104.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/log/param_filter.rb +3 -3
- data/lib/aws-sdk-core/pageable_response.rb +8 -6
- data/lib/aws-sdk-core/plugins/api_key.rb +3 -1
- data/lib/aws-sdk-core/plugins/stub_responses.rb +2 -0
- data/lib/aws-sdk-sts.rb +1 -1
- data/lib/aws-sdk-sts/client.rb +1 -1
- data/lib/seahorse.rb +1 -0
- data/lib/seahorse/client/base.rb +1 -0
- data/lib/seahorse/client/block_io.rb +3 -2
- data/lib/seahorse/client/http/response.rb +1 -1
- data/lib/seahorse/client/plugins/request_callback.rb +110 -0
- data/lib/seahorse/client/plugins/response_target.rb +6 -7
- data/lib/seahorse/client/request_context.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 70a6905bf06dee70851564691ecbfd4df7e750c087d302c2c32c711c6d628c2e
|
4
|
+
data.tar.gz: 7a895028e693d8ec2b65930b212e2e83ff3edccce7f3cd594df31208d00e9796
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a3c29b11ac10b61679545cb7c133b272f25f7717d8cbb935e85272ad588c77b8db61483e24f6d9624676704fc04db8c4c280e6d89f6399bd38816d3184a4172
|
7
|
+
data.tar.gz: 673a1eb3b3a33e181426f5585117834c9c69ee4226adcae4b5c9c05e9d8e59d8311d26befcadc0d6acba21de01d762557862ac88bc5124a67e763000e1abd40d
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.
|
1
|
+
3.104.1
|
@@ -6,9 +6,9 @@ require 'set'
|
|
6
6
|
module Aws
|
7
7
|
module Log
|
8
8
|
class ParamFilter
|
9
|
-
# DEPRECATED -
|
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, :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, :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, :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.
|
8
|
-
# inconsistent number of responses per page.
|
9
|
-
# the `next_page?` method or using enumerable methods such as `each`
|
10
|
-
#
|
11
|
-
#
|
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
|
-
|
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
|
|
data/lib/aws-sdk-sts.rb
CHANGED
data/lib/aws-sdk-sts/client.rb
CHANGED
@@ -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.
|
2192
|
+
context[:gem_version] = '3.104.1'
|
2193
2193
|
Seahorse::Client::Request.new(handlers, context)
|
2194
2194
|
end
|
2195
2195
|
|
data/lib/seahorse.rb
CHANGED
@@ -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
|
|
data/lib/seahorse/client/base.rb
CHANGED
@@ -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
|
@@ -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
|
-
|
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 =
|
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
|
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.
|
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-
|
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
|