line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
package Paws::CloudWatch::PutMetricAlarm; |
3
|
1
|
|
|
1
|
|
379
|
use Moose; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
6
|
|
4
|
|
|
|
|
|
|
has ActionsEnabled => (is => 'ro', isa => 'Bool'); |
5
|
|
|
|
|
|
|
has AlarmActions => (is => 'ro', isa => 'ArrayRef[Str|Undef]'); |
6
|
|
|
|
|
|
|
has AlarmDescription => (is => 'ro', isa => 'Str'); |
7
|
|
|
|
|
|
|
has AlarmName => (is => 'ro', isa => 'Str', required => 1); |
8
|
|
|
|
|
|
|
has ComparisonOperator => (is => 'ro', isa => 'Str', required => 1); |
9
|
|
|
|
|
|
|
has Dimensions => (is => 'ro', isa => 'ArrayRef[Paws::CloudWatch::Dimension]'); |
10
|
|
|
|
|
|
|
has EvaluateLowSampleCountPercentile => (is => 'ro', isa => 'Str'); |
11
|
|
|
|
|
|
|
has EvaluationPeriods => (is => 'ro', isa => 'Int', required => 1); |
12
|
|
|
|
|
|
|
has ExtendedStatistic => (is => 'ro', isa => 'Str'); |
13
|
|
|
|
|
|
|
has InsufficientDataActions => (is => 'ro', isa => 'ArrayRef[Str|Undef]'); |
14
|
|
|
|
|
|
|
has MetricName => (is => 'ro', isa => 'Str', required => 1); |
15
|
|
|
|
|
|
|
has Namespace => (is => 'ro', isa => 'Str', required => 1); |
16
|
|
|
|
|
|
|
has OKActions => (is => 'ro', isa => 'ArrayRef[Str|Undef]'); |
17
|
|
|
|
|
|
|
has Period => (is => 'ro', isa => 'Int', required => 1); |
18
|
|
|
|
|
|
|
has Statistic => (is => 'ro', isa => 'Str'); |
19
|
|
|
|
|
|
|
has Threshold => (is => 'ro', isa => 'Num', required => 1); |
20
|
|
|
|
|
|
|
has TreatMissingData => (is => 'ro', isa => 'Str'); |
21
|
|
|
|
|
|
|
has Unit => (is => 'ro', isa => 'Str'); |
22
|
|
|
|
|
|
|
|
23
|
1
|
|
|
1
|
|
5696
|
use MooseX::ClassAttribute; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
7
|
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
class_has _api_call => (isa => 'Str', is => 'ro', default => 'PutMetricAlarm'); |
26
|
|
|
|
|
|
|
class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::API::Response'); |
27
|
|
|
|
|
|
|
class_has _result_key => (isa => 'Str', is => 'ro'); |
28
|
|
|
|
|
|
|
1; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
### main pod documentation begin ### |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head1 NAME |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
Paws::CloudWatch::PutMetricAlarm - Arguments for method PutMetricAlarm on Paws::CloudWatch |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head1 DESCRIPTION |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
This class represents the parameters used for calling the method PutMetricAlarm on the |
39
|
|
|
|
|
|
|
Amazon CloudWatch service. Use the attributes of this class |
40
|
|
|
|
|
|
|
as arguments to method PutMetricAlarm. |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to PutMetricAlarm. |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
As an example: |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
$service_obj->PutMetricAlarm(Att1 => $value1, Att2 => $value2, ...); |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object. |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head2 ActionsEnabled => Bool |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
Indicates whether actions should be executed during any changes to the |
56
|
|
|
|
|
|
|
alarm state. |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head2 AlarmActions => ArrayRef[Str|Undef] |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
The actions to execute when this alarm transitions to the C<ALARM> |
63
|
|
|
|
|
|
|
state from any other state. Each action is specified as an Amazon |
64
|
|
|
|
|
|
|
Resource Name (ARN). |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
Valid Values: arn:aws:automate:I<region>:ec2:stop | |
67
|
|
|
|
|
|
|
arn:aws:automate:I<region>:ec2:terminate | |
68
|
|
|
|
|
|
|
arn:aws:automate:I<region>:ec2:recover |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
Valid Values (for use with IAM roles): |
71
|
|
|
|
|
|
|
arn:aws:swf:us-east-1:{I<customer-account>}:action/actions/AWS_EC2.InstanceId.Stop/1.0 |
72
|
|
|
|
|
|
|
| |
73
|
|
|
|
|
|
|
arn:aws:swf:us-east-1:{I<customer-account>}:action/actions/AWS_EC2.InstanceId.Terminate/1.0 |
74
|
|
|
|
|
|
|
| |
75
|
|
|
|
|
|
|
arn:aws:swf:us-east-1:{I<customer-account>}:action/actions/AWS_EC2.InstanceId.Reboot/1.0 |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=head2 AlarmDescription => Str |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
The description for the alarm. |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=head2 B<REQUIRED> AlarmName => Str |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
The name for the alarm. This name must be unique within the AWS |
88
|
|
|
|
|
|
|
account. |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head2 B<REQUIRED> ComparisonOperator => Str |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
The arithmetic operation to use when comparing the specified statistic |
95
|
|
|
|
|
|
|
and threshold. The specified statistic value is used as the first |
96
|
|
|
|
|
|
|
operand. |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
Valid values are: C<"GreaterThanOrEqualToThreshold">, C<"GreaterThanThreshold">, C<"LessThanThreshold">, C<"LessThanOrEqualToThreshold"> |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=head2 Dimensions => ArrayRef[L<Paws::CloudWatch::Dimension>] |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
The dimensions for the metric associated with the alarm. |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=head2 EvaluateLowSampleCountPercentile => Str |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
Used only for alarms based on percentiles. If you specify C<ignore>, |
109
|
|
|
|
|
|
|
the alarm state does not change during periods with too few data points |
110
|
|
|
|
|
|
|
to be statistically significant. If you specify C<evaluate> or omit |
111
|
|
|
|
|
|
|
this parameter, the alarm is always evaluated and possibly changes |
112
|
|
|
|
|
|
|
state no matter how many data points are available. For more |
113
|
|
|
|
|
|
|
information, see Percentile-Based CloudWatch Alarms and Low Data |
114
|
|
|
|
|
|
|
Samples. |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
Valid Values: C<evaluate | ignore> |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
=head2 B<REQUIRED> EvaluationPeriods => Int |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
The number of periods over which data is compared to the specified |
123
|
|
|
|
|
|
|
threshold. An alarm's total current evaluation period can be no longer |
124
|
|
|
|
|
|
|
than one day, so this number multiplied by C<Period> cannot be more |
125
|
|
|
|
|
|
|
than 86,400 seconds. |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
=head2 ExtendedStatistic => Str |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
The percentile statistic for the metric associated with the alarm. |
132
|
|
|
|
|
|
|
Specify a value between p0.0 and p100. |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
=head2 InsufficientDataActions => ArrayRef[Str|Undef] |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
The actions to execute when this alarm transitions to the |
139
|
|
|
|
|
|
|
C<INSUFFICIENT_DATA> state from any other state. Each action is |
140
|
|
|
|
|
|
|
specified as an Amazon Resource Name (ARN). |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
Valid Values: arn:aws:automate:I<region>:ec2:stop | |
143
|
|
|
|
|
|
|
arn:aws:automate:I<region>:ec2:terminate | |
144
|
|
|
|
|
|
|
arn:aws:automate:I<region>:ec2:recover |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
Valid Values (for use with IAM roles): |
147
|
|
|
|
|
|
|
arn:aws:swf:us-east-1:{I<customer-account>}:action/actions/AWS_EC2.InstanceId.Stop/1.0 |
148
|
|
|
|
|
|
|
| |
149
|
|
|
|
|
|
|
arn:aws:swf:us-east-1:{I<customer-account>}:action/actions/AWS_EC2.InstanceId.Terminate/1.0 |
150
|
|
|
|
|
|
|
| |
151
|
|
|
|
|
|
|
arn:aws:swf:us-east-1:{I<customer-account>}:action/actions/AWS_EC2.InstanceId.Reboot/1.0 |
152
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
=head2 B<REQUIRED> MetricName => Str |
156
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
The name for the metric associated with the alarm. |
158
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
=head2 B<REQUIRED> Namespace => Str |
162
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
The namespace for the metric associated with the alarm. |
164
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
=head2 OKActions => ArrayRef[Str|Undef] |
168
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
The actions to execute when this alarm transitions to an C<OK> state |
170
|
|
|
|
|
|
|
from any other state. Each action is specified as an Amazon Resource |
171
|
|
|
|
|
|
|
Name (ARN). |
172
|
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
Valid Values: arn:aws:automate:I<region>:ec2:stop | |
174
|
|
|
|
|
|
|
arn:aws:automate:I<region>:ec2:terminate | |
175
|
|
|
|
|
|
|
arn:aws:automate:I<region>:ec2:recover |
176
|
|
|
|
|
|
|
|
177
|
|
|
|
|
|
|
Valid Values (for use with IAM roles): |
178
|
|
|
|
|
|
|
arn:aws:swf:us-east-1:{I<customer-account>}:action/actions/AWS_EC2.InstanceId.Stop/1.0 |
179
|
|
|
|
|
|
|
| |
180
|
|
|
|
|
|
|
arn:aws:swf:us-east-1:{I<customer-account>}:action/actions/AWS_EC2.InstanceId.Terminate/1.0 |
181
|
|
|
|
|
|
|
| |
182
|
|
|
|
|
|
|
arn:aws:swf:us-east-1:{I<customer-account>}:action/actions/AWS_EC2.InstanceId.Reboot/1.0 |
183
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
|
185
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
=head2 B<REQUIRED> Period => Int |
187
|
|
|
|
|
|
|
|
188
|
|
|
|
|
|
|
The period, in seconds, over which the specified statistic is applied. |
189
|
|
|
|
|
|
|
Valid values are 10, 30, and any multiple of 60. |
190
|
|
|
|
|
|
|
|
191
|
|
|
|
|
|
|
Be sure to specify 10 or 30 only for metrics that are stored by a |
192
|
|
|
|
|
|
|
C<PutMetricData> call with a C<StorageResolution> of 1. If you specify |
193
|
|
|
|
|
|
|
a Period of 10 or 30 for a metric that does not have sub-minute |
194
|
|
|
|
|
|
|
resolution, the alarm still attempts to gather data at the period rate |
195
|
|
|
|
|
|
|
that you specify. In this case, it does not receive data for the |
196
|
|
|
|
|
|
|
attempts that do not correspond to a one-minute data resolution, and |
197
|
|
|
|
|
|
|
the alarm may often lapse into INSUFFICENT_DATA status. Specifying 10 |
198
|
|
|
|
|
|
|
or 30 also sets this alarm as a high-resolution alarm, which has a |
199
|
|
|
|
|
|
|
higher charge than other alarms. For more information about pricing, |
200
|
|
|
|
|
|
|
see Amazon CloudWatch Pricing. |
201
|
|
|
|
|
|
|
|
202
|
|
|
|
|
|
|
An alarm's total current evaluation period can be no longer than one |
203
|
|
|
|
|
|
|
day, so C<Period> multiplied by C<EvaluationPeriods> cannot be more |
204
|
|
|
|
|
|
|
than 86,400 seconds. |
205
|
|
|
|
|
|
|
|
206
|
|
|
|
|
|
|
|
207
|
|
|
|
|
|
|
|
208
|
|
|
|
|
|
|
=head2 Statistic => Str |
209
|
|
|
|
|
|
|
|
210
|
|
|
|
|
|
|
The statistic for the metric associated with the alarm, other than |
211
|
|
|
|
|
|
|
percentile. For percentile statistics, use C<ExtendedStatistic>. |
212
|
|
|
|
|
|
|
|
213
|
|
|
|
|
|
|
Valid values are: C<"SampleCount">, C<"Average">, C<"Sum">, C<"Minimum">, C<"Maximum"> |
214
|
|
|
|
|
|
|
|
215
|
|
|
|
|
|
|
=head2 B<REQUIRED> Threshold => Num |
216
|
|
|
|
|
|
|
|
217
|
|
|
|
|
|
|
The value against which the specified statistic is compared. |
218
|
|
|
|
|
|
|
|
219
|
|
|
|
|
|
|
|
220
|
|
|
|
|
|
|
|
221
|
|
|
|
|
|
|
=head2 TreatMissingData => Str |
222
|
|
|
|
|
|
|
|
223
|
|
|
|
|
|
|
Sets how this alarm is to handle missing data points. If |
224
|
|
|
|
|
|
|
C<TreatMissingData> is omitted, the default behavior of C<missing> is |
225
|
|
|
|
|
|
|
used. For more information, see Configuring How CloudWatch Alarms |
226
|
|
|
|
|
|
|
Treats Missing Data. |
227
|
|
|
|
|
|
|
|
228
|
|
|
|
|
|
|
Valid Values: C<breaching | notBreaching | ignore | missing> |
229
|
|
|
|
|
|
|
|
230
|
|
|
|
|
|
|
|
231
|
|
|
|
|
|
|
|
232
|
|
|
|
|
|
|
=head2 Unit => Str |
233
|
|
|
|
|
|
|
|
234
|
|
|
|
|
|
|
The unit of measure for the statistic. For example, the units for the |
235
|
|
|
|
|
|
|
Amazon EC2 NetworkIn metric are Bytes because NetworkIn tracks the |
236
|
|
|
|
|
|
|
number of bytes that an instance receives on all network interfaces. |
237
|
|
|
|
|
|
|
You can also specify a unit when you create a custom metric. Units help |
238
|
|
|
|
|
|
|
provide conceptual meaning to your data. Metric data points that |
239
|
|
|
|
|
|
|
specify a unit of measure, such as Percent, are aggregated separately. |
240
|
|
|
|
|
|
|
|
241
|
|
|
|
|
|
|
If you specify a unit, you must use a unit that is appropriate for the |
242
|
|
|
|
|
|
|
metric. Otherwise, the CloudWatch alarm can get stuck in the |
243
|
|
|
|
|
|
|
C<INSUFFICIENT DATA> state. |
244
|
|
|
|
|
|
|
|
245
|
|
|
|
|
|
|
Valid values are: C<"Seconds">, C<"Microseconds">, C<"Milliseconds">, C<"Bytes">, C<"Kilobytes">, C<"Megabytes">, C<"Gigabytes">, C<"Terabytes">, C<"Bits">, C<"Kilobits">, C<"Megabits">, C<"Gigabits">, C<"Terabits">, C<"Percent">, C<"Count">, C<"Bytes/Second">, C<"Kilobytes/Second">, C<"Megabytes/Second">, C<"Gigabytes/Second">, C<"Terabytes/Second">, C<"Bits/Second">, C<"Kilobits/Second">, C<"Megabits/Second">, C<"Gigabits/Second">, C<"Terabits/Second">, C<"Count/Second">, C<"None"> |
246
|
|
|
|
|
|
|
|
247
|
|
|
|
|
|
|
|
248
|
|
|
|
|
|
|
=head1 SEE ALSO |
249
|
|
|
|
|
|
|
|
250
|
|
|
|
|
|
|
This class forms part of L<Paws>, documenting arguments for method PutMetricAlarm in L<Paws::CloudWatch> |
251
|
|
|
|
|
|
|
|
252
|
|
|
|
|
|
|
=head1 BUGS and CONTRIBUTIONS |
253
|
|
|
|
|
|
|
|
254
|
|
|
|
|
|
|
The source code is located here: https://github.com/pplu/aws-sdk-perl |
255
|
|
|
|
|
|
|
|
256
|
|
|
|
|
|
|
Please report bugs to: https://github.com/pplu/aws-sdk-perl/issues |
257
|
|
|
|
|
|
|
|
258
|
|
|
|
|
|
|
=cut |
259
|
|
|
|
|
|
|
|