aws-sdk-core 3.55.0 → 3.56.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: 35fc301b2d54946fbb64473461bf835ae42f11ac
4
- data.tar.gz: bb7569f74feeea2940f73288c7df7bfaa90dc918
3
+ metadata.gz: 0a8a0048127f628cedce7e7f6a2112b27a993025
4
+ data.tar.gz: fcb00df0c5e24c11c50ba000281b55e86385c7d4
5
5
  SHA512:
6
- metadata.gz: 4026f9de2f0dc6aaabbac1ddfac2d65222b2dd235f2363f2fd0f13a5dbf002dfc463ea64acd558a6251d608e55342e5383a8869392c7bf1d67eb8458abaed303
7
- data.tar.gz: 3c9ff329f84cc2d9007529273a3194c1aabe03343a87a700da0b797d2421076c39c0ddd3774d385c722486815fe82ab3abb14611cdb0ea35be90e53943492f89
6
+ metadata.gz: 6d1be2d3fa2386e2ad6c828789f77938a29a50f66c6968498eef6564d4e18265f19726d7c1cafff141cd3ed698ad9c5c2f78c8369ca307021d93dffc9d84d833
7
+ data.tar.gz: 950fb5cc7fffef99e3d15150ffd2bd3e32793c289ddba9b50d6cdcd47e84866b05417592d57342f5f672957ad7c7315ae7d8f6cffb401806cade6bde0c0a07ba
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.55.0
1
+ 3.56.0
@@ -6,8 +6,10 @@ module Aws
6
6
  # @api private
7
7
  class Publisher
8
8
  attr_reader :agent_port
9
+ attr_reader :agent_host
9
10
 
10
11
  def initialize(opts = {})
12
+ @agent_host = opts[:agent_host] || "127.0.0.1"
11
13
  @agent_port = opts[:agent_port]
12
14
  @mutex = Mutex.new
13
15
  end
@@ -18,6 +20,12 @@ module Aws
18
20
  end
19
21
  end
20
22
 
23
+ def agent_host=(value)
24
+ @mutex.synchronize do
25
+ @agent_host = value
26
+ end
27
+ end
28
+
21
29
  def publish(request_metrics)
22
30
  send_datagram(request_metrics.api_call.to_json)
23
31
  request_metrics.api_call_attempts.each do |attempt|
@@ -29,7 +37,7 @@ module Aws
29
37
  if @agent_port
30
38
  socket = UDPSocket.new
31
39
  begin
32
- socket.connect("127.0.0.1", @agent_port)
40
+ socket.connect(@agent_host, @agent_port)
33
41
  socket.send(msg, 0)
34
42
  rescue Errno::ECONNREFUSED
35
43
  # Drop on the floor
@@ -24,6 +24,16 @@ agent is running on, where client metrics will be published via UDP.
24
24
  resolve_client_side_monitoring_port(cfg)
25
25
  end
26
26
 
27
+ option(:client_side_monitoring_host,
28
+ default: "127.0.0.1",
29
+ doc_type: String,
30
+ docstring: <<-DOCS) do |cfg|
31
+ Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client
32
+ side monitoring agent is running on, where client metrics will be published via UDP.
33
+ DOCS
34
+ resolve_client_side_monitoring_host(cfg)
35
+ end
36
+
27
37
  option(:client_side_monitoring_publisher,
28
38
  default: ClientSideMonitoring::Publisher,
29
39
  doc_type: Aws::ClientSideMonitoring::Publisher,
@@ -49,6 +59,7 @@ all generated client side metrics. Defaults to an empty string.
49
59
  handlers.add(Handler, step: :initialize)
50
60
  publisher = config.client_side_monitoring_publisher
51
61
  publisher.agent_port = config.client_side_monitoring_port
62
+ publisher.agent_host = config.client_side_monitoring_host
52
63
  end
53
64
  end
54
65
 
@@ -70,6 +81,19 @@ all generated client side metrics. Defaults to an empty string.
70
81
  end
71
82
  end
72
83
 
84
+ def self.resolve_client_side_monitoring_host(cfg)
85
+ env_source = ENV["AWS_CSM_HOST"]
86
+ env_source = nil if env_source == ""
87
+ cfg_source = Aws.shared_config.csm_host(profile: cfg.profile)
88
+ if env_source
89
+ env_source
90
+ elsif cfg_source
91
+ cfg_source
92
+ else
93
+ "127.0.0.1"
94
+ end
95
+ end
96
+
73
97
  def self.resolve_client_side_monitoring(cfg)
74
98
  env_source = ENV["AWS_CSM_ENABLED"]
75
99
  env_source = nil if env_source == ""
@@ -193,6 +193,21 @@ module Aws
193
193
  end
194
194
  end
195
195
 
196
+ def csm_host(opts = {})
197
+ p = opts[:profile] || @profile_name
198
+ if @config_enabled
199
+ if @parsed_credentials
200
+ value = @parsed_credentials.fetch(p, {})["csm_host"]
201
+ end
202
+ if @parsed_config
203
+ value ||= @parsed_config.fetch(p, {})["csm_host"]
204
+ end
205
+ value
206
+ else
207
+ nil
208
+ end
209
+ end
210
+
196
211
  private
197
212
  def credentials_present?
198
213
  (@parsed_credentials && !@parsed_credentials.empty?) ||
@@ -40,6 +40,6 @@ require_relative 'aws-sdk-sts/customizations'
40
40
  # @service
41
41
  module Aws::STS
42
42
 
43
- GEM_VERSION = '3.55.0'
43
+ GEM_VERSION = '3.56.0'
44
44
 
45
45
  end
@@ -116,6 +116,10 @@ module Aws::STS
116
116
  # Allows you to provide an identifier for this client which will be attached to
117
117
  # all generated client side metrics. Defaults to an empty string.
118
118
  #
119
+ # @option options [String] :client_side_monitoring_host ("127.0.0.1")
120
+ # Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client
121
+ # side monitoring agent is running on, where client metrics will be published via UDP.
122
+ #
119
123
  # @option options [Integer] :client_side_monitoring_port (31000)
120
124
  # Required for publishing client metrics. The port that the client side monitoring
121
125
  # agent is running on, where client metrics will be published via UDP.
@@ -1730,7 +1734,7 @@ module Aws::STS
1730
1734
  params: params,
1731
1735
  config: config)
1732
1736
  context[:gem_name] = 'aws-sdk-core'
1733
- context[:gem_version] = '3.55.0'
1737
+ context[:gem_version] = '3.56.0'
1734
1738
  Seahorse::Client::Request.new(handlers, context)
1735
1739
  end
1736
1740
 
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.55.0
4
+ version: 3.56.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-06-14 00:00:00.000000000 Z
11
+ date: 2019-06-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jmespath