aws-sdk-cloudwatch 1.32.0 → 1.33.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
2
  SHA1:
3
- metadata.gz: a833e36820b3aa32124d0d9820219d0f82c3379e
4
- data.tar.gz: 8491a05ccf7e6c68614929cc0ca5eaad00fec9d0
3
+ metadata.gz: 6f64744d056e95f2c7f2e6b459a840e0445170eb
4
+ data.tar.gz: ccd6ce9253f5ba3fe720c7819b5031644f1e54bc
5
5
  SHA512:
6
- metadata.gz: 74c18ce6d4172c16ede10a78ccd610ccc345b7bfb842c1a01309396bac347b7f949de5828d0c20b7ca94e2680ffa963f2ab3a80038bdd9771eccc1548f3c28db
7
- data.tar.gz: ff2cb2ecf10b24fc41433fd4bf8edd52e33a47b3754fcd41df6891013a048c9f21bea3b078f2dd1fac5c8cdab05ba20c453f483bade3f8559389c09ab8cf3280
6
+ metadata.gz: 480d4bc41195774d6adf9bae343eb479c3e48ca052c175dfbfc7cae79d0acceb2d81fbd75ee7f0cb81a9417b58def5d92235dbbcde67f17bea2a40dee854d73e
7
+ data.tar.gz: 47be1486ba6d47ec2b2404dfeafa3c42ce39a87457de61a4d1405eda8daa5050d960920c65abf703f635b79103fac8dff167f8d6795d9998023593293263521c
@@ -15,6 +15,7 @@ require_relative 'aws-sdk-cloudwatch/errors'
15
15
  require_relative 'aws-sdk-cloudwatch/waiters'
16
16
  require_relative 'aws-sdk-cloudwatch/resource'
17
17
  require_relative 'aws-sdk-cloudwatch/alarm'
18
+ require_relative 'aws-sdk-cloudwatch/composite_alarm'
18
19
  require_relative 'aws-sdk-cloudwatch/metric'
19
20
  require_relative 'aws-sdk-cloudwatch/customizations'
20
21
 
@@ -45,6 +46,6 @@ require_relative 'aws-sdk-cloudwatch/customizations'
45
46
  # @service
46
47
  module Aws::CloudWatch
47
48
 
48
- GEM_VERSION = '1.32.0'
49
+ GEM_VERSION = '1.33.0'
49
50
 
50
51
  end
@@ -388,13 +388,19 @@ module Aws::CloudWatch
388
388
  # @example Request syntax with placeholder values
389
389
  #
390
390
  # alarm.describe_history({
391
+ # alarm_types: ["CompositeAlarm"], # accepts CompositeAlarm, MetricAlarm
391
392
  # history_item_type: "ConfigurationUpdate", # accepts ConfigurationUpdate, StateUpdate, Action
392
393
  # start_date: Time.now,
393
394
  # end_date: Time.now,
394
395
  # max_records: 1,
395
396
  # next_token: "NextToken",
397
+ # scan_by: "TimestampDescending", # accepts TimestampDescending, TimestampAscending
396
398
  # })
397
399
  # @param [Hash] options ({})
400
+ # @option options [Array<String>] :alarm_types
401
+ # Use this parameter to specify whether you want the operation to return
402
+ # metric alarms or composite alarms. If you omit this parameter, only
403
+ # metric alarms are returned.
398
404
  # @option options [String] :history_item_type
399
405
  # The type of alarm histories to retrieve.
400
406
  # @option options [Time,DateTime,Date,Integer,String] :start_date
@@ -406,6 +412,11 @@ module Aws::CloudWatch
406
412
  # @option options [String] :next_token
407
413
  # The token returned by a previous call to indicate that there is more
408
414
  # data available.
415
+ # @option options [String] :scan_by
416
+ # Specified whether to return the newest or oldest alarm history first.
417
+ # Specify `TimestampDescending` to have the newest event history
418
+ # returned first, and specify `TimestampAscending` to have the oldest
419
+ # history returned first.
409
420
  # @return [Types::DescribeAlarmHistoryOutput]
410
421
  def describe_history(options = {})
411
422
  options = options.merge(alarm_name: @name)
@@ -451,6 +462,11 @@ module Aws::CloudWatch
451
462
  # @option options [String] :state_reason_data
452
463
  # The reason that this alarm is set to this specific state, in JSON
453
464
  # format.
465
+ #
466
+ # For SNS or EC2 alarm actions, this is just informational. But for EC2
467
+ # Auto Scaling or application Auto Scaling alarm actions, the Auto
468
+ # Scaling policy uses the information in this field to take the correct
469
+ # action.
454
470
  # @return [EmptyStructure]
455
471
  def set_state(options = {})
456
472
  options = options.merge(alarm_name: @name)
@@ -254,8 +254,31 @@ module Aws::CloudWatch
254
254
 
255
255
  # @!group API Operations
256
256
 
