aws-sdk-core 3.38.0 → 3.39.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: 249b601b8635418baadc15a0b53bb46b581e8e6e
4
- data.tar.gz: ee9d843a0cfba8c0b49e312d7abd1f2709f19185
3
+ metadata.gz: 170c5072c882998ecf8c01d181d0c4d987101463
4
+ data.tar.gz: 71a98bb06e800d2bc77866e322330944a5e7417b
5
5
  SHA512:
6
- metadata.gz: b7542113a88f574c566934fd2f532b41f09eb720d08241aa79e4c8ef2c3588aa97775de244a4c4d1d995b3405a34dee3bdebf0a1c7725415a8b04d522cb4062a
7
- data.tar.gz: 5fa727c3d43d58a7773525e10125875ca366499460bdf7f7bbc9d2f3b4af16248d7b986957553ed4ef89696b228088450f233148f1644708cd0ccd2e116ee8eb
6
+ metadata.gz: 2dc2097e0b07c58e0ca5154970be40eb0d02e1b5bc413b92974aa58683dedecf8adea762c58f29be16b7bca31704c1973e30c3991f554e79bf209992c06a5f11
7
+ data.tar.gz: 86492dd225866778c8045ede1bd9a6a5b0bc6fe4b49be1016469583f2a0f738c3e37186ec02f4c5ba521072b755e54928b1a7ef375a6e165cf7a645383be57de
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.38.0
1
+ 3.39.0
@@ -44,6 +44,20 @@ module Aws
44
44
  end
45
45
  end
46
46
 
47
+ # raised when hostLabel member is not provided
48
+ # at operation input when endpoint trait is available
49
+ # with 'hostPrefix' requirement
50
+ class MissingEndpointHostLabelValue < RuntimeError
51
+
52
+ def initialize(name)
53
+ msg = "Missing required parameter #{name} to construct"\
54
+ " endpoint host prefix. You can disable host prefix by"\
55
+ " setting :disable_host_prefix_injection to `true`."
56
+ super(msg)
57
+ end
58
+
59
+ end
60
+
47
61
  # Raised when EventStream Parser failed to parse
48
62
  # a raw event message
49
63
  class EventStreamParserError < RuntimeError; end
@@ -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, :artifact_credentials, :auth_code, :authentication_token, :authorization_result, :base_32_string_seed, :body, :bot_configuration, :client_id, :client_secret, :configuration, :copy_source_sse_customer_key, :credentials, :custom_attributes, :db_password, :description, :display_name, :email, :email_address, :email_message, :feedback_token, :first_name, :id, :id_token, :input, :input_text, :key_id, :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, :owner_information, :parameters, :passphrase, :password, :payload, :plaintext, :previous_password, :primary_email, :private_key, :proposed_password, :public_key, :qr_code_png, :query, :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, :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, :artifact_credentials, :auth_code, :authentication_token, :authorization_result, :base_32_string_seed, :body, :bot_configuration, :client_id, :client_secret, :configuration, :copy_source_sse_customer_key, :credentials, :custom_attributes, :db_password, :description, :display_name, :email, :email_address, :email_message, :embed_url, :feedback_token, :first_name, :id, :id_token, :input, :input_text, :key_id, :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, :owner_information, :parameters, :passphrase, :password, :payload, :plaintext, :previous_password, :primary_email, :private_key, :proposed_password, :public_key, :qr_code_png, :query, :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, :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,63 @@
1
+ module Aws
2
+ module Plugins
3
+ # @api private
4
+ class EndpointPattern < Seahorse::Client::Plugin
5
+
6
+ option(:disable_host_prefix_injection,
7
+ default: false,
8
+ doc_type: 'Boolean',
9
+ docstring: <<-DOCS
10
+ Set to true to disable SDK automatically adding host prefix
11
+ to default service endpoint when available.
12
+ DOCS
13
+ )
14
+
15
+ def add_handlers(handlers, config)
16
+ if config.regional_endpoint && !config.disable_host_prefix_injection
17
+ handlers.add(Handler, priority: 90)
18
+ end
19
+ end
20
+
21
+ class Handler < Seahorse::Client::Handler
22
+
23
+ def call(context)
24
+ endpoint_trait = context.operation.endpoint_pattern
25
+ if endpoint_trait && !endpoint_trait.empty?
26
+ _apply_endpoint_trait(context, endpoint_trait)
27
+ end
28
+ @handler.call(context)
29
+ end
30
+
31
+ private
32
+
33
+ def _apply_endpoint_trait(context, trait)
34
+ # currently only support host pattern
35
+ ori_host = context.http_request.endpoint.host
36
+ if pattern = trait['hostPrefix']
37
+ host_prefix = pattern.gsub(/\{.+?\}/) do |label|
38
+ label = label.delete("{}")
39
+ _replace_label_value(
40
+ ori_host, label, context.operation.input, context.params)
41
+ end
42
+ context.http_request.endpoint.host = host_prefix + context.http_request.endpoint.host
43
+ end
44
+ end
45
+
46
+ def _replace_label_value(ori, label, input_ref, params)
47
+ name = nil
48
+ input_ref.shape.members.each do |m_name, ref|
49
+ if ref['hostLabel'] && ref['hostLabelName'] == label
50
+ name = m_name
51
+ end
52
+ end
53
+ if name.nil? || params[name].nil?
54
+ raise Errors::MissingEndpointHostLabelValue.new(name)
55
+ end
56
+ params[name]
57
+ end
58
+
59
+ end
60
+
61
+ end
62
+ end
63
+ 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.38.0'
43
+ GEM_VERSION = '3.39.0'
44
44
 
