aws-sdk-cloudwatch 1.34.0 → 1.35.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: d97d68f272bd0975d5f06dad6f046f3f0d3b5918
4
- data.tar.gz: 6213a8482246b9645775509fdff602d92622bdb3
2
+ SHA256:
3
+ metadata.gz: 4a9951080320423850d4a95241018df27ed510c324cc1e47fff4557462535b5c
4
+ data.tar.gz: 90169a26a61e5a563bb4b5beab7c8ccb558a3c12599ea31978aded1151169605
5
5
  SHA512:
6
- metadata.gz: 560eee2ce461fc9b27f260d6038bc2cde33f1ca178a3133113cdaefca5a7a2ef2b58fc8182531d850c09171b7a031ddb5affbd6e30f939902f5f436d8ac4dfa5
7
- data.tar.gz: 46c17dd20f6cd2fcc48a981681c0a887d216ac07ff98adc271a4af0c6d1f90beab4d0b8bd78a961d8e1c1aa61fc4c957b5261fbf48c5281ecf0790872a266333
6
+ metadata.gz: 1bbb4c13b9fe87f171090dedc9f3c642db17f4f60e127f6c7835bd9f0038f1120099084544e49d4d23f506afef3714115625a8acfa5d84e2b4c8729453bac0ed
7
+ data.tar.gz: 1a15aeb6526501bf46a2f657016e47260b2c0e17f4eeb414d67c1db34aaa418b7cf4fd6e44de266bc0abe2889629d99912138381e5c590a75bff3f2df0360c52
@@ -49,6 +49,6 @@ require_relative 'aws-sdk-cloudwatch/customizations'
49
49
  # @service
50
50
  module Aws::CloudWatch
51
51
 
52
- GEM_VERSION = '1.34.0'
52
+ GEM_VERSION = '1.35.0'
53
53
 
54
54
  end
@@ -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 remains unchanged
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) {|instance| instance.state.name == 'running' }
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 set
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
- # @yield param [Resource] resource to be used in the waiting condition
338
- #
339
- # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter terminates
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 encountered
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
  #
@@ -521,7 +523,9 @@ module Aws::CloudWatch
521
523
  end
522
524
 
523
525
  def separate_params_and_options(options)
524
- opts = Set.new([:client, :max_attempts, :delay, :before_attempt, :before_wait])
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|
@@ -32,11 +32,11 @@ Aws::Plugins::GlobalConfiguration.add_identifier(:cloudwatch)
32
32
  module Aws::CloudWatch
33
33
  # An API client for CloudWatch. To construct a client, you need to configure a `:region` and `:credentials`.
34
34
  #
35
- # client = Aws::CloudWatch::Client.new(
36
- # region: region_name,
37
- # credentials: credentials,
38
- # # ...
39
- # )
35
+ # client = Aws::CloudWatch::Client.new(
36
+ # region: region_name,
37
+ # credentials: credentials,
38
+ # # ...
39
+ # )
40
40
  #
41
41
  # For details on configuring region and credentials see
42
42
  # the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
@@ -229,15 +229,19 @@ module Aws::CloudWatch
229
229
  #
230
230
  # @option options [String] :retry_mode ("legacy")
231
231
  # Specifies which retry algorithm to use. Values are:
232
- # * `legacy` - The pre-existing retry behavior. This is default value if
233
- # no retry mode is provided.
234
- # * `standard` - A standardized set of retry rules across the AWS SDKs.
235
- # This includes support for retry quotas, which limit the number of
236
- # unsuccessful retries a client can make.
237
- # * `adaptive` - An experimental retry mode that includes all the
238
- # functionality of `standard` mode along with automatic client side
239
- # throttling. This is a provisional mode that may change behavior
240
- # in the future.
232
+ #
233
+ # * `legacy` - The pre-existing retry behavior. This is default value if
234
+ # no retry mode is provided.
235
+ #
236
+ # * `standard` - A standardized set of retry rules across the AWS SDKs.
237
+ # This includes support for retry quotas, which limit the number of
238
+ # unsuccessful retries a client can make.
239
+ #
240
+ # * `adaptive` - An experimental retry mode that includes all the
241
+ # functionality of `standard` mode along with automatic client side
242
+ # throttling. This is a provisional mode that may change behavior
243
+ # in the future.
244
+ #
241
245
  #
242
246
  # @option options [String] :secret_access_key
243
247
  #
@@ -265,8 +269,7 @@ module Aws::CloudWatch
265
269
  #
266
270
  # @option options [Integer] :http_read_timeout (60) The default
267
271
  # 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}.
272
+ # safely be set per-request on the session.
270
273
  #
271
274
  # @option options [Float] :http_idle_timeout (5) The number of
272
275
  # seconds a connection is allowed to sit idle before it is