257
- # Deletes the specified alarms. You can delete up to 50 alarms in one
258
- # operation. In the event of an error, no alarms are deleted.
257
+ # Deletes the specified alarms. You can delete up to 100 alarms in one
258
+ # operation. However, this total can include no more than one composite
259
+ # alarm. For example, you could delete 99 metric alarms and one
260
+ # composite alarms with one operation, but you can't delete two
261
+ # composite alarms with one operation.
262
+ #
263
+ # In the event of an error, no alarms are deleted.
264
+ #
265
+ # <note markdown="1"> It is possible to create a loop or cycle of composite alarms, where
266
+ # composite alarm A depends on composite alarm B, and composite alarm B
267
+ # also depends on composite alarm A. In this scenario, you can't delete
268
+ # any composite alarm that is part of the cycle because there is always
269
+ # still a composite alarm that depends on that alarm that you want to
270
+ # delete.
271
+ #
272
+ # To get out of such a situation, you must break the cycle by changing
273
+ # the rule of one of the composite alarms in the cycle to remove a
274
+ # dependency that creates the cycle. The simplest change to make to
275
+ # break a cycle is to change the `AlarmRule` of one of the alarms to
276
+ # `False`.
277
+ #
278
+ # Additionally, the evaluation of composite alarms stops if CloudWatch
279
+ # detects a cycle in the evaluation path.
280
+ #
281
+ # </note>
259
282
  #
260
283
  # @option params [required, Array<String>] :alarm_names
261
284
  # The alarms to be deleted.
@@ -349,7 +372,11 @@ module Aws::CloudWatch
349
372
  #
350
373
  # @option params [required, Array<String>] :rule_names
351
374
  # An array of the rule names to delete. If you need to find out the
352
- # names of your rules, use DescribeInsightRules.
375
+ # names of your rules, use [DescribeInsightRules][1].
376
+ #
377
+ #
378
+ #
379
+ # [1]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_DescribeInsightRules.html
353
380
  #
354
381
  # @return [Types::DeleteInsightRulesOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
355
382
  #
@@ -380,7 +407,8 @@ module Aws::CloudWatch
380
407
 
381
408
  # Retrieves the history for the specified alarm. You can filter the
382
409
  # results by date range or item type. If an alarm name is not specified,
383
- # the histories for all alarms are returned.
410
+ # the histories for either all metric alarms or all composite alarms are
411
+ # returned.
384
412
  #
385
413
  # CloudWatch retains the history of an alarm even if you delete the
386
414
  # alarm.
@@ -388,6 +416,11 @@ module Aws::CloudWatch
388
416
  # @option params [String] :alarm_name
389
417
  # The name of the alarm.
390
418
  #
419
+ # @option params [Array<String>] :alarm_types
420
+ # Use this parameter to specify whether you want the operation to return
421
+ # metric alarms or composite alarms. If you omit this parameter, only
422
+ # metric alarms are returned.
423
+ #
391
424
  # @option params [String] :history_item_type
392
425
  # The type of alarm histories to retrieve.
393
426
  #
@@ -404,6 +437,12 @@ module Aws::CloudWatch
404
437
  # The token returned by a previous call to indicate that there is more
405
438
  # data available.
406
439
  #
440
+ # @option params [String] :scan_by
441
+ # Specified whether to return the newest or oldest alarm history first.
442
+ # Specify `TimestampDescending` to have the newest event history
443
+ # returned first, and specify `TimestampAscending` to have the oldest
444
+ # history returned first.
445
+ #
407
446
  # @return [Types::DescribeAlarmHistoryOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
408
447
  #
409
448
  # * {Types::DescribeAlarmHistoryOutput#alarm_history_items #alarm_history_items} => Array&lt;Types::AlarmHistoryItem&gt;
@@ -413,17 +452,20 @@ module Aws::CloudWatch
413
452
  #
414
453
  # resp = client.describe_alarm_history({
415
454
  # alarm_name: "AlarmName",
455
+ # alarm_types: ["CompositeAlarm"], # accepts CompositeAlarm, MetricAlarm
416
456
  # history_item_type: "ConfigurationUpdate", # accepts ConfigurationUpdate, StateUpdate, Action
417
457
  # start_date: Time.now,
418
458
  # end_date: Time.now,
419
459
  # max_records: 1,
420
460
  # next_token: "NextToken",
461
+ # scan_by: "TimestampDescending", # accepts TimestampDescending, TimestampAscending
421
462
  # })
422
463
  #
423
464
  # @example Response structure
424
465
  #
425
466
  # resp.alarm_history_items #=> Array
426
467
  # resp.alarm_history_items[0].alarm_name #=> String
468
+ # resp.alarm_history_items[0].alarm_type #=> String, one of "CompositeAlarm", "MetricAlarm"
427
469
  # resp.alarm_history_items[0].timestamp #=> Time
428
470
  # resp.alarm_history_items[0].history_item_type #=> String, one of "ConfigurationUpdate", "StateUpdate", "Action"
429
471
  # resp.alarm_history_items[0].history_summary #=> String
@@ -439,22 +481,74 @@ module Aws::CloudWatch
439
481
  req.send_request(options)
440
482
  end
441
483
 
442
- # Retrieves the specified alarms. If no alarms are specified, all alarms
443
- # are returned. Alarms can be retrieved by using only a prefix for the
444
- # alarm name, the alarm state, or a prefix for any action.
484
+ # Retrieves the specified alarms. You can filter the results by
485
+ # specifying a a prefix for the alarm name, the alarm state, or a prefix
486
+ # for any action.
445
487
  #
