aws-sdk-core 3.44.2 → 3.45.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: 6a0a473b01cf3a0b146f109af28816fa8651a7b3
4
- data.tar.gz: 8c22a15e4ca2721cf01f80bc47b300bfd2bda311
3
+ metadata.gz: e3a45fb10660ea2a61622b8fc1f7db6264ea8bff
4
+ data.tar.gz: 831116958eb363581b800d0fbef431952a5d847d
5
5
  SHA512:
6
- metadata.gz: d99679d6802516b740f9bfa1034d49352e7ef7d3e30a32f91874da2f9cf2006e6005fe866040f5d7797267b7f778d2023469f59467742229d7d03b79c2dffee1
7
- data.tar.gz: 983c5511c2f47103c44a4e1909ad755f508860238cfb5c30b7c7e607b9c2844a95470d08bd76238843cfce70d6449c2e66071761d6756f292df4f7033662fc21
6
+ metadata.gz: d69c1b8798af9f8be650489edf7795a9824559248c6d5ed24982aae2333b31f657b76292ccbba236e4665ae218f32e10fb325b9d60efb69c7e65359375e94d3d
7
+ data.tar.gz: e8acf8b9e9900098824e8d0dbccc0eb3381b8b58fcde50afa769afa72f54d8a2ed07d679e3363066a9b193ca5cf166e9459b925ecbf7e9eaa28a8ba6a3dcad75
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.44.2
1
+ 3.45.0
@@ -83,6 +83,7 @@ module Aws
83
83
  @final_aws_exception_message = opts[:final_aws_exception_message]
84
84
  @final_sdk_exception = opts[:final_sdk_exception]
85
85
  @final_sdk_exception_message = opts[:final_sdk_exception_message]
86
+ @region = opts[:region] if opts[:region] # in case region changes
86
87
  end
87
88
 
88
89
  def to_json(*a)
@@ -121,11 +122,11 @@ module Aws
121
122
  end
122
123
 
123
124
  class ApiCallAttempt
124
- attr_reader :service, :api, :client_id, :version, :timestamp, :fqdn,
125
- :region, :user_agent, :access_key, :session_token
126
- attr_accessor :request_latency, :http_status_code, :aws_exception_msg,
127
- :x_amz_request_id, :x_amz_id_2, :x_amzn_request_id, :sdk_exception,
128
- :aws_exception, :sdk_exception_msg
125
+ attr_reader :service, :api, :client_id, :version, :timestamp,
126
+ :user_agent, :access_key, :session_token
127
+ attr_accessor :region, :fqdn, :request_latency, :http_status_code,
128
+ :aws_exception_msg, :x_amz_request_id, :x_amz_id_2,
129
+ :x_amzn_request_id, :sdk_exception, :aws_exception, :sdk_exception_msg
129
130
 
130
131
  def initialize(
131
132
  service,
@@ -149,7 +149,7 @@ all generated client side metrics. Defaults to an empty string.
149
149
  raise e
150
150
  ensure
151
151
  end_time = Aws::Util.monotonic_milliseconds
152
- request_metrics.api_call.complete(
152
+ complete_opts = {
153
153
  latency: end_time - start_time,
154
154
  attempt_count: context.retries + 1,
155
155
  user_agent: context.http_request.headers["user-agent"],
@@ -158,8 +158,12 @@ all generated client side metrics. Defaults to an empty string.
158
158
  final_aws_exception: final_aws_exception,
159
159
  final_aws_exception_message: final_aws_exception_message,
160
160
  final_sdk_exception: final_sdk_exception,
161
- final_sdk_exception_message: final_sdk_exception_message,
162
- )
161
+ final_sdk_exception_message: final_sdk_exception_message
162
+ }
163
+ if context.metadata[:redirect_region]
164
+ complete_opts[:region] = context.metadata[:redirect_region]
165
+ end
166
+ request_metrics.api_call.complete(complete_opts)
163
167
  # Report the metrics by passing the complete RequestMetrics object
164
168
  if publisher
165
169
  publisher.publish(request_metrics)
@@ -7,7 +7,8 @@ module Aws
7
7
  def add_handlers(handlers, config)
8
8
  if config.client_side_monitoring && config.client_side_monitoring_port
9
9
  # AttemptHandler comes just before we would retry an error.
10
- handlers.add(AttemptHandler, step: :sign, priority: 95)
10
+ # Or before we would follow redirects.
11
+ handlers.add(AttemptHandler, step: :sign, priority: 39)
11
12
  # LatencyHandler is as close to sending as possible.
12
13
  handlers.add(LatencyHandler, step: :sign, priority: 0)
13
14
  end
@@ -45,6 +46,9 @@ module Aws
45
46
  context.metadata[:current_call_attempt] = call_attempt
46
47
 
47
48
  resp = @handler.call(context)
49
+ if context.metadata[:redirect_region]
50
+ call_attempt.region = context.metadata[:redirect_region]
51
+ end
48
52
  headers = context.http_response.headers
49
53
  if headers.include?("x-amz-id-2")
50
54
  call_attempt.x_amz_id_2 = headers["x-amz-id-2"]
@@ -27,7 +27,12 @@ module Aws
27
27
  build_request(context)
28
28
  @handler.call(context).on_success do |response|
29
29
  response.error = nil
30
- response.data = parse_xml(context) || EmptyStructure.new
30
+ parsed = parse_xml(context)
31
+ if parsed.nil? || parsed == EmptyStructure
32
+ response.data = EmptyStructure.new
33
+ else
34
+ response.data = parsed
35
+ end
31
36
  end
32
37
  end
33
38
 
@@ -40,6 +40,6 @@ require_relative 'aws-sdk-sts/customizations'
40
40
  # @service
41
41
  module Aws::STS
42
42
 
43
- GEM_VERSION = '3.44.2'
43
+ GEM_VERSION = '3.45.0'
44
44
 
45
45
  end
@@ -1535,7 +1535,7 @@ module Aws::STS
1535
1535
  params: params,
1536
1536
  config: config)
1537
1537
  context[:gem_name] = 'aws-sdk-core'
1538
- context[:gem_version] = '3.44.2'
1538
+ context[:gem_version] = '3.45.0'
1539
1539
  Seahorse::Client::Request.new(handlers, context)
1540
1540
  end
1541
1541
 
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.44.2
4
+ version: 3.45.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-01-04 00:00:00.000000000 Z
11
+ date: 2019-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jmespath