@@ -278,7 +281,7 @@ module Aws::CloudWatch
278
281
  # request body. This option has no effect unless the request has
279
282
  # "Expect" header set to "100-continue". Defaults to `nil` which
280
283
  # disables this behaviour. This value can safely be set per
281
- # request on the session yielded by {#session_for}.
284
+ # request on the session.
282
285
  #
283
286
  # @option options [Boolean] :http_wire_trace (false) When `true`,
284
287
  # HTTP debug output will be sent to the `:logger`.
@@ -379,7 +382,7 @@ module Aws::CloudWatch
379
382
  # value: "DimensionValue", # required
380
383
  # },
381
384
  # ],
382
- # stat: "Stat", # required
385
+ # stat: "AnomalyDetectorMetricStat", # required
383
386
  # })
384
387
  #
385
388
  # @see http://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DeleteAnomalyDetector AWS API Documentation
@@ -499,6 +502,8 @@ module Aws::CloudWatch
499
502
  # * {Types::DescribeAlarmHistoryOutput#alarm_history_items #alarm_history_items} => Array<Types::AlarmHistoryItem>
500
503
  # * {Types::DescribeAlarmHistoryOutput#next_token #next_token} => String
501
504
  #
505
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
506
+ #
502
507
  # @example Request syntax with placeholder values
503
508
  #
504
509
  # resp = client.describe_alarm_history({
@@ -614,6 +619,8 @@ module Aws::CloudWatch
614
619
  # * {Types::DescribeAlarmsOutput#metric_alarms #metric_alarms} => Array<Types::MetricAlarm>
615
620
  # * {Types::DescribeAlarmsOutput#next_token #next_token} => String
616
621
  #
622
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
623
+ #
617
624
  # @example Request syntax with placeholder values
618
625
  #
619
626
  # resp = client.describe_alarms({
@@ -695,6 +702,12 @@ module Aws::CloudWatch
695
702
  # resp.metric_alarms[0].threshold_metric_id #=> String
696
703
  # resp.next_token #=> String
697
704
  #
705
+ #
706
+ # The following waiters are defined for this operation (see {Client#wait_until} for detailed usage):
707
+ #
708
+ # * alarm_exists
709
+ # * composite_alarm_exists
710
+ #
698
711
  # @see http://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/DescribeAlarms AWS API Documentation
699
712
  #
700
713
  # @overload describe_alarms(params = {})
@@ -910,6 +923,8 @@ module Aws::CloudWatch
910
923
  # * {Types::DescribeInsightRulesOutput#next_token #next_token} => String
911
924
  # * {Types::DescribeInsightRulesOutput#insight_rules #insight_rules} => Array<Types::InsightRule>
912
925
  #
926
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
927
+ #
913
928
  # @example Request syntax with placeholder values
914
929
  #
915
930
  # resp = client.describe_insight_rules({
@@ -1362,6 +1377,8 @@ module Aws::CloudWatch
1362
1377
  # * {Types::GetMetricDataOutput#next_token #next_token} => String
1363
1378
  # * {Types::GetMetricDataOutput#messages #messages} => Array<Types::MessageData>
1364
1379
  #
1380
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
1381
+ #
1365
1382
  # @example Request syntax with placeholder values
1366
1383
  #
1367
1384
  # resp = client.get_metric_data({
@@ -1753,6 +1770,8 @@ module Aws::CloudWatch
1753
1770
  # * {Types::ListDashboardsOutput#dashboard_entries #dashboard_entries} => Array<Types::DashboardEntry>
1754
1771
  # * {Types::ListDashboardsOutput#next_token #next_token} => String
1755
1772
  #
1773
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
1774
+ #
1756
1775
  # @example Request syntax with placeholder values
1757
1776
  #
1758
1777
  # resp = client.list_dashboards({
@@ -1812,6 +1831,8 @@ module Aws::CloudWatch
1812
1831
  # * {Types::ListMetricsOutput#metrics #metrics} => Array<Types::Metric>
1813
1832
  # * {Types::ListMetricsOutput#next_token #next_token} => String
1814
1833
  #
1834
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
1835
+ #
1815
1836
  # @example Request syntax with placeholder values
1816
1837
  #
1817
1838
  # resp = client.list_metrics({
@@ -1845,17 +1866,24 @@ module Aws::CloudWatch
1845
1866
  req.send_request(options)
1846
1867
  end
1847
1868
 
1848
- # Displays the tags associated with a CloudWatch resource. Alarms
1849
- # support tagging.
1869
+ # Displays the tags associated with a CloudWatch resource. Currently,
1870
+ # alarms and Contributor Insights rules support tagging.
1850
1871
  #
1851
1872
  # @option params [required, String] :resource_arn