446
488
  # @option params [Array<String>] :alarm_names
447
- # The names of the alarms.
489
+ # The names of the alarms to retrieve information about.
448
490
  #
449
491
  # @option params [String] :alarm_name_prefix
450
- # The alarm name prefix. If this parameter is specified, you cannot
451
- # specify `AlarmNames`.
492
+ # An alarm name prefix. If you specify this parameter, you receive
493
+ # information about all alarms that have names that start with this
494
+ # prefix.
495
+ #
496
+ # If this parameter is specified, you cannot specify `AlarmNames`.
497
+ #
498
+ # @option params [Array<String>] :alarm_types
499
+ # Use this parameter to specify whether you want the operation to return
500
+ # metric alarms or composite alarms. If you omit this parameter, only
501
+ # metric alarms are returned.
502
+ #
503
+ # @option params [String] :children_of_alarm_name
504
+ # If you use this parameter and specify the name of a composite alarm,
505
+ # the operation returns information about the "children" alarms of the
506
+ # alarm you specify. These are the metric alarms and composite alarms
507
+ # referenced in the `AlarmRule` field of the composite alarm that you
508
+ # specify in `ChildrenOfAlarmName`. Information about the composite
509
+ # alarm that you name in `ChildrenOfAlarmName` is not returned.
510
+ #
511
+ # If you specify `ChildrenOfAlarmName`, you cannot specify any other
512
+ # parameters in the request except for `MaxRecords` and `NextToken`. If
513
+ # you do so, you will receive a validation error.
514
+ #
515
+ # <note markdown="1"> Only the `Alarm Name`, `ARN`, `StateValue`
516
+ # (OK/ALARM/INSUFFICIENT\_DATA), and `StateUpdatedTimestamp` information
517
+ # are returned by this operation when you use this parameter. To get
518
+ # complete information about these alarms, perform another
519
+ # `DescribeAlarms` operation and specify the parent alarm names in the
520
+ # `AlarmNames` parameter.
521
+ #
522
+ # </note>
523
+ #
524
+ # @option params [String] :parents_of_alarm_name
525
+ # If you use this parameter and specify the name of a metric or
526
+ # composite alarm, the operation returns information about the
527
+ # "parent" alarms of the alarm you specify. These are the composite
528
+ # alarms that have `AlarmRule` parameters that reference the alarm named
529
+ # in `ParentsOfAlarmName`. Information about the alarm that you specify
530
+ # in `ParentsOfAlarmName` is not returned.
531
+ #
532
+ # If you specify `ParentsOfAlarmName`, you cannot specify any other
533
+ # parameters in the request except for `MaxRecords` and `NextToken`. If
534
+ # you do so, you will receive a validation error.
535
+ #
536
+ # <note markdown="1"> Only the Alarm Name and ARN are returned by this operation when you
537
+ # use this parameter. To get complete information about these alarms,
538
+ # perform another `DescribeAlarms` operation and specify the parent
539
+ # alarm names in the `AlarmNames` parameter.
540
+ #
541
+ # </note>
452
542
  #
453
543
  # @option params [String] :state_value
454
- # The state value to be used in matching alarms.
544
+ # Specify this parameter to receive information only about alarms that
545
+ # are currently in the state that you specify.
455
546
  #
456
547
  # @option params [String] :action_prefix
457
- # The action name prefix.
548
+ # Use this parameter to filter the results of the operation to only
549
+ # those alarms that use a certain alarm action. For example, you could
550
+ # specify the ARN of an SNS topic to find all alarms that send
551
+ # notifications to that topic.
458
552
  #
459
553
  # @option params [Integer] :max_records
460
554
  # The maximum number of alarm descriptions to retrieve.
@@ -465,6 +559,7 @@ module Aws::CloudWatch
465
559
  #
466
560
  # @return [Types::DescribeAlarmsOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
467
561
  #
562
+ # * {Types::DescribeAlarmsOutput#composite_alarms #composite_alarms} => Array&lt;Types::CompositeAlarm&gt;
468
563
  # * {Types::DescribeAlarmsOutput#metric_alarms #metric_alarms} => Array&lt;Types::MetricAlarm&gt;
469
564
  # * {Types::DescribeAlarmsOutput#next_token #next_token} => String
470
565
  #
@@ -473,6 +568,9 @@ module Aws::CloudWatch
473
568
  # resp = client.describe_alarms({
474
569
  # alarm_names: ["AlarmName"],
475
570
  # alarm_name_prefix: "AlarmNamePrefix",
571
+ # alarm_types: ["CompositeAlarm"], # accepts CompositeAlarm, MetricAlarm
572
+ # children_of_alarm_name: "AlarmName",
573
+ # parents_of_alarm_name: "AlarmName",
476
574
  # state_value: "OK", # accepts OK, ALARM, INSUFFICIENT_DATA
477
575
  # action_prefix: "ActionPrefix",
478
576
  # max_records: 1,
@@ -481,6 +579,23 @@ module Aws::CloudWatch
481
579
  #
