blib/lib/Paws/CloudWatch/PutCompositeAlarm.pm untested

filter: Statementstmt 0.0% 0 / 17 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 19 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::CloudWatch::PutCompositeAlarm;
3 use Moose;
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 AlarmRule => (is => 'ro', isa => 'Str', required => 1);
9 has InsufficientDataActions => (is => 'ro', isa => 'ArrayRef[Str|Undef]');
10 has OKActions => (is => 'ro', isa => 'ArrayRef[Str|Undef]');
11 has Tags => (is => 'ro', isa => 'ArrayRef[Paws::CloudWatch::Tag]');
12  
13 use MooseX::ClassAttribute;
14  
15 class_has _api_call => (isa => 'Str', is => 'ro', default => 'PutCompositeAlarm');
16 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::API::Response');
17 class_has _result_key => (isa => 'Str', is => 'ro');
18 1;
19  
20 ### main pod documentation begin ###
21  
22 =head1 NAME
23  
24 Paws::CloudWatch::PutCompositeAlarm - Arguments for method PutCompositeAlarm on L<Paws::CloudWatch>
25  
26 =head1 DESCRIPTION
27  
28 This class represents the parameters used for calling the method PutCompositeAlarm on the
29 L<Amazon CloudWatch|Paws::CloudWatch> service. Use the attributes of this class
30 as arguments to method PutCompositeAlarm.
31  
32 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to PutCompositeAlarm.
33  
34 =head1 SYNOPSIS
35  
36 my $monitoring = Paws->service('CloudWatch');
37 $monitoring->PutCompositeAlarm(
38 AlarmName => 'MyAlarmName',
39 AlarmRule => 'MyAlarmRule',
40 ActionsEnabled => 1, # OPTIONAL
41 AlarmActions => [
42 'MyResourceName', ... # min: 1, max: 1024
43 ], # OPTIONAL
44 AlarmDescription => 'MyAlarmDescription', # OPTIONAL
45 InsufficientDataActions => [
46 'MyResourceName', ... # min: 1, max: 1024
47 ], # OPTIONAL
48 OKActions => [
49 'MyResourceName', ... # min: 1, max: 1024
50 ], # OPTIONAL
51 Tags => [
52 {
53 Key => 'MyTagKey', # min: 1, max: 128
54 Value => 'MyTagValue', # max: 256
55  
56 },
57 ...
58 ], # OPTIONAL
59 );
60  
61 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.
62 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/monitoring/PutCompositeAlarm>
63  
64 =head1 ATTRIBUTES
65  
66  
67 =head2 ActionsEnabled => Bool
68  
69 Indicates whether actions should be executed during any changes to the
70 alarm state of the composite alarm. The default is C<TRUE>.
71  
72  
73  
74 =head2 AlarmActions => ArrayRef[Str|Undef]
75  
76 The actions to execute when this alarm transitions to the C<ALARM>
77 state from any other state. Each action is specified as an Amazon
78 Resource Name (ARN).
79  
80 Valid Values: C<arn:aws:sns:I<region>:I<account-id>:I<sns-topic-name> >
81 | C<arn:aws:ssm:I<region>:I<account-id>:opsitem:I<severity>>
82  
83  
84  
85 =head2 AlarmDescription => Str
86  
87 The description for the composite alarm.
88  
89  
90  
91 =head2 B<REQUIRED> AlarmName => Str
92  
93 The name for the composite alarm. This name must be unique within the
94 Region.
95  
96  
97  
98 =head2 B<REQUIRED> AlarmRule => Str
99  
100 An expression that specifies which other alarms are to be evaluated to
101 determine this composite alarm's state. For each alarm that you
102 reference, you designate a function that specifies whether that alarm
103 needs to be in ALARM state, OK state, or INSUFFICIENT_DATA state. You
104 can use operators (AND, OR and NOT) to combine multiple functions in a
105 single expression. You can use parenthesis to logically group the
106 functions in your expression.
107  
108 You can use either alarm names or ARNs to reference the other alarms
109 that are to be evaluated.
110  
111 Functions can include the following:
112  
113 =over
114  
115 =item *
116  
117 C<ALARM("I<alarm-name> or I<alarm-ARN>")> is TRUE if the named alarm is
118 in ALARM state.
119  
120 =item *
121  
122 C<OK("I<alarm-name> or I<alarm-ARN>")> is TRUE if the named alarm is in
123 OK state.
124  
125 =item *
126  
127 C<INSUFFICIENT_DATA("I<alarm-name> or I<alarm-ARN>")> is TRUE if the
128 named alarm is in INSUFFICIENT_DATA state.
129  
130 =item *
131  
132 C<TRUE> always evaluates to TRUE.
133  
134 =item *
135  
136 C<FALSE> always evaluates to FALSE.
137  
138 =back
139  
140 TRUE and FALSE are useful for testing a complex C<AlarmRule> structure,
141 and for testing your alarm actions.
142  
143 Alarm names specified in C<AlarmRule> can be surrounded with
144 double-quotes ("), but do not have to be.
145  
146 The following are some examples of C<AlarmRule>:
147  
148 =over
149  
150 =item *
151  
152 C<ALARM(CPUUtilizationTooHigh) AND ALARM(DiskReadOpsTooHigh)> specifies
153 that the composite alarm goes into ALARM state only if both
154 CPUUtilizationTooHigh and DiskReadOpsTooHigh alarms are in ALARM state.
155  
156 =item *
157  
158 C<ALARM(CPUUtilizationTooHigh) AND NOT ALARM(DeploymentInProgress)>
159 specifies that the alarm goes to ALARM state if CPUUtilizationTooHigh
160 is in ALARM state and DeploymentInProgress is not in ALARM state. This
161 example reduces alarm noise during a known deployment window.
162  
163 =item *
164  
165 C<(ALARM(CPUUtilizationTooHigh) OR ALARM(DiskReadOpsTooHigh)) AND
166 OK(NetworkOutTooHigh)> goes into ALARM state if CPUUtilizationTooHigh
167 OR DiskReadOpsTooHigh is in ALARM state, and if NetworkOutTooHigh is in
168 OK state. This provides another example of using a composite alarm to
169 prevent noise. This rule ensures that you are not notified with an
170 alarm action on high CPU or disk usage if a known network problem is
171 also occurring.
172  
173 =back
174  
175 The C<AlarmRule> can specify as many as 100 "children" alarms. The
176 C<AlarmRule> expression can have as many as 500 elements. Elements are
177 child alarms, TRUE or FALSE statements, and parentheses.
178  
179  
180  
181 =head2 InsufficientDataActions => ArrayRef[Str|Undef]
182  
183 The actions to execute when this alarm transitions to the
184 C<INSUFFICIENT_DATA> state from any other state. Each action is
185 specified as an Amazon Resource Name (ARN).
186  
187 Valid Values: C<arn:aws:sns:I<region>:I<account-id>:I<sns-topic-name>>
188  
189  
190  
191 =head2 OKActions => ArrayRef[Str|Undef]
192  
193 The actions to execute when this alarm transitions to an C<OK> state
194 from any other state. Each action is specified as an Amazon Resource
195 Name (ARN).
196  
197 Valid Values: C<arn:aws:sns:I<region>:I<account-id>:I<sns-topic-name>>
198  
199  
200  
201 =head2 Tags => ArrayRef[L<Paws::CloudWatch::Tag>]
202  
203 A list of key-value pairs to associate with the composite alarm. You
204 can associate as many as 50 tags with an alarm.
205  
206 Tags can help you organize and categorize your resources. You can also
207 use them to scope user permissions, by granting a user permission to
208 access or change only resources with certain tag values.
209  
210  
211  
212  
213 =head1 SEE ALSO
214  
215 This class forms part of L<Paws>, documenting arguments for method PutCompositeAlarm in L<Paws::CloudWatch>
216  
217 =head1 BUGS and CONTRIBUTIONS
218  
219 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
220  
221 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
222  
223 =cut
224