45
45
  end
@@ -16,6 +16,7 @@ require 'aws-sdk-core/plugins/retry_errors.rb'
16
16
  require 'aws-sdk-core/plugins/global_configuration.rb'
17
17
  require 'aws-sdk-core/plugins/regional_endpoint.rb'
18
18
  require 'aws-sdk-core/plugins/endpoint_discovery.rb'
19
+ require 'aws-sdk-core/plugins/endpoint_pattern.rb'
19
20
  require 'aws-sdk-core/plugins/response_paging.rb'
20
21
  require 'aws-sdk-core/plugins/stub_responses.rb'
21
22
  require 'aws-sdk-core/plugins/idempotency_token.rb'
@@ -47,6 +48,7 @@ module Aws::STS
47
48
  add_plugin(Aws::Plugins::GlobalConfiguration)
48
49
  add_plugin(Aws::Plugins::RegionalEndpoint)
49
50
  add_plugin(Aws::Plugins::EndpointDiscovery)
51
+ add_plugin(Aws::Plugins::EndpointPattern)
50
52
  add_plugin(Aws::Plugins::ResponsePaging)
51
53
  add_plugin(Aws::Plugins::StubResponses)
52
54
  add_plugin(Aws::Plugins::IdempotencyToken)
@@ -124,6 +126,10 @@ module Aws::STS
124
126
  # When `true`, an attempt is made to coerce request parameters into
125
127
  # the required types.
126
128
  #
129
+ # @option options [Boolean] :disable_host_prefix_injection (false)
130
+ # Set to true to disable SDK automatically adding host prefix
131
+ # to default service endpoint when available.
132
+ #
127
133
  # @option options [String] :endpoint
128
134
  # The client endpoint is normally constructed from the `:region`
129
135
  # option. You should only configure an `:endpoint` when connecting
@@ -1529,7 +1535,7 @@ module Aws::STS
1529
1535
  params: params,
1530
1536
  config: config)
1531
1537
  context[:gem_name] = 'aws-sdk-core'
1532
- context[:gem_version] = '3.38.0'
1538
+ context[:gem_version] = '3.39.0'
1533
1539
  Seahorse::Client::Request.new(handlers, context)
1534
1540
  end
1535
1541
 
@@ -31,6 +31,9 @@ module Seahorse
31
31
  # @return [String, nil]
32
32
  attr_accessor :documentation
33
33
 
34
+ # @return [Hash, nil]
35
+ attr_accessor :endpoint_pattern
36
+
34
37
  # @return [String, nil]
35
38
  attr_accessor :authorizer
36
39
 
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.38.0
4
+ version: 3.39.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: 2018-11-12 00:00:00.000000000 Z
11
+ date: 2018-11-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jmespath
@@ -118,6 +118,7 @@ files:
118
118
  - lib/aws-sdk-core/plugins/client_metrics_send_plugin.rb
119
119
  - lib/aws-sdk-core/plugins/credentials_configuration.rb
120
120
  - lib/aws-sdk-core/plugins/endpoint_discovery.rb
121
+ - lib/aws-sdk-core/plugins/endpoint_pattern.rb
121
122
  - lib/aws-sdk-core/plugins/event_stream_configuration.rb
122
123
  - lib/aws-sdk-core/plugins/global_configuration.rb
123
124
  - lib/aws-sdk-core/plugins/helpful_socket_errors.rb