482
580
  # @example Response structure
483
581
  #
582
+ # resp.composite_alarms #=> Array
583
+ # resp.composite_alarms[0].actions_enabled #=> Boolean
584
+ # resp.composite_alarms[0].alarm_actions #=> Array
585
+ # resp.composite_alarms[0].alarm_actions[0] #=> String
586
+ # resp.composite_alarms[0].alarm_arn #=> String
587
+ # resp.composite_alarms[0].alarm_configuration_updated_timestamp #=> Time
588
+ # resp.composite_alarms[0].alarm_description #=> String
589
+ # resp.composite_alarms[0].alarm_name #=> String
590
+ # resp.composite_alarms[0].alarm_rule #=> String
591
+ # resp.composite_alarms[0].insufficient_data_actions #=> Array
592
+ # resp.composite_alarms[0].insufficient_data_actions[0] #=> String
593
+ # resp.composite_alarms[0].ok_actions #=> Array
594
+ # resp.composite_alarms[0].ok_actions[0] #=> String
595
+ # resp.composite_alarms[0].state_reason #=> String
596
+ # resp.composite_alarms[0].state_reason_data #=> String
597
+ # resp.composite_alarms[0].state_updated_timestamp #=> Time
598
+ # resp.composite_alarms[0].state_value #=> String, one of "OK", "ALARM", "INSUFFICIENT_DATA"
484
599
  # resp.metric_alarms #=> Array
485
600
  # resp.metric_alarms[0].alarm_name #=> String
486
601
  # resp.metric_alarms[0].alarm_arn #=> String
@@ -656,7 +771,7 @@ module Aws::CloudWatch
656
771
  #
657
772
  # @option params [Integer] :max_results
658
773
  # The maximum number of results to return in one operation. The maximum
659
- # value you can specify is 10.
774
+ # value that you can specify is 100.
660
775
  #
661
776
  # To retrieve the remaining results, make another call with the returned
662
777
  # `NextToken` value.
@@ -798,7 +913,11 @@ module Aws::CloudWatch
798
913
  #
799
914
  # @option params [required, Array<String>] :rule_names
800
915
  # An array of the rule names to disable. If you need to find out the
801
- # names of your rules, use DescribeInsightRules.
916
+ # names of your rules, use [DescribeInsightRules][1].
917
+ #
918
+ #
919
+ #
920
+ # [1]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_DescribeInsightRules.html
802
921
  #
803
922
  # @return [Types::DisableInsightRulesOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
804
923
  #
@@ -854,7 +973,11 @@ module Aws::CloudWatch
854
973
  #
855
974
  # @option params [required, Array<String>] :rule_names
856
975
  # An array of the rule names to enable. If you need to find out the
857
- # names of your rules, use DescribeInsightRules.
976
+ # names of your rules, use [DescribeInsightRules][1].
977
+ #
978
+ #
979
+ #
980
+ # [1]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_DescribeInsightRules.html
858
981
  #
859
982
  # @return [Types::EnableInsightRulesOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
860
983
  #
@@ -1063,7 +1186,7 @@ module Aws::CloudWatch
1063
1186
  req.send_request(options)
1064
1187
  end
1065
1188
 
1066
- # You can use the `GetMetricData` API to retrieve as many as 100
1189
+ # You can use the `GetMetricData` API to retrieve as many as 500
1067
1190
  # different metrics in a single request, with a total of as many as
1068
1191
  # 100,800 data points. You can also optionally perform math expressions
1069
1192
  # on the values of the returned statistics, to create new time series
@@ -1116,7 +1239,7 @@ module Aws::CloudWatch
1116
1239
  #
1117
1240
  # @option params [required, Array<Types::MetricDataQuery>] :metric_data_queries
1118
1241
  # The metric queries to be returned. A single `GetMetricData` call can
1119
- # include as many as 100 `MetricDataQuery` structures. Each of these
1242
+ # include as many as 500 `MetricDataQuery` structures. Each of these
1120
1243
  # structures can specify either a metric to retrieve, or a math
1121
1244
  # expression to perform on retrieved data.
1122
1245
  #
@@ -1488,12 +1611,16 @@ module Aws::CloudWatch
1488
1611
  # `MetricWidget` parameter in each `GetMetricWidgetImage` call.
1489
1612
  #
1490
1613
  # For more information about the syntax of `MetricWidget` see
1491
- # CloudWatch-Metric-Widget-Structure.
1614
+ # [GetMetricWidgetImage: Metric Widget Structure and Syntax][1].
1492
1615
  #
1493
1616
  # If any metric on the graph could not load all the requested data
1494
1617
  # points, an orange triangle with an exclamation point appears next to
1495
1618
  # the graph legend.
1496
1619
  #
1620
+ #
1621
+ #
1622
+ # [1]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/CloudWatch-Metric-Widget-Structure.html
1623
+ #
1497
1624
  # @option params [String] :output_format
1498
1625
  # The format of the resulting image. Only PNG images are supported.
1499
1626
  #
@@ -1601,14 +1728,20 @@ module Aws::CloudWatch
1601
1728
  end
1602
1729
 
1603
1730
  # List the specified metrics. You can use the returned metrics with