1852
- # The ARN of the CloudWatch resource that you want to view tags for. For
1853
- # more information on ARN format, see [Example ARNs][1] in the *Amazon
1854
- # Web Services General Reference*.
1873
+ # The ARN of the CloudWatch resource that you want to view tags for.
1874
+ #
1875
+ # The ARN format of an alarm is
1876
+ # `arn:aws:cloudwatch:Region:account-id:alarm:alarm-name `
1877
+ #
1878
+ # The ARN format of a Contributor Insights rule is
1879
+ # `arn:aws:cloudwatch:Region:account-id:insight-rule:insight-rule-name `
1880
+ #
1881
+ # For more information on ARN format, see [ Resource Types Defined by
1882
+ # Amazon CloudWatch][1] in the *Amazon Web Services General Reference*.
1855
1883
  #
1856
1884
  #
1857
1885
  #
1858
- # [1]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-cloudwatch
1886
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazoncloudwatch.html#amazoncloudwatch-resources-for-iam-policies
1859
1887
  #
1860
1888
  # @return [Types::ListTagsForResourceOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1861
1889
  #
@@ -1927,7 +1955,7 @@ module Aws::CloudWatch
1927
1955
  # value: "DimensionValue", # required
1928
1956
  # },
1929
1957
  # ],
1930
- # stat: "Stat", # required
1958
+ # stat: "AnomalyDetectorMetricStat", # required
1931
1959
  # configuration: {
1932
1960
  # excluded_time_ranges: [
1933
1961
  # {
@@ -2214,6 +2242,26 @@ module Aws::CloudWatch
2214
2242
  #
2215
2243
  # [1]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/ContributorInsights-RuleSyntax.html
2216
2244
  #
2245
+ # @option params [Array<Types::Tag>] :tags
2246
+ # A list of key-value pairs to associate with the Contributor Insights
2247
+ # rule. You can associate as many as 50 tags with a rule.
2248
+ #
2249
+ # Tags can help you organize and categorize your resources. You can also
2250
+ # use them to scope user permissions, by granting a user permission to
2251
+ # access or change only the resources that have certain tag values.
2252
+ #
2253
+ # To be able to associate tags with a rule, you must have the
2254
+ # `cloudwatch:TagResource` permission in addition to the
2255
+ # `cloudwatch:PutInsightRule` permission.
2256
+ #
2257
+ # If you are using this operation to update an existing Contributor
2258
+ # Insights rule, any tags you specify in this parameter are ignored. To
2259
+ # change the tags of an existing rule, use [TagResource][1].
2260
+ #
2261
+ #
2262
+ #
2263
+ # [1]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_TagResource.html
2264
+ #
2217
2265
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
2218
2266
  #
2219
2267
  # @example Request syntax with placeholder values
@@ -2222,6 +2270,12 @@ module Aws::CloudWatch
2222
2270
  # rule_name: "InsightRuleName", # required
2223
2271
  # rule_state: "InsightRuleState",
2224
2272
  # rule_definition: "InsightRuleDefinition", # required
2273
+ # tags: [
2274
+ # {
2275
+ # key: "TagKey", # required
2276
+ # value: "TagValue", # required
2277
+ # },
2278
+ # ],
2225
2279
  # })
2226
2280
  #
2227
2281
  # @see http://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/PutInsightRule AWS API Documentation
@@ -2780,7 +2834,7 @@ module Aws::CloudWatch
2780
2834
 
2781
2835
  # Assigns one or more tags (key-value pairs) to the specified CloudWatch
2782
2836
  # resource. Currently, the only CloudWatch resources that can be tagged
2783
- # are alarms.
2837
+ # are alarms and Contributor Insights rules.
2784
2838
  #
2785
2839
  # Tags can help you organize and categorize your resources. You can also
2786
2840
  # use them to scope user permissions, by granting a user permission to
@@ -2795,11 +2849,23 @@ module Aws::CloudWatch
2795
2849
  # key that is already associated with the alarm, the new tag value that
2796
2850
  # you specify replaces the previous value for that tag.
2797
2851
  #
2798
- # You can associate as many as 50 tags with a resource.
2852
+ # You can associate as many as 50 tags with a CloudWatch resource.
2799
2853
  #
2800
2854
  # @option params [required, String] :resource_arn
2801
- # The ARN of the CloudWatch alarm that you're adding tags to. The ARN
2802
- # format is `arn:aws:cloudwatch:Region:account-id:alarm:alarm-name `
2855
+ # The ARN of the CloudWatch resource that you're adding tags to.
2856
+ #
2857
+ # The ARN format of an alarm is
2858
+ # `arn:aws:cloudwatch:Region:account-id:alarm:alarm-name `
2859
+ #
2860
+ # The ARN format of a Contributor Insights rule is
2861
+ # `arn:aws:cloudwatch:Region:account-id:insight-rule:insight-rule-name `
2862
+ #
2863
+ # For more information on ARN format, see [ Resource Types Defined by
2864
+ # Amazon CloudWatch][1] in the *Amazon Web Services General Reference*.
2865
+ #
2866
+ #
2867
+ #
2868
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazoncloudwatch.html#amazoncloudwatch-resources-for-iam-policies
2803
2869
  #
