aws-sdk-core 3.51.0 → 3.52.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: bae23abccbe717b9ab14dd9177806e877d9536cf
4
- data.tar.gz: c1f807ed12fdc2040c83049b053f5db6cecc4f5e
3
+ metadata.gz: 01b5ed8216df81feb40c1a17ea7fd0e096bf5ae9
4
+ data.tar.gz: 96c2d0598a107536dab4e1038828d093e82cb0ee
5
5
  SHA512:
6
- metadata.gz: 3b7b9f34e7a03085ea4c0177cf98165e73e4bb7d75c00324f802582c116af9a611d2a0138879470f3fb1a8313b484ee525a77e3d0ffee165000dae5eec6cd23e
7
- data.tar.gz: c76c357125d112841a879b44bc5865e351b9dbf7f9de3e97a38fba0bd4e8b1fd2f725067ec6a47383b434702c8a652c4980191572527d87773ed44d1a62b0f5d
6
+ metadata.gz: 529ba5e1d1ead711cc0a0ad24eb735804fd3f28e9e5085b85a66a7de1c6150276b60fe727ca9206cc016c3028492a4a95574d7c140fe572faa05b1916b7b125b
7
+ data.tar.gz: 77e9b78f97a6e73a01da06a69f1ea01b186baf2ad752aa9d1a3ffb14dc88cd56f6a82a9c67826a503010ec032d867cc0a5b8d48c113f4ed93af9976c9617a36c
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.51.0
1
+ 3.52.0
@@ -34,6 +34,15 @@ module Aws
34
34
  end
35
35
  end
36
36
 
37
+ # Raised when a `streaming` operation has `requiresLength` trait
38
+ # enabled but request payload size/length cannot be calculated
39
+ class MissingContentLength < RuntimeError
40
+ def initialize(*args)
41
+ msg = 'Required `Content-Length` value missing for the request.'
42
+ super(msg)
43
+ end
44
+ end
45
+
37
46
  # Rasied when endpoint discovery failed for operations
38
47
  # that requires endpoints from endpoint discovery
39
48
  class EndpointDiscoveryError < RuntimeError
@@ -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, :body, :bot_configuration, :cause, :client_id, :client_secret, :configuration, :copy_source_sse_customer_key, :credentials, :custom_attributes, :db_password, :default_phone_number, :definition, :description, :display_name, :e164_phone_number, :email, :email_address, :email_message, :embed_url, :error, :feedback_token, :file, :first_name, :id, :id_token, :input, :input_text, :key_id, :key_store_password, :kms_key_id, :kms_master_key_id, :last_name, :local_console_password, :master_account_email, :master_user_password, :message, :name, :new_password, :notes, :old_password, :output, :owner_information, :parameters, :passphrase, :password, :payload, :phone_number, :plaintext, :previous_password, :primary_email, :primary_provisioned_number, :private_key, :proposed_password, :public_key, :qr_code_png, :query, :recovery_point_tags, :refresh_token, :registrant_contact, :request_attributes, :search_query, :secret_access_key, :secret_binary, :secret_code, :secret_hash, :secret_string, :service_password, :session_attributes, :share_notes, :shared_secret, :slots, :sse_customer_key, :ssekms_key_id, :status_message, :tag_key_list, :tags, :task_parameters, :tech_contact, :temporary_password, :text, :token, :trust_password, :upload_credentials, :upload_url, :user_email, :user_name, :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, :body, :bot_configuration, :bot_email, :cause, :client_id, :client_secret, :configuration, :copy_source_sse_customer_key, :credentials, :custom_attributes, :db_password, :default_phone_number, :definition, :description, :display_name, :e164_phone_number, :email, :email_address, :email_message, :embed_url, :error, :feedback_token, :file, :first_name, :id, :id_token, :input, :input_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, :notes, :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, :proposed_password, :public_key, :qr_code_png, :query, :recovery_point_tags, :refresh_token, :registrant_contact, :request_attributes, :search_query, :secret_access_key, :secret_binary, :secret_code, :secret_hash, :secret_string, :security_token, :service_password, :session_attributes, :share_notes, :shared_secret, :slots, :sse_customer_key, :ssekms_key_id, :status_message, :tag_key_list, :tags, :task_parameters, :tech_contact, :temporary_password, :text, :token, :trust_password, :upload_credentials, :upload_url, :user_email, :user_name, :username, :value, :values, :variables, :zip_file]
15
15
  # end
16
16
 
17
17
  def initialize(options = {})