1604
- # GetMetricData or GetMetricStatistics to obtain statistical data.
1731
+ # [GetMetricData][1] or [GetMetricStatistics][2] to obtain statistical
1732
+ # data.
1605
1733
  #
1606
1734
  # Up to 500 results are returned for any one call. To retrieve
1607
1735
  # additional results, use the returned token with subsequent calls.
1608
1736
  #
1609
1737
  # After you create a metric, allow up to fifteen minutes before the
1610
1738
  # metric appears. Statistics about the metric, however, are available
1611
- # sooner using GetMetricData or GetMetricStatistics.
1739
+ # sooner using [GetMetricData][1] or [GetMetricStatistics][2].
1740
+ #
1741
+ #
1742
+ #
1743
+ # [1]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricData.html
1744
+ # [2]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricStatistics.html
1612
1745
  #
1613
1746
  # @option params [String] :namespace
1614
1747
  # The namespace to filter against.
@@ -1764,6 +1897,179 @@ module Aws::CloudWatch
1764
1897
  req.send_request(options)
1765
1898
  end
1766
1899
 
1900
+ # Creates or updates a *composite alarm*. When you create a composite
1901
+ # alarm, you specify a rule expression for the alarm that takes into
1902
+ # account the alarm states of other alarms that you have created. The
1903
+ # composite alarm goes into ALARM state only if all conditions of the
1904
+ # rule are met.
1905
+ #
1906
+ # The alarms specified in a composite alarm's rule expression can
1907
+ # include metric alarms and other composite alarms.
1908
+ #
1909
+ # Using composite alarms can reduce alarm noise. You can create multiple
1910
+ # metric alarms, and also create a composite alarm and set up alerts
1911
+ # only for the composite alarm. For example, you could create a
1912
+ # composite alarm that goes into ALARM state only when more than one of
1913
+ # the underlying metric alarms are in ALARM state.
1914
+ #
1915
+ # Currently, the only alarm actions that can be taken by composite
1916
+ # alarms are notifying SNS topics.
1917
+ #
1918
+ # <note markdown="1"> It is possible to create a loop or cycle of composite alarms, where
1919
+ # composite alarm A depends on composite alarm B, and composite alarm B
1920
+ # also depends on composite alarm A. In this scenario, you can't delete
1921
+ # any composite alarm that is part of the cycle because there is always
1922
+ # still a composite alarm that depends on that alarm that you want to
1923
+ # delete.
1924
+ #
1925
+ # To get out of such a situation, you must break the cycle by changing
1926
+ # the rule of one of the composite alarms in the cycle to remove a
1927
+ # dependency that creates the cycle. The simplest change to make to
1928
+ # break a cycle is to change the `AlarmRule` of one of the alarms to
1929
+ # `False`.
1930
+ #
1931
+ # Additionally, the evaluation of composite alarms stops if CloudWatch
1932
+ # detects a cycle in the evaluation path.
1933
+ #
1934
+ # </note>
1935
+ #
1936
+ # When this operation creates an alarm, the alarm state is immediately
1937
+ # set to `INSUFFICIENT_DATA`. The alarm is then evaluated and its state
1938
+ # is set appropriately. Any actions associated with the new state are
1939
+ # then executed. For a composite alarm, this initial time after creation
1940
+ # is the only time that the alarm can be in `INSUFFICIENT_DATA` state.
1941
+ #
1942
+ # When you update an existing alarm, its state is left unchanged, but
1943
+ # the update completely overwrites the previous configuration of the
1944
+ # alarm.
1945
+ #
1946
+ # @option params [Boolean] :actions_enabled
1947
+ # Indicates whether actions should be executed during any changes to the
1948
+ # alarm state of the composite alarm. The default is `TRUE`.
1949
+ #
1950
+ # @option params [Array<String>] :alarm_actions
1951
+ # The actions to execute when this alarm transitions to the `ALARM`
1952
+ # state from any other state. Each action is specified as an Amazon
1953
+ # Resource Name (ARN).
1954
+ #
1955
+ # Valid Values: `arn:aws:sns:region:account-id:sns-topic-name `
1956
+ #
1957
+ # @option params [String] :alarm_description
1958
+ # The description for the composite alarm.
1959
+ #
1960
+ # @option params [required, String] :alarm_name
1961
+ # The name for the composite alarm. This name must be unique within your
1962
+ # AWS account.
1963
+ #
1964
+ # @option params [required, String] :alarm_rule
1965
+ # An expression that specifies which other alarms are to be evaluated to
1966
+ # determine this composite alarm's state. For each alarm that you
1967
+ # reference, you designate a function that specifies whether that alarm
1968
+ # needs to be in ALARM state, OK state, or INSUFFICIENT\_DATA state. You
1969
+ # can use operators (AND, OR and NOT) to combine multiple functions in a
1970
+ # single expression. You can use parenthesis to logically group the
1971
+ # functions in your expression.
1972
+ #
1973
+ # You can use either alarm names or ARNs to reference the other alarms
1974
+ # that are to be evaluated.
1975
+ #
1976
+ # Functions can include the following:
1977
+ #
1978
+ # * `ALARM("alarm-name or alarm-ARN")` is TRUE if the named alarm is in
1979
+ # ALARM state.
1980
+ #
1981
+ # * `OK("alarm-name or alarm-ARN")` is TRUE if the named alarm is in OK
1982
+ # state.
1983
+ #
1984
+ # * `INSUFFICIENT_DATA("alarm-name or alarm-ARN")` is TRUE if the named
1985
+ # alarm is in INSUFFICIENT\_DATA state.
1986
+ #
1987
+ # * `TRUE` always evaluates to TRUE.
1988
+ #
1989
+ # * `FALSE` always evaluates to FALSE.
1990
+ #
1991
+ # TRUE and FALSE are useful for testing a complex `AlarmRule` structure,
1992
+ # and for testing your alarm actions.
1993
+ #
1994
+ # Alarm names specified in `AlarmRule` can be surrounded with
1995
+ # double-quotes ("), but do not have to be.
1996
+ #
1997
+ # The following are some examples of `AlarmRule`\:
1998
+ #
1999
+ # * `ALARM(CPUUtilizationTooHigh) AND ALARM(DiskReadOpsTooHigh)`
2000
+ # specifies that the composite alarm goes into ALARM state only if
2001
+ # both CPUUtilizationTooHigh and DiskReadOpsTooHigh alarms are in
2002
+ # ALARM state.
2003
+ #
2004
+ # * `ALARM(CPUUtilizationTooHigh) AND NOT ALARM(DeploymentInProgress)`
2005
+ # specifies that the alarm goes to ALARM state if
2006
+ # CPUUtilizationTooHigh is in ALARM state and DeploymentInProgress is
2007
+ # not in ALARM state. This example reduces alarm noise during a known
2008
+ # deployment window.
2009
+ #
2010
+ # * `(ALARM(CPUUtilizationTooHigh) OR ALARM(DiskReadOpsTooHigh)) AND
2011
+ # OK(NetworkOutTooHigh)` goes into ALARM state if
2012
+ # CPUUtilizationTooHigh OR DiskReadOpsTooHigh is in ALARM state, and
2013
+ # if NetworkOutTooHigh is in OK state. This provides another example
2014
+ # of using a composite alarm to prevent noise. This rule ensures that
2015
+ # you are not notified with an alarm action on high CPU or disk usage
2016
+ # if a known network problem is also occurring.
2017
+ #
2018
+ # The `AlarmRule` can specify as many as 100 "children" alarms. The
2019
+ # `AlarmRule` expression can have as many as 500 elements. Elements are
2020
+ # child alarms, TRUE or FALSE statements, and parentheses.
2021
+ #
2022
+ # @option params [Array<String>] :insufficient_data_actions
2023
+ # The actions to execute when this alarm transitions to the
2024
+ # `INSUFFICIENT_DATA` state from any other state. Each action is
2025
+ # specified as an Amazon Resource Name (ARN).
2026
+ #
2027
+ # Valid Values: `arn:aws:sns:region:account-id:sns-topic-name `
2028
+ #
2029
+ # @option params [Array<String>] :ok_actions
2030
+ # The actions to execute when this alarm transitions to an `OK` state
2031
+ # from any other state. Each action is specified as an Amazon Resource
2032
+ # Name (ARN).
2033
+ #
2034
+ # Valid Values: `arn:aws:sns:region:account-id:sns-topic-name `
2035
+ #
2036
+ # @option params [Array<Types::Tag>] :tags
2037
+ # A list of key-value pairs to associate with the composite alarm. You
2038
+ # can associate as many as 50 tags with an alarm.
2039
+ #
2040
+ # Tags can help you organize and categorize your resources. You can also
2041
+ # use them to scope user permissions, by granting a user permission to
2042
+ # access or change only resources with certain tag values.
2043
+ #
2044
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
2045
+ #
2046
+ # @example Request syntax with placeholder values
2047
+ #
2048
+ # resp = client.put_composite_alarm({
2049
+ # actions_enabled: false,
2050
+ # alarm_actions: ["ResourceName"],
2051
+ # alarm_description: "AlarmDescription",
2052
+ # alarm_name: "AlarmName", # required
2053
+ # alarm_rule: "AlarmRule", # required
2054
+ # insufficient_data_actions: ["ResourceName"],
2055
+ # ok_actions: ["ResourceName"],
2056
+ # tags: [
2057
+ # {
2058
+ # key: "TagKey", # required
2059
+ # value: "TagValue", # required
2060
+ # },
2061
+ # ],
2062
+ # })
2063
+ #
2064
+ # @see http://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/PutCompositeAlarm AWS API Documentation
2065
+ #
2066
+ # @overload put_composite_alarm(params = {})
2067
+ # @param [Hash] params ({})
2068
+ def put_composite_alarm(params = {}, options = {})
2069
+ req = build_request(:put_composite_alarm, params)
2070
+ req.send_request(options)
2071
+ end
2072
+
1767
2073
  # Creates a dashboard if it does not already exist, or updates an