2804
2870
  # @option params [required, Array<Types::Tag>] :tags
2805
2871
  # The list of key-value pairs to associate with the alarm.
@@ -2831,12 +2897,19 @@ module Aws::CloudWatch
2831
2897
  #
2832
2898
  # @option params [required, String] :resource_arn
2833
2899
  # The ARN of the CloudWatch resource that you're removing tags from.
2834
- # For more information on ARN format, see [Example ARNs][1] in the
2835
- # *Amazon Web Services General Reference*.
2900
+ #
2901
+ # The ARN format of an alarm is
2902
+ # `arn:aws:cloudwatch:Region:account-id:alarm:alarm-name `
2903
+ #
2904
+ # The ARN format of a Contributor Insights rule is
2905
+ # `arn:aws:cloudwatch:Region:account-id:insight-rule:insight-rule-name `
2906
+ #
2907
+ # For more information on ARN format, see [ Resource Types Defined by
2908
+ # Amazon CloudWatch][1] in the *Amazon Web Services General Reference*.
2836
2909
  #
2837
2910
  #
2838
2911
  #
2839
- # [1]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-cloudwatch
2912
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazoncloudwatch.html#amazoncloudwatch-resources-for-iam-policies
2840
2913
  #
2841
2914
  # @option params [required, Array<String>] :tag_keys
2842
2915
  # The list of tag keys to remove from the resource.
@@ -2872,7 +2945,7 @@ module Aws::CloudWatch
2872
2945
  params: params,
2873
2946
  config: config)
2874
2947
  context[:gem_name] = 'aws-sdk-cloudwatch'
2875
- context[:gem_version] = '1.34.0'
2948
+ context[:gem_version] = '1.35.0'
2876
2949
  Seahorse::Client::Request.new(handlers, context)
2877
2950
  end
2878
2951
 
@@ -2938,10 +3011,10 @@ module Aws::CloudWatch
2938
3011
  # The following table lists the valid waiter names, the operations they call,
2939
3012
  # and the default `:delay` and `:max_attempts` values.
2940
3013
  #
2941
- # | waiter_name | params | :delay | :max_attempts |
2942
- # | ---------------------- | ------------------ | -------- | ------------- |
2943
- # | alarm_exists | {#describe_alarms} | 5 | 40 |
2944
- # | composite_alarm_exists | {#describe_alarms} | 5 | 40 |
3014
+ # | waiter_name | params | :delay | :max_attempts |
3015
+ # | ---------------------- | ------------------------ | -------- | ------------- |
3016
+ # | alarm_exists | {Client#describe_alarms} | 5 | 40 |
3017
+ # | composite_alarm_exists | {Client#describe_alarms} | 5 | 40 |
2945
3018
  #
2946
3019
  # @raise [Errors::FailureStateError] Raised when the waiter terminates
2947
3020
  # 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: Stat, location_name: "Stat"))
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: Stat, required: true, location_name: "Stat"))
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: Stat, required: true, location_name: "Stat"))
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 remains unchanged
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) {|instance| instance.state.name == 'running' }
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 set
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
- # @yield param [Resource] resource to be used in the waiting condition
238
- #
239
- # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter terminates
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 encountered
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
  #
@@ -406,7 +408,9 @@ module Aws::CloudWatch
406
408
  end
407
409
 
408
410
  def separate_params_and_options(options)
409
- opts = Set.new([:client, :max_attempts, :delay, :before_attempt, :before_wait])
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 remains unchanged
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) {|instance| instance.state.name == 'running' }
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 set
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
- # @yield param [Resource] resource to be used in the waiting condition
145
- #
146
- # @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter terminates
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 encountered
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
  #
@@ -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 +:client+, a default client will be constructed.
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: "Stat", # required
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
- # For more information on ARN format, see [Example ARNs][1] in the
1999
- # *Amazon Web Services General Reference*.
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/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-cloudwatch
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: "Stat", # required
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 alarm that you're adding tags to. The ARN
3582
- # format is `arn:aws:cloudwatch:Region:account-id:alarm:alarm-name `
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
- # For more information on ARN format, see [Example ARNs][1] in the
3612
- # *Amazon Web Services General Reference*.
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/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-cloudwatch
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.34.0
4
+ version: 1.35.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: 2020-03-09 00:00:00.000000000 Z
11
+ date: 2020-04-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core
@@ -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.5.2.3
88
+ rubygems_version: 2.7.6.2
89
89
  signing_key:
90
90
  specification_version: 4
91
91
  summary: AWS SDK for Ruby - CloudWatch