|
20 | 20 | (s/def ::comparison-operator (spec-or-ref #{"GreaterThanOrEqualToThreshold"
|
21 | 21 | "GreaterThanThreshold"
|
22 | 22 | "LessThanThreshold"
|
23 |
| - "LessThanOrEqualToThreshold"})) |
| 23 | + "LessThanOrEqualToThreshold" |
| 24 | + "LessThanLowerThreshold" |
| 25 | + "LessThanLowerOrGreaterThanUpperThreshold"})) |
24 | 26 |
|
25 | 27 | (s/def ::value (spec-or-ref string?))
|
26 | 28 |
|
27 | 29 | (s/def ::name (spec-or-ref string?))
|
28 | 30 |
|
| 31 | +(s/def ::datapoints-to-alarm (spec-or-ref int?)) |
| 32 | + |
29 | 33 | (s/def ::dimension (s/keys :req [::name ::value]))
|
30 | 34 |
|
31 | 35 | (s/def ::dimensions (s/coll-of ::dimension :kind vector?))
|
32 | 36 |
|
| 37 | +(s/def ::evaluate-low-sample-count-percentile (spec-or-ref string?)) |
| 38 | + |
33 | 39 | (s/def ::evaluation-periods (spec-or-ref pos-int?))
|
34 | 40 |
|
35 | 41 | ;; The percentile statistic for the metric. Specify a value between p0.0 and p100.
|
|
40 | 46 |
|
41 | 47 | (s/def ::metric-name (spec-or-ref string?))
|
42 | 48 |
|
| 49 | +(s/def ::expression (spec-or-ref string?)) |
| 50 | + |
| 51 | +(s/def ::id (spec-or-ref string?)) |
| 52 | + |
| 53 | +(s/def ::label (spec-or-ref string?)) |
| 54 | + |
| 55 | +(s/def ::metric (s/keys :opt [::dimensions |
| 56 | + ::metric-name |
| 57 | + ::namespace])) |
| 58 | + |
| 59 | +(s/def ::metric-stat (s/keys :req [::metric |
| 60 | + ::period |
| 61 | + ::stat] |
| 62 | + :opt [::unit])) |
| 63 | + |
| 64 | +(s/def ::return-data (spec-or-ref boolean?)) |
| 65 | + |
| 66 | +(s/def ::metric-data-query (s/keys :req [::id] |
| 67 | + :opt [::expression |
| 68 | + ::label |
| 69 | + ::metric-stat |
| 70 | + ::return-data])) |
| 71 | + |
| 72 | +(s/def ::metrics (s/coll-of ::metric-data-query)) |
| 73 | + |
43 | 74 | (s/def ::namespace (spec-or-ref string?))
|
44 | 75 |
|
45 | 76 | (s/def ::ok-actions ::actions)
|
|
57 | 88 |
|
58 | 89 | (s/def ::threshold (spec-or-ref double?))
|
59 | 90 |
|
| 91 | +(s/def ::threshold-metric-id (spec-or-ref string?)) |
| 92 | + |
60 | 93 | (s/def ::treat-missing-data (spec-or-ref #{"breaching"
|
61 | 94 | "notBreaching"
|
62 | 95 | "ignore"
|
|
90 | 123 | "None"}))
|
91 | 124 |
|
92 | 125 | (s/def ::alarm (s/keys :req [::comparison-operator
|
93 |
| - ::evaluation-periods |
| 126 | + ::evaluation-periods] |
| 127 | + :opt [::namespace |
94 | 128 | ::metric-name
|
95 |
| - ::namespace |
96 |
| - ::period |
97 |
| - ::threshold] |
98 |
| - :opt [::actions-enabled |
| 129 | + ::actions-enabled |
99 | 130 | ::alarm-actions
|
100 | 131 | ::alarm-description
|
101 | 132 | ::alarm-name
|
102 | 133 | ::dimensions
|
103 | 134 | ::insufficient-data-actions
|
104 | 135 | ::ok-actions
|
105 | 136 | ::statistic
|
106 |
| - ::unit])) |
| 137 | + ::unit |
| 138 | + ::datapoints-to-alarm |
| 139 | + ::evaluate-low-sample-count-percentile |
| 140 | + ::metrics |
| 141 | + ::period |
| 142 | + ::threshold |
| 143 | + ::threshold-metric-id])) |
107 | 144 |
|
108 | 145 | (defresource alarm "AWS::CloudWatch::Alarm" ::alarm)
|
0 commit comments