1768
2074
  # existing dashboard. If you update a dashboard, the entire contents are
1769
2075
  # replaced with what you specify here.
@@ -1797,8 +2103,12 @@ module Aws::CloudWatch
1797
2103
  # the widgets to include and their location on the dashboard. This
1798
2104
  # parameter is required.
1799
2105
  #
1800
- # For more information about the syntax, see
1801
- # CloudWatch-Dashboard-Body-Structure.
2106
+ # For more information about the syntax, see [Dashboard Body Structure
2107
+ # and Syntax][1].
2108
+ #
2109
+ #
2110
+ #
2111
+ # [1]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/CloudWatch-Dashboard-Body-Structure.html
1802
2112
  #
1803
2113
  # @return [Types::PutDashboardOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1804
2114
  #
@@ -1946,7 +2256,7 @@ module Aws::CloudWatch
1946
2256
  # `arn:aws:automate:region:ec2:recover` \|
1947
2257
  # `arn:aws:automate:region:ec2:reboot` \|
1948
2258
  # `arn:aws:sns:region:account-id:sns-topic-name ` \|
1949
- # `arn:aws:autoscaling:region:account-id:scalingPolicy:policy-idautoScalingGroupName/group-friendly-name:policyName/policy-friendly-name
2259
+ # `arn:aws:autoscaling:region:account-id:scalingPolicy:policy-id:autoScalingGroupName/group-friendly-name:policyName/policy-friendly-name
1950
2260
  # `