@@ -0,0 +1,53 @@
1
+ module Aws
2
+ module Plugins
3
+
4
+ # For Streaming Input Operations, when `requiresLength` is enabled
5
+ # checking whether `Content-Length` header can be set,
6
+ # for `v4-unsigned-body` operations, set `Transfer-Encoding` header
7
+ class TransferEncoding < Seahorse::Client::Plugin
8
+
9
+ # @api private
10
+ class Handler < Seahorse::Client::Handler
11
+
12
+ def call(context)
13
+ if streaming?(context.operation.input)
14
+ begin
15
+ context.http_request.body.size
16
+ rescue
17
+ if requires_length?(context.operation.input)
18
+ # if size of the IO is not available but required
19
+ raise Aws::Errors::MissingContentLength.new
20
+ elsif context.operation['authtype'] == "v4-unsigned-body"
21
+ context.http_request.headers['Transfer-Encoding'] = 'chunked'
22
+ end
23
+ end
24
+ end
25
+
26
+ @handler.call(context)
27
+ end
28
+
29
+ private
30
+
31
+ def streaming?(ref)
32
+ if payload = ref[:payload_member]
33
+ payload["streaming"] || # checking ref and shape
34
+ payload.shape["streaming"]
35
+ else
36
+ false
37
+ end
38
+ end
39
+
40
+ def requires_length?(ref)
41
+ payload = ref[:payload_member]
42
+ payload["requiresLength"] || # checking ref and shape
43
+ payload.shape["requiresLength"]
44
+ end
45
+
46
+ end
47
+
48
+ handler(Handler, step: :sign)
49
+
50
+ end
51
+
52
+ end
53
+ end
@@ -40,6 +40,6 @@ require_relative 'aws-sdk-sts/customizations'
40
40
  # @service
41
41
  module Aws::STS
42
42
 
43
- GEM_VERSION = '3.51.0'
43
+ GEM_VERSION = '3.52.0'
44
44
 
45
45
  end
@@ -23,6 +23,7 @@ require 'aws-sdk-core/plugins/idempotency_token.rb'
23
23
  require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
24
24
  require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
25
25
  require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
26
+ require 'aws-sdk-core/plugins/transfer_encoding.rb'
26
27
  require 'aws-sdk-core/plugins/signature_v4.rb'
27
28
  require 'aws-sdk-core/plugins/protocols/query.rb'
28
29
 
@@ -55,6 +56,7 @@ module Aws::STS
55
56
  add_plugin(Aws::Plugins::JsonvalueConverter)
56
57
  add_plugin(Aws::Plugins::ClientMetricsPlugin)
57
58
  add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
59
+ add_plugin(Aws::Plugins::TransferEncoding)
58
60
  add_plugin(Aws::Plugins::SignatureV4)
59
61
  add_plugin(Aws::Plugins::Protocols::Query)
60
62
 
@@ -1734,7 +1736,7 @@ module Aws::STS
1734
1736
  params: params,
1735
1737
  config: config)
1736
1738
  context[:gem_name] = 'aws-sdk-core'
1737
- context[:gem_version] = '3.51.0'
1739
+ context[:gem_version] = '3.52.0'
1738
1740
  Seahorse::Client::Request.new(handlers, context)
1739
1741
  end
1740
1742
 
@@ -7,8 +7,13 @@ module Seahorse
7
7
  class Handler < Client::Handler
8
8
 
9
9
  def call(context)
10
- length = context.http_request.body.size
11
- context.http_request.headers['Content-Length'] = length
10
+ begin
11
+ length = context.http_request.body.size
12
+ context.http_request.headers['Content-Length'] = length
13
+ rescue
14
+ # allowing `Content-Length` failed to be set
15
+ # see Aws::Plugins::TransferEncoding
16
+ end
12
17
  @handler.call(context)
13
18
  end
14
19
 
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.51.0
4
+ version: 3.52.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-05-10 00:00:00.000000000 Z
11
+ date: 2019-05-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jmespath
@@ -150,6 +150,7 @@ files:
150
150
  - lib/aws-sdk-core/plugins/signature_v2.rb
151
151
  - lib/aws-sdk-core/plugins/signature_v4.rb
152
152
  - lib/aws-sdk-core/plugins/stub_responses.rb
153
+ - lib/aws-sdk-core/plugins/transfer_encoding.rb
153
154
  - lib/aws-sdk-core/plugins/user_agent.rb
154
155
  - lib/aws-sdk-core/process_credentials.rb
155
156
  - lib/aws-sdk-core/query.rb