aws-sdk-cloudwatch 1.34.0 → 1.39.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/aws-sdk-cloudwatch.rb +1 -1
- data/lib/aws-sdk-cloudwatch/alarm.rb +18 -14
- data/lib/aws-sdk-cloudwatch/client.rb +115 -40
- data/lib/aws-sdk-cloudwatch/client_api.rb +5 -3
- data/lib/aws-sdk-cloudwatch/composite_alarm.rb +18 -14
- data/lib/aws-sdk-cloudwatch/metric.rb +14 -12
- data/lib/aws-sdk-cloudwatch/resource.rb +6 -1
- data/lib/aws-sdk-cloudwatch/types.rb +72 -11
- data/lib/aws-sdk-cloudwatch/waiters.rb +62 -0
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 4470e54d65ae67a415058601a72dc202d4a4f0e6fe7e0d47adb791d75a01d7eb
|
4
|
+
data.tar.gz: e2741fc2be09560b90cb3399b9e8b5698ed750a551ae546e987dbb2eba7284e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fccdd3a27926bf5e6c37069a430a1a5c176a8bef62ba5fd8fb40acb3835769be62ba1e600ec44d58246c5fe851b4810a265dba9c11ffb0f7c79a13e693ada2e8
|
7
|
+
data.tar.gz: ea69e9777a0ab468260a23a82197f28a068b56cc02e0e58b060cb2d918c436c59294559768ca7369ff7a6b92c9d64991f1ab0fddc0a532a7bfff244ec6ee286e
|
data/lib/aws-sdk-cloudwatch.rb
CHANGED
@@ -283,7 +283,8 @@ module Aws::CloudWatch
|
|
283
283
|
# Waiter polls an API operation until a resource enters a desired
|
284
284
|
# state.
|
285
285
|
#
|
286
|
-
# @note The waiting operation is performed on a copy. The original resource
|
286
|
+
# @note The waiting operation is performed on a copy. The original resource
|
287
|
+
# remains unchanged.
|
287
288
|
#
|
288
289
|
# ## Basic Usage
|
289
290
|
#
|
@@ -296,13 +297,15 @@ module Aws::CloudWatch
|
|
296
297
|
#
|
297
298
|
# ## Example
|
298
299
|
#
|
299
|
-
# instance.wait_until(max_attempts:10, delay:5)
|
300
|
+
# instance.wait_until(max_attempts:10, delay:5) do |instance|
|
301
|
+
# instance.state.name == 'running'
|
302
|
+
# end
|
300
303
|
#
|
301
304
|
# ## Configuration
|
302
305
|
#
|
303
306
|
# You can configure the maximum number of polling attempts, and the
|
304
|
-
# delay (in seconds) between each polling attempt. The waiting condition is
|
305
|
-
# by passing a block to {#wait_until}:
|
307
|
+
# delay (in seconds) between each polling attempt. The waiting condition is
|
308
|
+
# set by passing a block to {#wait_until}:
|
306
309
|
#
|
307
310
|
# # poll for ~25 seconds
|
308
311
|
# resource.wait_until(max_attempts:5,delay:5) {|resource|...}
|
@@ -333,17 +336,16 @@ module Aws::CloudWatch
|
|
333
336
|
# # resource did not enter the desired state in time
|
334
337
|
# end
|
335
338
|
#
|
339
|
+
# @yieldparam [Resource] resource to be used in the waiting condition.
|
336
340
|
#
|
337
|
-
# @
|
338
|
-
#
|
339
|
-
#
|
340
|
-
# because the waiter has entered a state that it will not transition
|
341
|
-
# out of, preventing success.
|
341
|
+
# @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter
|
342
|
+
# terminates because the waiter has entered a state that it will not
|
343
|
+
# transition out of, preventing success.
|
342
344
|
#
|
343
345
|
# yet successful.
|
344
346
|
#
|
345
|
-
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
|
346
|
-
# while polling for a resource that is not expected.
|
347
|
+
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
|
348
|
+
# encountered while polling for a resource that is not expected.
|
347
349
|
#
|
348
350
|
# @raise [NotImplementedError] Raised when the resource does not
|
349
351
|
#
|
@@ -512,8 +514,8 @@ module Aws::CloudWatch
|
|
512
514
|
|
513
515
|
def yield_waiter_and_warn(waiter, &block)
|
514
516
|
if !@waiter_block_warned
|
515
|
-
msg = "pass options to configure the waiter; "
|
516
|
-
|
517
|
+
msg = "pass options to configure the waiter; "\
|
518
|
+
"yielding the waiter is deprecated"
|
517
519
|
warn(msg)
|
518
520
|
@waiter_block_warned = true
|
519
521
|
end
|
@@ -521,7 +523,9 @@ module Aws::CloudWatch
|
|
521
523
|
end
|
522
524
|
|
523
525
|
def separate_params_and_options(options)
|
524
|
-
opts = Set.new(
|
526
|
+
opts = Set.new(
|
527
|
+
[:client, :max_attempts, :delay, :before_attempt, :before_wait]
|
528
|
+
)
|
525
529
|
waiter_opts = {}
|
526
530
|
waiter_params = {}
|
527
531
|
options.each_pair do |key, value|
|
@@ -24,6 +24,7 @@ require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
|
|
24
24
|
require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
|
25
25
|
require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
|
26
26
|
require 'aws-sdk-core/plugins/transfer_encoding.rb'
|
27
|
+
require 'aws-sdk-core/plugins/http_checksum.rb'
|
27
28
|
require 'aws-sdk-core/plugins/signature_v4.rb'
|
28
29
|
require 'aws-sdk-core/plugins/protocols/query.rb'
|
29
30
|
|
@@ -32,11 +33,11 @@ Aws::Plugins::GlobalConfiguration.add_identifier(:cloudwatch)
|
|
32
33
|
module Aws::CloudWatch
|
33
34
|
# An API client for CloudWatch. To construct a client, you need to configure a `:region` and `:credentials`.
|
34
35
|
#
|
35
|
-
#
|
36
|
-
#
|
37
|
-
#
|
38
|
-
#
|
39
|
-
#
|
36
|
+
# client = Aws::CloudWatch::Client.new(
|
37
|
+
# region: region_name,
|
38
|
+
# credentials: credentials,
|
39
|
+
# # ...
|
40
|
+
# )
|
40
41
|
#
|
41
42
|
# For details on configuring region and credentials see
|
42
43
|
# the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
|
@@ -69,6 +70,7 @@ module Aws::CloudWatch
|
|
69
70
|
add_plugin(Aws::Plugins::ClientMetricsPlugin)
|
70
71
|
add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
|
71
72
|
add_plugin(Aws::Plugins::TransferEncoding)
|
73
|
+
add_plugin(Aws::Plugins::HttpChecksum)
|
72
74
|
add_plugin(Aws::Plugins::SignatureV4)
|
73
75
|
add_plugin(Aws::Plugins::Protocols::Query)
|
74
76
|
|
@@ -105,7 +107,7 @@ module Aws::CloudWatch
|
|
105
107
|
# @option options [required, String] :region
|
106
108
|
# The AWS region to connect to. The configured `:region` is
|
107
109
|
# used to determine the service `:endpoint`. When not passed,
|
108
|
-
# a default `:region` is
|
110
|
+
# a default `:region` is searched for in the following locations:
|
109
111
|
#
|
110
112
|
# * `Aws.config[:region]`
|
111
113
|
# * `ENV['AWS_REGION']`
|
@@ -161,7 +163,7 @@ module Aws::CloudWatch
|
|
161
163
|
# @option options [String] :endpoint
|
162
164
|
# The client endpoint is normally constructed from the `:region`
|
163
165
|
# option. You should only configure an `:endpoint` when connecting
|
164
|
-
# to test endpoints. This should be
|
166
|
+
# to test or custom endpoints. This should be a valid HTTP(S) URI.
|
165
167
|
#
|
166
168
|
# @option options [Integer] :endpoint_cache_max_entries (1000)
|
167
169
|
# Used for the maximum size limit of the LRU cache storing endpoints data
|
@@ -176,7 +178,7 @@ module Aws::CloudWatch
|
|
176
178
|
# requests fetching endpoints information. Defaults to 60 sec.
|
177
179
|
#
|
178
180
|
# @option options [Boolean] :endpoint_discovery (false)
|
179
|
-
# When set to `true`, endpoint discovery will be enabled for operations when available.
|
181
|
+
# When set to `true`, endpoint discovery will be enabled for operations when available.
|
180
182
|
#
|
181
183
|
# @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
|
182
184
|
# The log formatter.
|
@@ -229,15 +231,19 @@ module Aws::CloudWatch
|
|
229
231
|
#
|
230
232
|
# @option options [String] :retry_mode ("legacy")
|
231
233
|
# Specifies which retry algorithm to use. Values are:
|
232
|
-
#
|
233
|
-
#
|
234
|
-
#
|
235
|
-
#
|
236
|
-
#
|
237
|
-
#
|
238
|
-
#
|
239
|
-
#
|
240
|
-
#
|
234
|
+
#
|
235
|
+
# * `legacy` - The pre-existing retry behavior. This is default value if
|
236
|
+
# no retry mode is provided.
|
237
|
+
#
|
238
|
+
# * `standard` - A standardized set of retry rules across the AWS SDKs.
|
239
|
+
# This includes support for retry quotas, which limit the number of
|
240
|
+
# unsuccessful retries a client can make.
|
241
|
+
#
|
242
|
+
# * `adaptive` - An experimental retry mode that includes all the
|
243
|
+
# functionality of `standard` mode along with automatic client side
|
244
|
+
# throttling. This is a provisional mode that may change behavior
|
245
|
+
# in the future.
|
246
|
+
#
|
241
247
|
#
|
242
248
|
# @option options [String] :secret_access_key
|
243
249
|
#
|
@@ -265,8 +271,7 @@ module Aws::CloudWatch
|
|
265
271
|
#
|
266
272
|
# @option options [Integer] :http_read_timeout (60) The default
|
267
273
|
# number of seconds to wait for response data. This value can
|
268
|
-
# safely be set
|
269
|
-
# per-request on the session yielded by {#session_for}.
|
274
|
+
# safely be set per-request on the session.
|
270
275
|
#
|
271
276
|
# @option options [Float] :http_idle_timeout (5) The number of
|
272
277
|
# seconds a connection is allowed to sit idle before it is
|
@@ -278,7 +283,7 @@ module Aws::CloudWatch
|
|
278
283
|
# request body. This option has no effect unless the request has
|
279
284
|
# "Expect" header set to "100-continue". Defaults to `nil` which
|
280
285
|
# disables this behaviour. This value can safely be set per
|
281
|
-
# request on the session
|
286
|
+
# request on the session.
|
282
287
|
#
|
283
288
|
# @option options [Boolean] :http_wire_trace (false) When `true`,
|
284
289
|
# HTTP debug output will be sent to the `:logger`.
|
@@ -379,7 +384,7 @@ module Aws::CloudWatch
|
|
379
384
|
# value: "DimensionValue", # required
|
380
385
|
# },
|
381
386
|
# ],
|
382
|
-
# stat: "
|
387
|
+
# stat: "AnomalyDetectorMetricStat", # required
|
383
388
|
# })
|
384
389
|
#
|
385
390
|
# @see http://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DeleteAnomalyDetector AWS API Documentation
|
@@ -499,6 +504,8 @@ module Aws::CloudWatch
|
|
499
504
|
# * {Types::DescribeAlarmHistoryOutput#alarm_history_items #alarm_history_items} => Array<Types::AlarmHistoryItem>
|
500
505
|
# * {Types::DescribeAlarmHistoryOutput#next_token #next_token} => String
|
501
506
|
#
|
507
|
+
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
508
|
+
#
|
502
509
|
# @example Request syntax with placeholder values
|
503
510
|
#
|
504
511
|
# resp = client.describe_alarm_history({
|
@@ -614,6 +621,8 @@ module Aws::CloudWatch
|
|
614
621
|
# * {Types::DescribeAlarmsOutput#metric_alarms #metric_alarms} => Array<Types::MetricAlarm>
|
615
622
|
# * {Types::DescribeAlarmsOutput#next_token #next_token} => String
|
616
623
|
#
|
624
|
+
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
625
|
+
#
|
617
626
|
# @example Request syntax with placeholder values
|
618
627
|
#
|
619
628
|
# resp = client.describe_alarms({
|
@@ -695,6 +704,12 @@ module Aws::CloudWatch
|
|
695
704
|
# resp.metric_alarms[0].threshold_metric_id #=> String
|
696
705
|
# resp.next_token #=> String
|
697
706
|
#
|
707
|
+
#
|
708
|
+
# The following waiters are defined for this operation (see {Client#wait_until} for detailed usage):
|
709
|
+
#
|
710
|
+
# * alarm_exists
|
711
|
+
# * composite_alarm_exists
|
712
|
+
#
|
698
713
|
# @see http://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DescribeAlarms AWS API Documentation
|
699
714
|
#
|
700
715
|
# @overload describe_alarms(params = {})
|
@@ -910,6 +925,8 @@ module Aws::CloudWatch
|
|
910
925
|
# * {Types::DescribeInsightRulesOutput#next_token #next_token} => String
|
911
926
|
# * {Types::DescribeInsightRulesOutput#insight_rules #insight_rules} => Array<Types::InsightRule>
|
912
927
|
#
|
928
|
+
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
929
|
+
#
|
913
930
|
# @example Request syntax with placeholder values
|
914
931
|
#
|
915
932
|
# resp = client.describe_insight_rules({
|
@@ -1362,6 +1379,8 @@ module Aws::CloudWatch
|
|
1362
1379
|
# * {Types::GetMetricDataOutput#next_token #next_token} => String
|
1363
1380
|
# * {Types::GetMetricDataOutput#messages #messages} => Array<Types::MessageData>
|
1364
1381
|
#
|
1382
|
+
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
1383
|
+
#
|
1365
1384
|
# @example Request syntax with placeholder values
|
1366
1385
|
#
|
1367
1386
|
# resp = client.get_metric_data({
|
@@ -1753,6 +1772,8 @@ module Aws::CloudWatch
|
|
1753
1772
|
# * {Types::ListDashboardsOutput#dashboard_entries #dashboard_entries} => Array<Types::DashboardEntry>
|
1754
1773
|
# * {Types::ListDashboardsOutput#next_token #next_token} => String
|
1755
1774
|
#
|
1775
|
+
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
1776
|
+
#
|
1756
1777
|
# @example Request syntax with placeholder values
|
1757
1778
|
#
|
1758
1779
|
# resp = client.list_dashboards({
|
@@ -1812,6 +1833,8 @@ module Aws::CloudWatch
|
|
1812
1833
|
# * {Types::ListMetricsOutput#metrics #metrics} => Array<Types::Metric>
|
1813
1834
|
# * {Types::ListMetricsOutput#next_token #next_token} => String
|
1814
1835
|
#
|
1836
|
+
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
1837
|
+
#
|
1815
1838
|
# @example Request syntax with placeholder values
|
1816
1839
|
#
|
1817
1840
|
# resp = client.list_metrics({
|
@@ -1845,17 +1868,24 @@ module Aws::CloudWatch
|
|
1845
1868
|
req.send_request(options)
|
1846
1869
|
end
|
1847
1870
|
|
1848
|
-
# Displays the tags associated with a CloudWatch resource.
|
1849
|
-
# support tagging.
|
1871
|
+
# Displays the tags associated with a CloudWatch resource. Currently,
|
1872
|
+
# alarms and Contributor Insights rules support tagging.
|
1850
1873
|
#
|
1851
1874
|
# @option params [required, String] :resource_arn
|
1852
|
-
# The ARN of the CloudWatch resource that you want to view tags for.
|
1853
|
-
#
|
1854
|
-
#
|
1875
|
+
# The ARN of the CloudWatch resource that you want to view tags for.
|
1876
|
+
#
|
1877
|
+
# The ARN format of an alarm is
|
1878
|
+
# `arn:aws:cloudwatch:Region:account-id:alarm:alarm-name `
|
1879
|
+
#
|
1880
|
+
# The ARN format of a Contributor Insights rule is
|
1881
|
+
# `arn:aws:cloudwatch:Region:account-id:insight-rule:insight-rule-name `
|
1882
|
+
#
|
1883
|
+
# For more information on ARN format, see [ Resource Types Defined by
|
1884
|
+
# Amazon CloudWatch][1] in the *Amazon Web Services General Reference*.
|
1855
1885
|
#
|
1856
1886
|
#
|
1857
1887
|
#
|
1858
|
-
# [1]: https://docs.aws.amazon.com/
|
1888
|
+
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazoncloudwatch.html#amazoncloudwatch-resources-for-iam-policies
|
1859
1889
|
#
|
1860
1890
|
# @return [Types::ListTagsForResourceOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
1861
1891
|
#
|
@@ -1927,7 +1957,7 @@ module Aws::CloudWatch
|
|
1927
1957
|
# value: "DimensionValue", # required
|
1928
1958
|
# },
|
1929
1959
|
# ],
|
1930
|
-
# stat: "
|
1960
|
+
# stat: "AnomalyDetectorMetricStat", # required
|
1931
1961
|
# configuration: {
|
1932
1962
|
# excluded_time_ranges: [
|
1933
1963
|
# {
|
@@ -2214,6 +2244,26 @@ module Aws::CloudWatch
|
|
2214
2244
|
#
|
2215
2245
|
# [1]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/ContributorInsights-RuleSyntax.html
|
2216
2246
|
#
|
2247
|
+
# @option params [Array<Types::Tag>] :tags
|
2248
|
+
# A list of key-value pairs to associate with the Contributor Insights
|
2249
|
+
# rule. You can associate as many as 50 tags with a rule.
|
2250
|
+
#
|
2251
|
+
# Tags can help you organize and categorize your resources. You can also
|
2252
|
+
# use them to scope user permissions, by granting a user permission to
|
2253
|
+
# access or change only the resources that have certain tag values.
|
2254
|
+
#
|
2255
|
+
# To be able to associate tags with a rule, you must have the
|
2256
|
+
# `cloudwatch:TagResource` permission in addition to the
|
2257
|
+
# `cloudwatch:PutInsightRule` permission.
|
2258
|
+
#
|
2259
|
+
# If you are using this operation to update an existing Contributor
|
2260
|
+
# Insights rule, any tags you specify in this parameter are ignored. To
|
2261
|
+
# change the tags of an existing rule, use [TagResource][1].
|
2262
|
+
#
|
2263
|
+
#
|
2264
|
+
#
|
2265
|
+
# [1]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_TagResource.html
|
2266
|
+
#
|
2217
2267
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
2218
2268
|
#
|
2219
2269
|
# @example Request syntax with placeholder values
|
@@ -2222,6 +2272,12 @@ module Aws::CloudWatch
|
|
2222
2272
|
# rule_name: "InsightRuleName", # required
|
2223
2273
|
# rule_state: "InsightRuleState",
|
2224
2274
|
# rule_definition: "InsightRuleDefinition", # required
|
2275
|
+
# tags: [
|
2276
|
+
# {
|
2277
|
+
# key: "TagKey", # required
|
2278
|
+
# value: "TagValue", # required
|
2279
|
+
# },
|
2280
|
+
# ],
|
2225
2281
|
# })
|
2226
2282
|
#
|
2227
2283
|
# @see http://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/PutInsightRule AWS API Documentation
|
@@ -2780,7 +2836,7 @@ module Aws::CloudWatch
|
|
2780
2836
|
|
2781
2837
|
# Assigns one or more tags (key-value pairs) to the specified CloudWatch
|
2782
2838
|
# resource. Currently, the only CloudWatch resources that can be tagged
|
2783
|
-
# are alarms.
|
2839
|
+
# are alarms and Contributor Insights rules.
|
2784
2840
|
#
|
2785
2841
|
# Tags can help you organize and categorize your resources. You can also
|
2786
2842
|
# use them to scope user permissions, by granting a user permission to
|
@@ -2795,11 +2851,23 @@ module Aws::CloudWatch
|
|
2795
2851
|
# key that is already associated with the alarm, the new tag value that
|
2796
2852
|
# you specify replaces the previous value for that tag.
|
2797
2853
|
#
|
2798
|
-
# You can associate as many as 50 tags with a resource.
|
2854
|
+
# You can associate as many as 50 tags with a CloudWatch resource.
|
2799
2855
|
#
|
2800
2856
|
# @option params [required, String] :resource_arn
|
2801
|
-
# The ARN of the CloudWatch
|
2802
|
-
#
|
2857
|
+
# The ARN of the CloudWatch resource that you're adding tags to.
|
2858
|
+
#
|
2859
|
+
# The ARN format of an alarm is
|
2860
|
+
# `arn:aws:cloudwatch:Region:account-id:alarm:alarm-name `
|
2861
|
+
#
|
2862
|
+
# The ARN format of a Contributor Insights rule is
|
2863
|
+
# `arn:aws:cloudwatch:Region:account-id:insight-rule:insight-rule-name `
|
2864
|
+
#
|
2865
|
+
# For more information on ARN format, see [ Resource Types Defined by
|
2866
|
+
# Amazon CloudWatch][1] in the *Amazon Web Services General Reference*.
|
2867
|
+
#
|
2868
|
+
#
|
2869
|
+
#
|
2870
|
+
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazoncloudwatch.html#amazoncloudwatch-resources-for-iam-policies
|
2803
2871
|
#
|
2804
2872
|
# @option params [required, Array<Types::Tag>] :tags
|
2805
2873
|
# The list of key-value pairs to associate with the alarm.
|
@@ -2831,12 +2899,19 @@ module Aws::CloudWatch
|
|
2831
2899
|
#
|
2832
2900
|
# @option params [required, String] :resource_arn
|
2833
2901
|
# The ARN of the CloudWatch resource that you're removing tags from.
|
2834
|
-
#
|
2835
|
-
#
|
2902
|
+
#
|
2903
|
+
# The ARN format of an alarm is
|
2904
|
+
# `arn:aws:cloudwatch:Region:account-id:alarm:alarm-name `
|
2905
|
+
#
|
2906
|
+
# The ARN format of a Contributor Insights rule is
|
2907
|
+
# `arn:aws:cloudwatch:Region:account-id:insight-rule:insight-rule-name `
|
2908
|
+
#
|
2909
|
+
# For more information on ARN format, see [ Resource Types Defined by
|
2910
|
+
# Amazon CloudWatch][1] in the *Amazon Web Services General Reference*.
|
2836
2911
|
#
|
2837
2912
|
#
|
2838
2913
|
#
|
2839
|
-
# [1]: https://docs.aws.amazon.com/
|
2914
|
+
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazoncloudwatch.html#amazoncloudwatch-resources-for-iam-policies
|
2840
2915
|
#
|
2841
2916
|
# @option params [required, Array<String>] :tag_keys
|
2842
2917
|
# The list of tag keys to remove from the resource.
|
@@ -2872,7 +2947,7 @@ module Aws::CloudWatch
|
|
2872
2947
|
params: params,
|
2873
2948
|
config: config)
|
2874
2949
|
context[:gem_name] = 'aws-sdk-cloudwatch'
|
2875
|
-
context[:gem_version] = '1.
|
2950
|
+
context[:gem_version] = '1.39.1'
|
2876
2951
|
Seahorse::Client::Request.new(handlers, context)
|
2877
2952
|
end
|
2878
2953
|
|
@@ -2938,10 +3013,10 @@ module Aws::CloudWatch
|
|
2938
3013
|
# The following table lists the valid waiter names, the operations they call,
|
2939
3014
|
# and the default `:delay` and `:max_attempts` values.
|
2940
3015
|
#
|
2941
|
-
# | waiter_name | params
|
2942
|
-
# | ---------------------- |
|
2943
|
-
# | alarm_exists | {#describe_alarms} | 5 | 40 |
|
2944
|
-
# | composite_alarm_exists | {#describe_alarms} | 5 | 40 |
|
3016
|
+
# | waiter_name | params | :delay | :max_attempts |
|
3017
|
+
# | ---------------------- | ------------------------ | -------- | ------------- |
|
3018
|
+
# | alarm_exists | {Client#describe_alarms} | 5 | 40 |
|
3019
|
+
# | composite_alarm_exists | {Client#describe_alarms} | 5 | 40 |
|
2945
3020
|
#
|
2946
3021
|
# @raise [Errors::FailureStateError] Raised when the waiter terminates
|
2947
3022
|
# because the waiter has entered a state that it will not transition
|
@@ -27,6 +27,7 @@ module Aws::CloudWatch
|
|
27
27
|
AnomalyDetector = Shapes::StructureShape.new(name: 'AnomalyDetector')
|
28
28
|
AnomalyDetectorConfiguration = Shapes::StructureShape.new(name: 'AnomalyDetectorConfiguration')
|
29
29
|
AnomalyDetectorExcludedTimeRanges = Shapes::ListShape.new(name: 'AnomalyDetectorExcludedTimeRanges')
|
30
|
+
AnomalyDetectorMetricStat = Shapes::StringShape.new(name: 'AnomalyDetectorMetricStat')
|
30
31
|
AnomalyDetectorMetricTimezone = Shapes::StringShape.new(name: 'AnomalyDetectorMetricTimezone')
|
31
32
|
AnomalyDetectorStateValue = Shapes::StringShape.new(name: 'AnomalyDetectorStateValue')
|
32
33
|
AnomalyDetectors = Shapes::ListShape.new(name: 'AnomalyDetectors')
|
@@ -240,7 +241,7 @@ module Aws::CloudWatch
|
|
240
241
|
AnomalyDetector.add_member(:namespace, Shapes::ShapeRef.new(shape: Namespace, location_name: "Namespace"))
|
241
242
|
AnomalyDetector.add_member(:metric_name, Shapes::ShapeRef.new(shape: MetricName, location_name: "MetricName"))
|
242
243
|
AnomalyDetector.add_member(:dimensions, Shapes::ShapeRef.new(shape: Dimensions, location_name: "Dimensions"))
|
243
|
-
AnomalyDetector.add_member(:stat, Shapes::ShapeRef.new(shape:
|
244
|
+
AnomalyDetector.add_member(:stat, Shapes::ShapeRef.new(shape: AnomalyDetectorMetricStat, location_name: "Stat"))
|
244
245
|
AnomalyDetector.add_member(:configuration, Shapes::ShapeRef.new(shape: AnomalyDetectorConfiguration, location_name: "Configuration"))
|
245
246
|
AnomalyDetector.add_member(:state_value, Shapes::ShapeRef.new(shape: AnomalyDetectorStateValue, location_name: "StateValue"))
|
246
247
|
AnomalyDetector.struct_class = Types::AnomalyDetector
|
@@ -322,7 +323,7 @@ module Aws::CloudWatch
|
|
322
323
|
DeleteAnomalyDetectorInput.add_member(:namespace, Shapes::ShapeRef.new(shape: Namespace, required: true, location_name: "Namespace"))
|
323
324
|
DeleteAnomalyDetectorInput.add_member(:metric_name, Shapes::ShapeRef.new(shape: MetricName, required: true, location_name: "MetricName"))
|
324
325
|
DeleteAnomalyDetectorInput.add_member(:dimensions, Shapes::ShapeRef.new(shape: Dimensions, location_name: "Dimensions"))
|
325
|
-
DeleteAnomalyDetectorInput.add_member(:stat, Shapes::ShapeRef.new(shape:
|
326
|
+
DeleteAnomalyDetectorInput.add_member(:stat, Shapes::ShapeRef.new(shape: AnomalyDetectorMetricStat, required: true, location_name: "Stat"))
|
326
327
|
DeleteAnomalyDetectorInput.struct_class = Types::DeleteAnomalyDetectorInput
|
327
328
|
|
328
329
|
DeleteAnomalyDetectorOutput.struct_class = Types::DeleteAnomalyDetectorOutput
|
@@ -671,7 +672,7 @@ module Aws::CloudWatch
|
|
671
672
|
PutAnomalyDetectorInput.add_member(:namespace, Shapes::ShapeRef.new(shape: Namespace, required: true, location_name: "Namespace"))
|
672
673
|
PutAnomalyDetectorInput.add_member(:metric_name, Shapes::ShapeRef.new(shape: MetricName, required: true, location_name: "MetricName"))
|
673
674
|
PutAnomalyDetectorInput.add_member(:dimensions, Shapes::ShapeRef.new(shape: Dimensions, location_name: "Dimensions"))
|
674
|
-
PutAnomalyDetectorInput.add_member(:stat, Shapes::ShapeRef.new(shape:
|
675
|
+
PutAnomalyDetectorInput.add_member(:stat, Shapes::ShapeRef.new(shape: AnomalyDetectorMetricStat, required: true, location_name: "Stat"))
|
675
676
|
PutAnomalyDetectorInput.add_member(:configuration, Shapes::ShapeRef.new(shape: AnomalyDetectorConfiguration, location_name: "Configuration"))
|
676
677
|
PutAnomalyDetectorInput.struct_class = Types::PutAnomalyDetectorInput
|
677
678
|
|
@@ -697,6 +698,7 @@ module Aws::CloudWatch
|
|
697
698
|
PutInsightRuleInput.add_member(:rule_name, Shapes::ShapeRef.new(shape: InsightRuleName, required: true, location_name: "RuleName"))
|
698
699
|
PutInsightRuleInput.add_member(:rule_state, Shapes::ShapeRef.new(shape: InsightRuleState, location_name: "RuleState"))
|
699
700
|
PutInsightRuleInput.add_member(:rule_definition, Shapes::ShapeRef.new(shape: InsightRuleDefinition, required: true, location_name: "RuleDefinition"))
|
701
|
+
PutInsightRuleInput.add_member(:tags, Shapes::ShapeRef.new(shape: TagList, location_name: "Tags"))
|
700
702
|
PutInsightRuleInput.struct_class = Types::PutInsightRuleInput
|
701
703
|
|
702
704
|
PutInsightRuleOutput.struct_class = Types::PutInsightRuleOutput
|
@@ -183,7 +183,8 @@ module Aws::CloudWatch
|
|
183
183
|
# Waiter polls an API operation until a resource enters a desired
|
184
184
|
# state.
|
185
185
|
#
|
186
|
-
# @note The waiting operation is performed on a copy. The original resource
|
186
|
+
# @note The waiting operation is performed on a copy. The original resource
|
187
|
+
# remains unchanged.
|
187
188
|
#
|
188
189
|
# ## Basic Usage
|
189
190
|
#
|
@@ -196,13 +197,15 @@ module Aws::CloudWatch
|
|
196
197
|
#
|
197
198
|
# ## Example
|
198
199
|
#
|
199
|
-
# instance.wait_until(max_attempts:10, delay:5)
|
200
|
+
# instance.wait_until(max_attempts:10, delay:5) do |instance|
|
201
|
+
# instance.state.name == 'running'
|
202
|
+
# end
|
200
203
|
#
|
201
204
|
# ## Configuration
|
202
205
|
#
|
203
206
|
# You can configure the maximum number of polling attempts, and the
|
204
|
-
# delay (in seconds) between each polling attempt. The waiting condition is
|
205
|
-
# by passing a block to {#wait_until}:
|
207
|
+
# delay (in seconds) between each polling attempt. The waiting condition is
|
208
|
+
# set by passing a block to {#wait_until}:
|
206
209
|
#
|
207
210
|
# # poll for ~25 seconds
|
208
211
|
# resource.wait_until(max_attempts:5,delay:5) {|resource|...}
|
@@ -233,17 +236,16 @@ module Aws::CloudWatch
|
|
233
236
|
# # resource did not enter the desired state in time
|
234
237
|
# end
|
235
238
|
#
|
239
|
+
# @yieldparam [Resource] resource to be used in the waiting condition.
|
236
240
|
#
|
237
|
-
# @
|
238
|
-
#
|
239
|
-
#
|
240
|
-
# because the waiter has entered a state that it will not transition
|
241
|
-
# out of, preventing success.
|
241
|
+
# @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter
|
242
|
+
# terminates because the waiter has entered a state that it will not
|
243
|
+
# transition out of, preventing success.
|
242
244
|
#
|
243
245
|
# yet successful.
|
244
246
|
#
|
245
|
-
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
|
246
|
-
# while polling for a resource that is not expected.
|
247
|
+
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
|
248
|
+
# encountered while polling for a resource that is not expected.
|
247
249
|
#
|
248
250
|
# @raise [NotImplementedError] Raised when the resource does not
|
249
251
|
#
|
@@ -397,8 +399,8 @@ module Aws::CloudWatch
|
|
397
399
|
|
398
400
|
def yield_waiter_and_warn(waiter, &block)
|
399
401
|
if !@waiter_block_warned
|
400
|
-
msg = "pass options to configure the waiter; "
|
401
|
-
|
402
|
+
msg = "pass options to configure the waiter; "\
|
403
|
+
"yielding the waiter is deprecated"
|
402
404
|
warn(msg)
|
403
405
|
@waiter_block_warned = true
|
404
406
|
end
|
@@ -406,7 +408,9 @@ module Aws::CloudWatch
|
|
406
408
|
end
|
407
409
|
|
408
410
|
def separate_params_and_options(options)
|
409
|
-
opts = Set.new(
|
411
|
+
opts = Set.new(
|
412
|
+
[:client, :max_attempts, :delay, :before_attempt, :before_wait]
|
413
|
+
)
|
410
414
|
waiter_opts = {}
|
411
415
|
waiter_params = {}
|
412
416
|
options.each_pair do |key, value|
|
@@ -90,7 +90,8 @@ module Aws::CloudWatch
|
|
90
90
|
# Waiter polls an API operation until a resource enters a desired
|
91
91
|
# state.
|
92
92
|
#
|
93
|
-
# @note The waiting operation is performed on a copy. The original resource
|
93
|
+
# @note The waiting operation is performed on a copy. The original resource
|
94
|
+
# remains unchanged.
|
94
95
|
#
|
95
96
|
# ## Basic Usage
|
96
97
|
#
|
@@ -103,13 +104,15 @@ module Aws::CloudWatch
|
|
103
104
|
#
|
104
105
|
# ## Example
|
105
106
|
#
|
106
|
-
# instance.wait_until(max_attempts:10, delay:5)
|
107
|
+
# instance.wait_until(max_attempts:10, delay:5) do |instance|
|
108
|
+
# instance.state.name == 'running'
|
109
|
+
# end
|
107
110
|
#
|
108
111
|
# ## Configuration
|
109
112
|
#
|
110
113
|
# You can configure the maximum number of polling attempts, and the
|
111
|
-
# delay (in seconds) between each polling attempt. The waiting condition is
|
112
|
-
# by passing a block to {#wait_until}:
|
114
|
+
# delay (in seconds) between each polling attempt. The waiting condition is
|
115
|
+
# set by passing a block to {#wait_until}:
|
113
116
|
#
|
114
117
|
# # poll for ~25 seconds
|
115
118
|
# resource.wait_until(max_attempts:5,delay:5) {|resource|...}
|
@@ -140,17 +143,16 @@ module Aws::CloudWatch
|
|
140
143
|
# # resource did not enter the desired state in time
|
141
144
|
# end
|
142
145
|
#
|
146
|
+
# @yieldparam [Resource] resource to be used in the waiting condition.
|
143
147
|
#
|
144
|
-
# @
|
145
|
-
#
|
146
|
-
#
|
147
|
-
# because the waiter has entered a state that it will not transition
|
148
|
-
# out of, preventing success.
|
148
|
+
# @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter
|
149
|
+
# terminates because the waiter has entered a state that it will not
|
150
|
+
# transition out of, preventing success.
|
149
151
|
#
|
150
152
|
# yet successful.
|
151
153
|
#
|
152
|
-
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
|
153
|
-
# while polling for a resource that is not expected.
|
154
|
+
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is
|
155
|
+
# encountered while polling for a resource that is not expected.
|
154
156
|
#
|
155
157
|
# @raise [NotImplementedError] Raised when the resource does not
|
156
158
|
#
|
@@ -584,7 +586,7 @@ module Aws::CloudWatch
|
|
584
586
|
namespace: @namespace,
|
585
587
|
metric_name: @name
|
586
588
|
)
|
587
|
-
|
589
|
+
@client.put_metric_alarm(options)
|
588
590
|
Alarm.new(
|
589
591
|
name: options[:alarm_name],
|
590
592
|
client: @client
|
@@ -6,13 +6,18 @@
|
|
6
6
|
# WARNING ABOUT GENERATED CODE
|
7
7
|
|
8
8
|
module Aws::CloudWatch
|
9
|
+
|
9
10
|
# This class provides a resource oriented interface for CloudWatch.
|
10
11
|
# To create a resource object:
|
12
|
+
#
|
11
13
|
# resource = Aws::CloudWatch::Resource.new(region: 'us-west-2')
|
14
|
+
#
|
12
15
|
# You can supply a client object with custom configuration that will be used for all resource operations.
|
13
|
-
# If you do not pass
|
16
|
+
# If you do not pass `:client`, a default client will be constructed.
|
17
|
+
#
|
14
18
|
# client = Aws::CloudWatch::Client.new(region: 'us-west-2')
|
15
19
|
# resource = Aws::CloudWatch::Resource.new(client: client)
|
20
|
+
#
|
16
21
|
class Resource
|
17
22
|
|
18
23
|
# @param options ({})
|
@@ -378,7 +378,7 @@ module Aws::CloudWatch
|
|
378
378
|
# value: "DimensionValue", # required
|
379
379
|
# },
|
380
380
|
# ],
|
381
|
-
# stat: "
|
381
|
+
# stat: "AnomalyDetectorMetricStat", # required
|
382
382
|
# }
|
383
383
|
#
|
384
384
|
# @!attribute [rw] namespace
|
@@ -1995,12 +1995,21 @@ module Aws::CloudWatch
|
|
1995
1995
|
#
|
1996
1996
|
# @!attribute [rw] resource_arn
|
1997
1997
|
# The ARN of the CloudWatch resource that you want to view tags for.
|
1998
|
-
#
|
1999
|
-
#
|
1998
|
+
#
|
1999
|
+
# The ARN format of an alarm is
|
2000
|
+
# `arn:aws:cloudwatch:Region:account-id:alarm:alarm-name `
|
2001
|
+
#
|
2002
|
+
# The ARN format of a Contributor Insights rule is
|
2003
|
+
# `arn:aws:cloudwatch:Region:account-id:insight-rule:insight-rule-name
|
2004
|
+
# `
|
2005
|
+
#
|
2006
|
+
# For more information on ARN format, see [ Resource Types Defined by
|
2007
|
+
# Amazon CloudWatch][1] in the *Amazon Web Services General
|
2008
|
+
# Reference*.
|
2000
2009
|
#
|
2001
2010
|
#
|
2002
2011
|
#
|
2003
|
-
# [1]: https://docs.aws.amazon.com/
|
2012
|
+
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazoncloudwatch.html#amazoncloudwatch-resources-for-iam-policies
|
2004
2013
|
# @return [String]
|
2005
2014
|
#
|
2006
2015
|
# @see http://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/ListTagsForResourceInput AWS API Documentation
|
@@ -2689,7 +2698,7 @@ module Aws::CloudWatch
|
|
2689
2698
|
# value: "DimensionValue", # required
|
2690
2699
|
# },
|
2691
2700
|
# ],
|
2692
|
-
# stat: "
|
2701
|
+
# stat: "AnomalyDetectorMetricStat", # required
|
2693
2702
|
# configuration: {
|
2694
2703
|
# excluded_time_ranges: [
|
2695
2704
|
# {
|
@@ -2948,6 +2957,12 @@ module Aws::CloudWatch
|
|
2948
2957
|
# rule_name: "InsightRuleName", # required
|
2949
2958
|
# rule_state: "InsightRuleState",
|
2950
2959
|
# rule_definition: "InsightRuleDefinition", # required
|
2960
|
+
# tags: [
|
2961
|
+
# {
|
2962
|
+
# key: "TagKey", # required
|
2963
|
+
# value: "TagValue", # required
|
2964
|
+
# },
|
2965
|
+
# ],
|
2951
2966
|
# }
|
2952
2967
|
#
|
2953
2968
|
# @!attribute [rw] rule_name
|
@@ -2967,12 +2982,35 @@ module Aws::CloudWatch
|
|
2967
2982
|
# [1]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/ContributorInsights-RuleSyntax.html
|
2968
2983
|
# @return [String]
|
2969
2984
|
#
|
2985
|
+
# @!attribute [rw] tags
|
2986
|
+
# A list of key-value pairs to associate with the Contributor Insights
|
2987
|
+
# rule. You can associate as many as 50 tags with a rule.
|
2988
|
+
#
|
2989
|
+
# Tags can help you organize and categorize your resources. You can
|
2990
|
+
# also use them to scope user permissions, by granting a user
|
2991
|
+
# permission to access or change only the resources that have certain
|
2992
|
+
# tag values.
|
2993
|
+
#
|
2994
|
+
# To be able to associate tags with a rule, you must have the
|
2995
|
+
# `cloudwatch:TagResource` permission in addition to the
|
2996
|
+
# `cloudwatch:PutInsightRule` permission.
|
2997
|
+
#
|
2998
|
+
# If you are using this operation to update an existing Contributor
|
2999
|
+
# Insights rule, any tags you specify in this parameter are ignored.
|
3000
|
+
# To change the tags of an existing rule, use [TagResource][1].
|
3001
|
+
#
|
3002
|
+
#
|
3003
|
+
#
|
3004
|
+
# [1]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_TagResource.html
|
3005
|
+
# @return [Array<Types::Tag>]
|
3006
|
+
#
|
2970
3007
|
# @see http://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/PutInsightRuleInput AWS API Documentation
|
2971
3008
|
#
|
2972
3009
|
class PutInsightRuleInput < Struct.new(
|
2973
3010
|
:rule_name,
|
2974
3011
|
:rule_state,
|
2975
|
-
:rule_definition
|
3012
|
+
:rule_definition,
|
3013
|
+
:tags)
|
2976
3014
|
include Aws::Structure
|
2977
3015
|
end
|
2978
3016
|
|
@@ -3578,8 +3616,22 @@ module Aws::CloudWatch
|
|
3578
3616
|
# }
|
3579
3617
|
#
|
3580
3618
|
# @!attribute [rw] resource_arn
|
3581
|
-
# The ARN of the CloudWatch
|
3582
|
-
#
|
3619
|
+
# The ARN of the CloudWatch resource that you're adding tags to.
|
3620
|
+
#
|
3621
|
+
# The ARN format of an alarm is
|
3622
|
+
# `arn:aws:cloudwatch:Region:account-id:alarm:alarm-name `
|
3623
|
+
#
|
3624
|
+
# The ARN format of a Contributor Insights rule is
|
3625
|
+
# `arn:aws:cloudwatch:Region:account-id:insight-rule:insight-rule-name
|
3626
|
+
# `
|
3627
|
+
#
|
3628
|
+
# For more information on ARN format, see [ Resource Types Defined by
|
3629
|
+
# Amazon CloudWatch][1] in the *Amazon Web Services General
|
3630
|
+
# Reference*.
|
3631
|
+
#
|
3632
|
+
#
|
3633
|
+
#
|
3634
|
+
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazoncloudwatch.html#amazoncloudwatch-resources-for-iam-policies
|
3583
3635
|
# @return [String]
|
3584
3636
|
#
|
3585
3637
|
# @!attribute [rw] tags
|
@@ -3608,12 +3660,21 @@ module Aws::CloudWatch
|
|
3608
3660
|
#
|
3609
3661
|
# @!attribute [rw] resource_arn
|
3610
3662
|
# The ARN of the CloudWatch resource that you're removing tags from.
|
3611
|
-
#
|
3612
|
-
#
|
3663
|
+
#
|
3664
|
+
# The ARN format of an alarm is
|
3665
|
+
# `arn:aws:cloudwatch:Region:account-id:alarm:alarm-name `
|
3666
|
+
#
|
3667
|
+
# The ARN format of a Contributor Insights rule is
|
3668
|
+
# `arn:aws:cloudwatch:Region:account-id:insight-rule:insight-rule-name
|
3669
|
+
# `
|
3670
|
+
#
|
3671
|
+
# For more information on ARN format, see [ Resource Types Defined by
|
3672
|
+
# Amazon CloudWatch][1] in the *Amazon Web Services General
|
3673
|
+
# Reference*.
|
3613
3674
|
#
|
3614
3675
|
#
|
3615
3676
|
#
|
3616
|
-
# [1]: https://docs.aws.amazon.com/
|
3677
|
+
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazoncloudwatch.html#amazoncloudwatch-resources-for-iam-policies
|
3617
3678
|
# @return [String]
|
3618
3679
|
#
|
3619
3680
|
# @!attribute [rw] tag_keys
|
@@ -8,6 +8,68 @@
|
|
8
8
|
require 'aws-sdk-core/waiters'
|
9
9
|
|
10
10
|
module Aws::CloudWatch
|
11
|
+
# Waiters are utility methods that poll for a particular state to occur
|
12
|
+
# on a client. Waiters can fail after a number of attempts at a polling
|
13
|
+
# interval defined for the service client.
|
14
|
+
#
|
15
|
+
# For a list of operations that can be waited for and the
|
16
|
+
# client methods called for each operation, see the table below or the
|
17
|
+
# {Client#wait_until} field documentation for the {Client}.
|
18
|
+
#
|
19
|
+
# # Invoking a Waiter
|
20
|
+
# To invoke a waiter, call #wait_until on a {Client}. The first parameter
|
21
|
+
# is the waiter name, which is specific to the service client and indicates
|
22
|
+
# which operation is being waited for. The second parameter is a hash of
|
23
|
+
# parameters that are passed to the client method called by the waiter,
|
24
|
+
# which varies according to the waiter name.
|
25
|
+
#
|
26
|
+
# # Wait Failures
|
27
|
+
# To catch errors in a waiter, use WaiterFailed,
|
28
|
+
# as shown in the following example.
|
29
|
+
#
|
30
|
+
# rescue rescue Aws::Waiters::Errors::WaiterFailed => error
|
31
|
+
# puts "failed waiting for instance running: #{error.message}
|
32
|
+
# end
|
33
|
+
#
|
34
|
+
# # Configuring a Waiter
|
35
|
+
# Each waiter has a default polling interval and a maximum number of
|
36
|
+
# attempts it will make before returning control to your program.
|
37
|
+
# To set these values, use the `max_attempts` and `delay` parameters
|
38
|
+
# in your `#wait_until` call.
|
39
|
+
# The following example waits for up to 25 seconds, polling every five seconds.
|
40
|
+
#
|
41
|
+
# client.wait_until(...) do |w|
|
42
|
+
# w.max_attempts = 5
|
43
|
+
# w.delay = 5
|
44
|
+
# end
|
45
|
+
#
|
46
|
+
# To disable wait failures, set the value of either of these parameters
|
47
|
+
# to `nil`.
|
48
|
+
#
|
49
|
+
# # Extending a Waiter
|
50
|
+
# To modify the behavior of waiters, you can register callbacks that are
|
51
|
+
# triggered before each polling attempt and before waiting.
|
52
|
+
#
|
53
|
+
# The following example implements an exponential backoff in a waiter
|
54
|
+
# by doubling the amount of time to wait on every attempt.
|
55
|
+
#
|
56
|
+
# client.wait_until(...) do |w|
|
57
|
+
# w.interval = 0 # disable normal sleep
|
58
|
+
# w.before_wait do |n, resp|
|
59
|
+
# sleep(n ** 2)
|
60
|
+
# end
|
61
|
+
# end
|
62
|
+
#
|
63
|
+
# # Available Waiters
|
64
|
+
#
|
65
|
+
# The following table lists the valid waiter names, the operations they call,
|
66
|
+
# and the default `:delay` and `:max_attempts` values.
|
67
|
+
#
|
68
|
+
# | waiter_name | params | :delay | :max_attempts |
|
69
|
+
# | ---------------------- | ------------------------ | -------- | ------------- |
|
70
|
+
# | alarm_exists | {Client#describe_alarms} | 5 | 40 |
|
71
|
+
# | composite_alarm_exists | {Client#describe_alarms} | 5 | 40 |
|
72
|
+
#
|
11
73
|
module Waiters
|
12
74
|
|
13
75
|
class AlarmExists
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-sdk-cloudwatch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.39.1
|
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: 2020-
|
11
|
+
date: 2020-06-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-core
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: '3'
|
20
20
|
- - ">="
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 3.
|
22
|
+
version: 3.99.0
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: '3'
|
30
30
|
- - ">="
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: 3.
|
32
|
+
version: 3.99.0
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: aws-sigv4
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -85,7 +85,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
85
85
|
version: '0'
|
86
86
|
requirements: []
|
87
87
|
rubyforge_project:
|
88
|
-
rubygems_version: 2.
|
88
|
+
rubygems_version: 2.7.6.2
|
89
89
|
signing_key:
|
90
90
|
specification_version: 4
|
91
91
|
summary: AWS SDK for Ruby - CloudWatch
|