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 +4 -4
- data/lib/aws-sdk-cloudwatch.rb +2 -1
- data/lib/aws-sdk-cloudwatch/alarm.rb +16 -0
- data/lib/aws-sdk-cloudwatch/client.rb +382 -40
- data/lib/aws-sdk-cloudwatch/client_api.rb +55 -0
- data/lib/aws-sdk-cloudwatch/composite_alarm.rb +472 -0
- data/lib/aws-sdk-cloudwatch/errors.rb +22 -0
- data/lib/aws-sdk-cloudwatch/metric.rb +8 -4
- data/lib/aws-sdk-cloudwatch/resource.rb +155 -5
- data/lib/aws-sdk-cloudwatch/types.rb +395 -32
- data/lib/aws-sdk-cloudwatch/waiters.rb +36 -0
- metadata +3 -2
@@ -45,5 +45,41 @@ module Aws::CloudWatch
|
|
45
45
|
attr_reader :waiter
|
46
46
|
|
47
47
|
end
|
48
|
+
|
49
|
+
class CompositeAlarmExists
|
50
|
+
|
51
|
+
# @param [Hash] options
|
52
|
+
# @option options [required, Client] :client
|
53
|
+
# @option options [Integer] :max_attempts (40)
|
54
|
+
# @option options [Integer] :delay (5)
|
55
|
+
# @option options [Proc] :before_attempt
|
56
|
+
# @option options [Proc] :before_wait
|
57
|
+
def initialize(options)
|
58
|
+
@client = options.fetch(:client)
|
59
|
+
@waiter = Aws::Waiters::Waiter.new({
|
60
|
+
max_attempts: 40,
|
61
|
+
delay: 5,
|
62
|
+
poller: Aws::Waiters::Poller.new(
|
63
|
+
operation_name: :describe_alarms,
|
64
|
+
acceptors: [{
|
65
|
+
"matcher" => "path",
|
66
|
+
"expected" => true,
|
67
|
+
"argument" => "length(composite_alarms[]) > `0`",
|
68
|
+
"state" => "success"
|
69
|
+
}]
|
70
|
+
)
|
71
|
+
}.merge(options))
|
72
|
+
end
|
73
|
+
|
74
|
+
# @option (see Client#describe_alarms)
|
75
|
+
# @return (see Client#describe_alarms)
|
76
|
+
def wait(params = {})
|
77
|
+
@waiter.wait(client: @client, params: params)
|
78
|
+
end
|
79
|
+
|
80
|
+
# @api private
|
81
|
+
attr_reader :waiter
|
82
|
+
|
83
|
+
end
|
48
84
|
end
|
49
85
|
end
|
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.33.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-
|
11
|
+
date: 2020-03-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-core
|
@@ -56,6 +56,7 @@ files:
|
|
56
56
|
- lib/aws-sdk-cloudwatch/alarm.rb
|
57
57
|
- lib/aws-sdk-cloudwatch/client.rb
|
58
58
|
- lib/aws-sdk-cloudwatch/client_api.rb
|
59
|
+
- lib/aws-sdk-cloudwatch/composite_alarm.rb
|
59
60
|
- lib/aws-sdk-cloudwatch/customizations.rb
|
60
61
|
- lib/aws-sdk-cloudwatch/errors.rb
|
61
62
|
- lib/aws-sdk-cloudwatch/metric.rb
|