aws-sdk-cloudtrail 1.85.0 → 1.92.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +35 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-cloudtrail/client.rb +114 -47
- data/lib/aws-sdk-cloudtrail/client_api.rb +1 -0
- data/lib/aws-sdk-cloudtrail/endpoints.rb +49 -196
- data/lib/aws-sdk-cloudtrail/plugins/endpoints.rb +18 -6
- data/lib/aws-sdk-cloudtrail/types.rb +207 -565
- data/lib/aws-sdk-cloudtrail.rb +15 -11
- data/sig/client.rbs +2 -0
- data/sig/resource.rbs +2 -0
- metadata +4 -4
@@ -15,11 +15,11 @@ module Aws::CloudTrail
|
|
15
15
|
:endpoint_provider,
|
16
16
|
doc_type: 'Aws::CloudTrail::EndpointProvider',
|
17
17
|
rbs_type: 'untyped',
|
18
|
-
docstring:
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
18
|
+
docstring: <<~DOCS) do |_cfg|
|
19
|
+
The endpoint provider used to resolve endpoints. Any object that responds to
|
20
|
+
`#resolve_endpoint(parameters)` where `parameters` is a Struct similar to
|
21
|
+
`Aws::CloudTrail::EndpointParameters`.
|
22
|
+
DOCS
|
23
23
|
Aws::CloudTrail::EndpointProvider.new
|
24
24
|
end
|
25
25
|
|
@@ -40,11 +40,23 @@ module Aws::CloudTrail
|
|
40
40
|
context[:auth_scheme] =
|
41
41
|
Aws::Endpoints.resolve_auth_scheme(context, endpoint)
|
42
42
|
|
43
|
-
@handler.call(context)
|
43
|
+
with_metrics(context) { @handler.call(context) }
|
44
44
|
end
|
45
45
|
|
46
46
|
private
|
47
47
|
|
48
|
+
def with_metrics(context, &block)
|
49
|
+
metrics = []
|
50
|
+
metrics << 'ENDPOINT_OVERRIDE' unless context.config.regional_endpoint
|
51
|
+
if context[:auth_scheme] && context[:auth_scheme]['name'] == 'sigv4a'
|
52
|
+
metrics << 'SIGV4A_SIGNING'
|
53
|
+
end
|
54
|
+
if context.config.credentials&.credentials&.account_id
|
55
|
+
metrics << 'RESOLVED_ACCOUNT_ID'
|
56
|
+
end
|
57
|
+
Aws::Plugins::UserAgent.metric(*metrics, &block)
|
58
|
+
end
|
59
|
+
|
48
60
|
def apply_endpoint_headers(context, headers)
|
49
61
|
headers.each do |key, values|
|
50
62
|
value = values
|