1951
2261
  #
1952
2262
  # Valid Values (for use with IAM roles):
@@ -1966,7 +2276,7 @@ module Aws::CloudWatch
1966
2276
  # `arn:aws:automate:region:ec2:recover` \|
1967
2277
  # `arn:aws:automate:region:ec2:reboot` \|
1968
2278
  # `arn:aws:sns:region:account-id:sns-topic-name ` \|
1969
- # `arn:aws:autoscaling:region:account-id:scalingPolicy:policy-idautoScalingGroupName/group-friendly-name:policyName/policy-friendly-name
2279
+ # `arn:aws:autoscaling:region:account-id:scalingPolicy:policy-id:autoScalingGroupName/group-friendly-name:policyName/policy-friendly-name
1970
2280
  # `
1971
2281
  #
1972
2282
  # Valid Values (for use with IAM roles):
@@ -1986,7 +2296,7 @@ module Aws::CloudWatch
1986
2296
  # `arn:aws:automate:region:ec2:recover` \|
1987
2297
  # `arn:aws:automate:region:ec2:reboot` \|
1988
2298
  # `arn:aws:sns:region:account-id:sns-topic-name ` \|
1989
- # `arn:aws:autoscaling:region:account-id:scalingPolicy:policy-idautoScalingGroupName/group-friendly-name:policyName/policy-friendly-name
2299
+ # `arn:aws:autoscaling:region:account-id:scalingPolicy:policy-id:autoScalingGroupName/group-friendly-name:policyName/policy-friendly-name
1990
2300
  # `
1991
2301
  #
1992
2302
  # Valid Values (for use with IAM roles):
@@ -2148,7 +2458,7 @@ module Aws::CloudWatch
2148
2458
  # One item in the `Metrics` array is the expression that the alarm
2149
2459
  # watches. You designate this expression by setting `ReturnValue` to
2150
2460
  # true for this object in the array. For more information, see
2151
- # MetricDataQuery.
2461
+ # [MetricDataQuery][1].
2152
2462
  #
2153
2463
  # If you use the `Metrics` parameter, you cannot include the
2154
2464
  # `MetricName`, `Dimensions`, `Period`, `Namespace`, `Statistic`, or
@@ -2156,6 +2466,10 @@ module Aws::CloudWatch
2156
2466
  # operation. Instead, you retrieve the metrics you are using in your
2157
2467
  # math expression as part of the `Metrics` array.
2158
2468
  #
2469
+ #
2470
+ #
2471
+ # [1]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_MetricDataQuery.html
2472
+ #
2159
2473
  # @option params [Array<Types::Tag>] :tags
2160
2474
  # A list of key-value pairs to associate with the alarm. You can
2161
2475
  # associate as many as 50 tags with an alarm.
@@ -2249,7 +2563,7 @@ module Aws::CloudWatch
2249
2563
  # associates the data points with the specified metric. If the specified
2250
2564
  # metric does not exist, CloudWatch creates the metric. When CloudWatch
2251
2565
  # creates a metric, it can take up to fifteen minutes for the metric to
2252
- # appear in calls to ListMetrics.
2566
+ # appear in calls to [ListMetrics][1].
2253
2567
  #
2254
2568
  # You can publish either individual data points in the `Value` field, or
2255
2569
  # arrays of values and the number of times each value occurred during
@@ -2271,11 +2585,14 @@ module Aws::CloudWatch
2271
2585
  # You can use up to 10 dimensions per metric to further clarify what
2272
2586
  # data the metric collects. Each dimension consists of a Name and Value
2273
2587
  # pair. For more information about specifying dimensions, see
2274
- # [Publishing Metrics][1] in the *Amazon CloudWatch User Guide*.
2588
+ # [Publishing Metrics][2] in the *Amazon CloudWatch User Guide*.
2275
2589
  #
2276
2590
  # Data points with time stamps from 24 hours ago or longer can take at
