aws-sdk-cloudwatch 1.67.0 → 1.69.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-cloudwatch/client.rb +62 -21
- data/lib/aws-sdk-cloudwatch/client_api.rb +7 -0
- data/lib/aws-sdk-cloudwatch/endpoint_parameters.rb +66 -0
- data/lib/aws-sdk-cloudwatch/endpoint_provider.rb +117 -0
- data/lib/aws-sdk-cloudwatch/endpoints.rb +547 -0
- data/lib/aws-sdk-cloudwatch/plugins/endpoints.rb +144 -0
- data/lib/aws-sdk-cloudwatch/resource.rb +12 -0
- data/lib/aws-sdk-cloudwatch/types.rb +54 -22
- data/lib/aws-sdk-cloudwatch.rb +5 -1
- metadata +8 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f87924964c2cfaf2682c68eaee5b97e974cac3c6ed450071ba31e5513a636a28
|
4
|
+
data.tar.gz: 0cf2c4d9f1287382c7bff3f63e63e523abeb5c9beeb3074e46463ecbe3b0da4f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a33ba6949fea82d1387a8a4ac41e1c0eda31119fb7cc72be5cb12c8bacc8b834a92c3be40c91e8a1e06f47fa7428f988eaaecf43950e7da7f5c2d20eddf77cdc
|
7
|
+
data.tar.gz: ad59c5669328545e20fcfd1a666a98085a0666ef4ff48146045f42b13b3e226e944b0a0e3c24222465b672bb219b4b4e69fab1e5093b3ca964d1ac5d480d9468
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,16 @@
|
|
1
1
|
Unreleased Changes
|
2
2
|
------------------
|
3
3
|
|
4
|
+
1.69.0 (2022-11-28)
|
5
|
+
------------------
|
6
|
+
|
7
|
+
* Feature - Adds cross-account support to the GetMetricData API. Adds cross-account support to the ListMetrics API through the usage of the IncludeLinkedAccounts flag and the new OwningAccounts field.
|
8
|
+
|
9
|
+
1.68.0 (2022-10-25)
|
10
|
+
------------------
|
11
|
+
|
12
|
+
* Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
|
13
|
+
|
4
14
|
1.67.0 (2022-08-18)
|
5
15
|
------------------
|
6
16
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.69.0
|
@@ -30,7 +30,7 @@ require 'aws-sdk-core/plugins/http_checksum.rb'
|
|
30
30
|
require 'aws-sdk-core/plugins/checksum_algorithm.rb'
|
31
31
|
require 'aws-sdk-core/plugins/defaults_mode.rb'
|
32
32
|
require 'aws-sdk-core/plugins/recursion_detection.rb'
|
33
|
-
require 'aws-sdk-core/plugins/
|
33
|
+
require 'aws-sdk-core/plugins/sign.rb'
|
34
34
|
require 'aws-sdk-core/plugins/protocols/query.rb'
|
35
35
|
|
36
36
|
Aws::Plugins::GlobalConfiguration.add_identifier(:cloudwatch)
|
@@ -79,8 +79,9 @@ module Aws::CloudWatch
|
|
79
79
|
add_plugin(Aws::Plugins::ChecksumAlgorithm)
|
80
80
|
add_plugin(Aws::Plugins::DefaultsMode)
|
81
81
|
add_plugin(Aws::Plugins::RecursionDetection)
|
82
|
-
add_plugin(Aws::Plugins::
|
82
|
+
add_plugin(Aws::Plugins::Sign)
|
83
83
|
add_plugin(Aws::Plugins::Protocols::Query)
|
84
|
+
add_plugin(Aws::CloudWatch::Plugins::Endpoints)
|
84
85
|
|
85
86
|
# @overload initialize(options)
|
86
87
|
# @param [Hash] options
|
@@ -287,6 +288,19 @@ module Aws::CloudWatch
|
|
287
288
|
# ** Please note ** When response stubbing is enabled, no HTTP
|
288
289
|
# requests are made, and retries are disabled.
|
289
290
|
#
|
291
|
+
# @option options [Aws::TokenProvider] :token_provider
|
292
|
+
# A Bearer Token Provider. This can be an instance of any one of the
|
293
|
+
# following classes:
|
294
|
+
#
|
295
|
+
# * `Aws::StaticTokenProvider` - Used for configuring static, non-refreshing
|
296
|
+
# tokens.
|
297
|
+
#
|
298
|
+
# * `Aws::SSOTokenProvider` - Used for loading tokens from AWS SSO using an
|
299
|
+
# access token generated from `aws login`.
|
300
|
+
#
|
301
|
+
# When `:token_provider` is not configured directly, the `Aws::TokenProviderChain`
|
302
|
+
# will be used to search for tokens configured for your profile in shared configuration files.
|
303
|
+
#
|
290
304
|
# @option options [Boolean] :use_dualstack_endpoint
|
291
305
|
# When set to `true`, dualstack enabled endpoints (with `.aws` TLD)
|
292
306
|
# will be used if available.
|
@@ -300,6 +314,9 @@ module Aws::CloudWatch
|
|
300
314
|
# When `true`, request parameters are validated before
|
301
315
|
# sending the request.
|
302
316
|
#
|
317
|
+
# @option options [Aws::CloudWatch::EndpointProvider] :endpoint_provider
|
318
|
+
# The endpoint provider used to resolve endpoints. Any object that responds to `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to `Aws::CloudWatch::EndpointParameters`
|
319
|
+
#
|
303
320
|
# @option options [URI::HTTP,String] :http_proxy A proxy to send
|
304
321
|
# requests through. Formatted like 'http://proxy.com:123'.
|
305
322
|
#
|
@@ -370,7 +387,7 @@ module Aws::CloudWatch
|
|
370
387
|
# the rule of one of the composite alarms in the cycle to remove a
|
371
388
|
# dependency that creates the cycle. The simplest change to make to
|
372
389
|
# break a cycle is to change the `AlarmRule` of one of the alarms to
|
373
|
-
# `
|
390
|
+
# `false`.
|
374
391
|
#
|
375
392
|
# Additionally, the evaluation of composite alarms stops if CloudWatch
|
376
393
|
# detects a cycle in the evaluation path.
|
@@ -1663,7 +1680,7 @@ module Aws::CloudWatch
|
|
1663
1680
|
# resp.metric_data_results[0].timestamps[0] #=> Time
|
1664
1681
|
# resp.metric_data_results[0].values #=> Array
|
1665
1682
|
# resp.metric_data_results[0].values[0] #=> Float
|
1666
|
-
# resp.metric_data_results[0].status_code #=> String, one of "Complete", "InternalError", "PartialData"
|
1683
|
+
# resp.metric_data_results[0].status_code #=> String, one of "Complete", "InternalError", "PartialData", "Forbidden"
|
1667
1684
|
# resp.metric_data_results[0].messages #=> Array
|
1668
1685
|
# resp.metric_data_results[0].messages[0].code #=> String
|
1669
1686
|
# resp.metric_data_results[0].messages[0].value #=> String
|
@@ -2187,15 +2204,20 @@ module Aws::CloudWatch
|
|
2187
2204
|
end
|
2188
2205
|
|
2189
2206
|
# List the specified metrics. You can use the returned metrics with
|
2190
|
-
# [GetMetricData][1] or [GetMetricStatistics][2] to
|
2207
|
+
# [GetMetricData][1] or [GetMetricStatistics][2] to get statistical
|
2191
2208
|
# data.
|
2192
2209
|
#
|
2193
2210
|
# Up to 500 results are returned for any one call. To retrieve
|
2194
2211
|
# additional results, use the returned token with subsequent calls.
|
2195
2212
|
#
|
2196
|
-
# After you create a metric, allow up to 15 minutes
|
2197
|
-
#
|
2198
|
-
# [
|
2213
|
+
# After you create a metric, allow up to 15 minutes for the metric to
|
2214
|
+
# appear. To see metric statistics sooner, use [GetMetricData][1] or
|
2215
|
+
# [GetMetricStatistics][2].
|
2216
|
+
#
|
2217
|
+
# If you are using CloudWatch cross-account observability, you can use
|
2218
|
+
# this operation in a monitoring account and view metrics from the
|
2219
|
+
# linked source accounts. For more information, see [CloudWatch
|
2220
|
+
# cross-account observability][3].
|
2199
2221
|
#
|
2200
2222
|
# `ListMetrics` doesn't return information about metrics if those
|
2201
2223
|
# metrics haven't reported data in the past two weeks. To retrieve
|
@@ -2205,6 +2227,7 @@ module Aws::CloudWatch
|
|
2205
2227
|
#
|
2206
2228
|
# [1]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricData.html
|
2207
2229
|
# [2]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricStatistics.html
|
2230
|
+
# [3]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html
|
2208
2231
|
#
|
2209
2232
|
# @option params [String] :namespace
|
2210
2233
|
# The metric namespace to filter against. Only the namespace that
|
@@ -2232,10 +2255,23 @@ module Aws::CloudWatch
|
|
2232
2255
|
# metrics with last published data as much as 40 minutes more than the
|
2233
2256
|
# specified time interval.
|
2234
2257
|
#
|
2258
|
+
# @option params [Boolean] :include_linked_accounts
|
2259
|
+
# If you are using this operation in a monitoring account, specify
|
2260
|
+
# `true` to include metrics from source accounts in the returned data.
|
2261
|
+
#
|
2262
|
+
# The default is `false`.
|
2263
|
+
#
|
2264
|
+
# @option params [String] :owning_account
|
2265
|
+
# When you use this operation in a monitoring account, use this field to
|
2266
|
+
# return metrics only from one source account. To do so, specify that
|
2267
|
+
# source account ID in this field, and also specify `true` for
|
2268
|
+
# `IncludeLinkedAccounts`.
|
2269
|
+
#
|
2235
2270
|
# @return [Types::ListMetricsOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
2236
2271
|
#
|
2237
2272
|
# * {Types::ListMetricsOutput#metrics #metrics} => Array<Types::Metric>
|
2238
2273
|
# * {Types::ListMetricsOutput#next_token #next_token} => String
|
2274
|
+
# * {Types::ListMetricsOutput#owning_accounts #owning_accounts} => Array<String>
|
2239
2275
|
#
|
2240
2276
|
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
2241
2277
|
#
|
@@ -2252,6 +2288,8 @@ module Aws::CloudWatch
|
|
2252
2288
|
# ],
|
2253
2289
|
# next_token: "NextToken",
|
2254
2290
|
# recently_active: "PT3H", # accepts PT3H
|
2291
|
+
# include_linked_accounts: false,
|
2292
|
+
# owning_account: "AccountId",
|
2255
2293
|
# })
|
2256
2294
|
#
|
2257
2295
|
# @example Response structure
|
@@ -2263,6 +2301,8 @@ module Aws::CloudWatch
|
|
2263
2301
|
# resp.metrics[0].dimensions[0].name #=> String
|
2264
2302
|
# resp.metrics[0].dimensions[0].value #=> String
|
2265
2303
|
# resp.next_token #=> String
|
2304
|
+
# resp.owning_accounts #=> Array
|
2305
|
+
# resp.owning_accounts[0] #=> String
|
2266
2306
|
#
|
2267
2307
|
# @see http://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/ListMetrics AWS API Documentation
|
2268
2308
|
#
|
@@ -2491,7 +2531,7 @@ module Aws::CloudWatch
|
|
2491
2531
|
# the rule of one of the composite alarms in the cycle to remove a
|
2492
2532
|
# dependency that creates the cycle. The simplest change to make to
|
2493
2533
|
# break a cycle is to change the `AlarmRule` of one of the alarms to
|
2494
|
-
# `
|
2534
|
+
# `false`.
|
2495
2535
|
#
|
2496
2536
|
# Additionally, the evaluation of composite alarms stops if CloudWatch
|
2497
2537
|
# detects a cycle in the evaluation path.
|
@@ -3366,12 +3406,12 @@ module Aws::CloudWatch
|
|
3366
3406
|
end
|
3367
3407
|
|
3368
3408
|
# Creates or updates a metric stream. Metric streams can automatically
|
3369
|
-
# stream CloudWatch metrics to Amazon Web Services destinations
|
3370
|
-
# including Amazon S3 and to many third-party solutions.
|
3409
|
+
# stream CloudWatch metrics to Amazon Web Services destinations,
|
3410
|
+
# including Amazon S3, and to many third-party solutions.
|
3371
3411
|
#
|
3372
3412
|
# For more information, see [ Using Metric Streams][1].
|
3373
3413
|
#
|
3374
|
-
# To create a metric stream, you must be
|
3414
|
+
# To create a metric stream, you must be signed in to an account that
|
3375
3415
|
# has the `iam:PassRole` permission and either the
|
3376
3416
|
# `CloudWatchFullAccess` policy or the `cloudwatch:PutMetricStream`
|
3377
3417
|
# permission.
|
@@ -3390,7 +3430,7 @@ module Aws::CloudWatch
|
|
3390
3430
|
# By default, a metric stream always sends the `MAX`, `MIN`, `SUM`, and
|
3391
3431
|
# `SAMPLECOUNT` statistics for each metric that is streamed. You can use
|
3392
3432
|
# the `StatisticsConfigurations` parameter to have the metric stream
|
3393
|
-
#
|
3433
|
+
# send additional statistics in the stream. Streaming additional
|
3394
3434
|
# statistics incurs additional costs. For more information, see [Amazon
|
3395
3435
|
# CloudWatch Pricing][2].
|
3396
3436
|
#
|
@@ -3428,15 +3468,16 @@ module Aws::CloudWatch
|
|
3428
3468
|
# operation.
|
3429
3469
|
#
|
3430
3470
|
# @option params [required, String] :firehose_arn
|
3431
|
-
# The ARN of the Amazon Kinesis Firehose delivery stream to use for
|
3432
|
-
# metric stream. This Amazon Kinesis Firehose delivery stream
|
3433
|
-
# already exist and must be in the same account as the metric
|
3471
|
+
# The ARN of the Amazon Kinesis Data Firehose delivery stream to use for
|
3472
|
+
# this metric stream. This Amazon Kinesis Data Firehose delivery stream
|
3473
|
+
# must already exist and must be in the same account as the metric
|
3474
|
+
# stream.
|
3434
3475
|
#
|
3435
3476
|
# @option params [required, String] :role_arn
|
3436
3477
|
# The ARN of an IAM role that this metric stream will use to access
|
3437
|
-
# Amazon Kinesis Firehose resources. This IAM role must already
|
3438
|
-
# and must be in the same account as the metric stream. This IAM
|
3439
|
-
# must include the following permissions:
|
3478
|
+
# Amazon Kinesis Data Firehose resources. This IAM role must already
|
3479
|
+
# exist and must be in the same account as the metric stream. This IAM
|
3480
|
+
# role must include the following permissions:
|
3440
3481
|
#
|
3441
3482
|
# * firehose:PutRecord
|
3442
3483
|
#
|
@@ -3483,7 +3524,7 @@ module Aws::CloudWatch
|
|
3483
3524
|
# additional statistic that is supported by CloudWatch, listed in [
|
3484
3525
|
# CloudWatch statistics definitions][1]. If the `OutputFormat` is
|
3485
3526
|
# `opentelemetry0.7`, you can stream percentile statistics such as p95,
|
3486
|
-
# p99.9 and so on.
|
3527
|
+
# p99.9, and so on.
|
3487
3528
|
#
|
3488
3529
|
#
|
3489
3530
|
#
|
@@ -3772,7 +3813,7 @@ module Aws::CloudWatch
|
|
3772
3813
|
params: params,
|
3773
3814
|
config: config)
|
3774
3815
|
context[:gem_name] = 'aws-sdk-cloudwatch'
|
3775
|
-
context[:gem_version] = '1.
|
3816
|
+
context[:gem_version] = '1.69.0'
|
3776
3817
|
Seahorse::Client::Request.new(handlers, context)
|
3777
3818
|
end
|
3778
3819
|
|
@@ -122,6 +122,7 @@ module Aws::CloudWatch
|
|
122
122
|
HistoryData = Shapes::StringShape.new(name: 'HistoryData')
|
123
123
|
HistoryItemType = Shapes::StringShape.new(name: 'HistoryItemType')
|
124
124
|
HistorySummary = Shapes::StringShape.new(name: 'HistorySummary')
|
125
|
+
IncludeLinkedAccounts = Shapes::BooleanShape.new(name: 'IncludeLinkedAccounts')
|
125
126
|
InsightRule = Shapes::StructureShape.new(name: 'InsightRule')
|
126
127
|
InsightRuleAggregationStatistic = Shapes::StringShape.new(name: 'InsightRuleAggregationStatistic')
|
127
128
|
InsightRuleContributor = Shapes::StructureShape.new(name: 'InsightRuleContributor')
|
@@ -216,6 +217,7 @@ module Aws::CloudWatch
|
|
216
217
|
Namespace = Shapes::StringShape.new(name: 'Namespace')
|
217
218
|
NextToken = Shapes::StringShape.new(name: 'NextToken')
|
218
219
|
OutputFormat = Shapes::StringShape.new(name: 'OutputFormat')
|
220
|
+
OwningAccounts = Shapes::ListShape.new(name: 'OwningAccounts')
|
219
221
|
PartialFailure = Shapes::StructureShape.new(name: 'PartialFailure')
|
220
222
|
Period = Shapes::IntegerShape.new(name: 'Period')
|
221
223
|
PutAnomalyDetectorInput = Shapes::StructureShape.new(name: 'PutAnomalyDetectorInput')
|
@@ -673,10 +675,13 @@ module Aws::CloudWatch
|
|
673
675
|
ListMetricsInput.add_member(:dimensions, Shapes::ShapeRef.new(shape: DimensionFilters, location_name: "Dimensions"))
|
674
676
|
ListMetricsInput.add_member(:next_token, Shapes::ShapeRef.new(shape: NextToken, location_name: "NextToken"))
|
675
677
|
ListMetricsInput.add_member(:recently_active, Shapes::ShapeRef.new(shape: RecentlyActive, location_name: "RecentlyActive"))
|
678
|
+
ListMetricsInput.add_member(:include_linked_accounts, Shapes::ShapeRef.new(shape: IncludeLinkedAccounts, location_name: "IncludeLinkedAccounts"))
|
679
|
+
ListMetricsInput.add_member(:owning_account, Shapes::ShapeRef.new(shape: AccountId, location_name: "OwningAccount"))
|
676
680
|
ListMetricsInput.struct_class = Types::ListMetricsInput
|
677
681
|
|
678
682
|
ListMetricsOutput.add_member(:metrics, Shapes::ShapeRef.new(shape: Metrics, location_name: "Metrics"))
|
679
683
|
ListMetricsOutput.add_member(:next_token, Shapes::ShapeRef.new(shape: NextToken, location_name: "NextToken"))
|
684
|
+
ListMetricsOutput.add_member(:owning_accounts, Shapes::ShapeRef.new(shape: OwningAccounts, location_name: "OwningAccounts"))
|
680
685
|
ListMetricsOutput.struct_class = Types::ListMetricsOutput
|
681
686
|
|
682
687
|
ListTagsForResourceInput.add_member(:resource_arn, Shapes::ShapeRef.new(shape: AmazonResourceName, required: true, location_name: "ResourceARN"))
|
@@ -825,6 +830,8 @@ module Aws::CloudWatch
|
|
825
830
|
MissingRequiredParameterException.add_member(:message, Shapes::ShapeRef.new(shape: AwsQueryErrorMessage, location_name: "message"))
|
826
831
|
MissingRequiredParameterException.struct_class = Types::MissingRequiredParameterException
|
827
832
|
|
833
|
+
OwningAccounts.member = Shapes::ShapeRef.new(shape: AccountId)
|
834
|
+
|
828
835
|
PartialFailure.add_member(:failure_resource, Shapes::ShapeRef.new(shape: FailureResource, location_name: "FailureResource"))
|
829
836
|
PartialFailure.add_member(:exception_type, Shapes::ShapeRef.new(shape: ExceptionType, location_name: "ExceptionType"))
|
830
837
|
PartialFailure.add_member(:failure_code, Shapes::ShapeRef.new(shape: FailureCode, location_name: "FailureCode"))
|
@@ -0,0 +1,66 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# WARNING ABOUT GENERATED CODE
|
4
|
+
#
|
5
|
+
# This file is generated. See the contributing guide for more information:
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
7
|
+
#
|
8
|
+
# WARNING ABOUT GENERATED CODE
|
9
|
+
|
10
|
+
module Aws::CloudWatch
|
11
|
+
# Endpoint parameters used to influence endpoints per request.
|
12
|
+
#
|
13
|
+
# @!attribute region
|
14
|
+
# The AWS region used to dispatch the request.
|
15
|
+
#
|
16
|
+
# @return [String]
|
17
|
+
#
|
18
|
+
# @!attribute use_dual_stack
|
19
|
+
# When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.
|
20
|
+
#
|
21
|
+
# @return [Boolean]
|
22
|
+
#
|
23
|
+
# @!attribute use_fips
|
24
|
+
# When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.
|
25
|
+
#
|
26
|
+
# @return [Boolean]
|
27
|
+
#
|
28
|
+
# @!attribute endpoint
|
29
|
+
# Override the endpoint used to send this request
|
30
|
+
#
|
31
|
+
# @return [String]
|
32
|
+
#
|
33
|
+
EndpointParameters = Struct.new(
|
34
|
+
:region,
|
35
|
+
:use_dual_stack,
|
36
|
+
:use_fips,
|
37
|
+
:endpoint,
|
38
|
+
) do
|
39
|
+
include Aws::Structure
|
40
|
+
|
41
|
+
# @api private
|
42
|
+
class << self
|
43
|
+
PARAM_MAP = {
|
44
|
+
'Region' => :region,
|
45
|
+
'UseDualStack' => :use_dual_stack,
|
46
|
+
'UseFIPS' => :use_fips,
|
47
|
+
'Endpoint' => :endpoint,
|
48
|
+
}.freeze
|
49
|
+
end
|
50
|
+
|
51
|
+
def initialize(options = {})
|
52
|
+
self[:region] = options[:region]
|
53
|
+
self[:use_dual_stack] = options[:use_dual_stack]
|
54
|
+
self[:use_dual_stack] = false if self[:use_dual_stack].nil?
|
55
|
+
if self[:use_dual_stack].nil?
|
56
|
+
raise ArgumentError, "Missing required EndpointParameter: :use_dual_stack"
|
57
|
+
end
|
58
|
+
self[:use_fips] = options[:use_fips]
|
59
|
+
self[:use_fips] = false if self[:use_fips].nil?
|
60
|
+
if self[:use_fips].nil?
|
61
|
+
raise ArgumentError, "Missing required EndpointParameter: :use_fips"
|
62
|
+
end
|
63
|
+
self[:endpoint] = options[:endpoint]
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,117 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# WARNING ABOUT GENERATED CODE
|
4
|
+
#
|
5
|
+
# This file is generated. See the contributing guide for more information:
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
7
|
+
#
|
8
|
+
# WARNING ABOUT GENERATED CODE
|
9
|
+
|
10
|
+
module Aws::CloudWatch
|
11
|
+
class EndpointProvider
|
12
|
+
def initialize(rule_set = nil)
|
13
|
+
@@rule_set ||= begin
|
14
|
+
endpoint_rules = Aws::Json.load(Base64.decode64(RULES))
|
15
|
+
Aws::Endpoints::RuleSet.new(
|
16
|
+
version: endpoint_rules['version'],
|
17
|
+
service_id: endpoint_rules['serviceId'],
|
18
|
+
parameters: endpoint_rules['parameters'],
|
19
|
+
rules: endpoint_rules['rules']
|
20
|
+
)
|
21
|
+
end
|
22
|
+
@provider = Aws::Endpoints::RulesProvider.new(rule_set || @@rule_set)
|
23
|
+
end
|
24
|
+
|
25
|
+
def resolve_endpoint(parameters)
|
26
|
+
@provider.resolve_endpoint(parameters)
|
27
|
+
end
|
28
|
+
|
29
|
+
# @api private
|
30
|
+
RULES = <<-JSON
|
31
|
+
eyJ2ZXJzaW9uIjoiMS4wIiwicGFyYW1ldGVycyI6eyJSZWdpb24iOnsiYnVp
|
32
|
+
bHRJbiI6IkFXUzo6UmVnaW9uIiwicmVxdWlyZWQiOmZhbHNlLCJkb2N1bWVu
|
33
|
+
dGF0aW9uIjoiVGhlIEFXUyByZWdpb24gdXNlZCB0byBkaXNwYXRjaCB0aGUg
|
34
|
+
cmVxdWVzdC4iLCJ0eXBlIjoiU3RyaW5nIn0sIlVzZUR1YWxTdGFjayI6eyJi
|
35
|
+
dWlsdEluIjoiQVdTOjpVc2VEdWFsU3RhY2siLCJyZXF1aXJlZCI6dHJ1ZSwi
|
36
|
+
ZGVmYXVsdCI6ZmFsc2UsImRvY3VtZW50YXRpb24iOiJXaGVuIHRyd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