2277
- # least 48 hours to become available for GetMetricData or
2278
- # GetMetricStatistics from the time they are submitted.
2591
+ # least 48 hours to become available for [GetMetricData][3] or
2592
+ # [GetMetricStatistics][4] from the time they are submitted. Data points
2593
+ # with time stamps between 3 and 24 hours ago can take as much as 2
2594
+ # hours to become available for for [GetMetricData][3] or
2595
+ # [GetMetricStatistics][4].
2279
2596
  #
2280
2597
  # CloudWatch needs raw data points to calculate percentile statistics.
2281
2598
  # If you publish data using a statistic set instead, you can only
@@ -2290,7 +2607,10 @@ module Aws::CloudWatch
2290
2607
  #
2291
2608
  #
2292
2609
  #
2293
- # [1]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/publishingMetrics.html
2610
+ # [1]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_ListMetrics.html
2611
+ # [2]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/publishingMetrics.html
2612
+ # [3]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricData.html
2613
+ # [4]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricStatistics.html
2294
2614
  #
2295
2615
  # @option params [required, String] :namespace
2296
2616
  # The namespace for the metric data.
@@ -2347,10 +2667,25 @@ module Aws::CloudWatch
2347
2667
  # for the appropriate state is invoked. For example, if your alarm is
2348
2668
  # configured to send an Amazon SNS message when an alarm is triggered,
2349
2669
  # temporarily changing the alarm state to `ALARM` sends an SNS message.
2350
- # The alarm returns to its actual state (often within seconds). Because
2351
- # the alarm state change happens quickly, it is typically only visible
2352
- # in the alarm's **History** tab in the Amazon CloudWatch console or
2353
- # through DescribeAlarmHistory.
2670
+ #
2671
+ # Metric alarms returns to their actual state quickly, often within
2672
+ # seconds. Because the metric alarm state change happens quickly, it is
2673
+ # typically only visible in the alarm's **History** tab in the Amazon
2674
+ # CloudWatch console or through [DescribeAlarmHistory][1].
2675
+ #
2676
+ # If you use `SetAlarmState` on a composite alarm, the composite alarm
2677
+ # is not guaranteed to return to its actual state. It will return to its
2678
+ # actual state only once any of its children alarms change state. It is
2679
+ # also re-evaluated if you update its configuration.
2680
+ #
2681
+ # If an alarm triggers EC2 Auto Scaling policies or application Auto
2682
+ # Scaling policies, you must include information in the
2683
+ # `StateReasonData` parameter to enable the policy to take the correct
2684
+ # action.
2685
+ #
2686
+ #
2687
+ #
2688
+ # [1]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_DescribeAlarmHistory.html
2354
2689
  #
2355
2690
  # @option params [required, String] :alarm_name
2356
2691
  # The name for the alarm. This name must be unique within the AWS
@@ -2367,6 +2702,11 @@ module Aws::CloudWatch
2367
2702
  # The reason that this alarm is set to this specific state, in JSON
2368
2703
  # format.
2369
2704
  #
2705
+ # For SNS or EC2 alarm actions, this is just informational. But for EC2
2706
+ # Auto Scaling or application Auto Scaling alarm actions, the Auto
2707
+ # Scaling policy uses the information in this field to take the correct
2708
+ # action.
2709
+ #
2370
2710
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
2371
2711
  #
2372
2712
  # @example Request syntax with placeholder values
@@ -2481,7 +2821,7 @@ module Aws::CloudWatch
2481
2821
  params: params,
2482
2822
  config: config)
2483
2823
  context[:gem_name] = 'aws-sdk-cloudwatch'
2484
- context[:gem_version] = '1.32.0'
2824
+ context[:gem_version] = '1.33.0'
2485
2825
  Seahorse::Client::Request.new(handlers, context)
2486
2826
  end
2487
2827
 
@@ -2547,9 +2887,10 @@ module Aws::CloudWatch
2547
2887
  # The following table lists the valid waiter names, the operations they call,
2548
2888
  # and the default `:delay` and `:max_attempts` values.
2549
2889
  #
2550
- # | waiter_name | params | :delay | :max_attempts |
2551
- # | ------------ | ------------------ | -------- | ------------- |
2552
- # | alarm_exists | {#describe_alarms} | 5 | 40 |
2890
+ # | waiter_name | params | :delay | :max_attempts |
2891
+ # | ---------------------- | ------------------ | -------- | ------------- |
2892
+ # | alarm_exists | {#describe_alarms} | 5 | 40 |
2893
+ # | composite_alarm_exists | {#describe_alarms} | 5 | 40 |
2553
2894
  #
2554
2895
  # @raise [Errors::FailureStateError] Raised when the waiter terminates
2555
2896
  # because the waiter has entered a state that it will not transition
@@ -2600,7 +2941,8 @@ module Aws::CloudWatch
2600
2941
 
2601
2942
  def waiters
2602
2943
  {
2603
- alarm_exists: Waiters::AlarmExists
2944
+ alarm_exists: Waiters::AlarmExists,
2945
+ composite_alarm_exists: Waiters::CompositeAlarmExists
2604
2946
  }
2605
2947
  end
2606
2948