forked from aws/aws-sdk-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAmazonCloudWatchAsync.java
More file actions
794 lines (768 loc) · 39.4 KB
/
AmazonCloudWatchAsync.java
File metadata and controls
794 lines (768 loc) · 39.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
/*
* Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
package com.amazonaws.services.cloudwatch;
import java.util.concurrent.Future;
import com.amazonaws.AmazonClientException;
import com.amazonaws.AmazonServiceException;
import com.amazonaws.handlers.AsyncHandler;
import com.amazonaws.services.cloudwatch.model.*;
/**
* Interface for accessing AmazonCloudWatch asynchronously.
* Each asynchronous method will return a Java Future object, and users are also allowed
* to provide a callback handler.
* Amazon CloudWatch <p>
* This is the <i>Amazon CloudWatch API Reference</i> . This guide provides detailed information about Amazon CloudWatch actions, data types, parameters,
* and errors. For detailed information about Amazon CloudWatch features and their associated API calls, go to the <a
* href="http://docs.amazonwebservices.com/AmazonCloudWatch/latest/DeveloperGuide"> Amazon CloudWatch Developer Guide </a> .
* </p>
* <p>
* Amazon CloudWatch is a web service that enables you to publish, monitor, and manage various metrics, as well as configure alarm actions based on data
* from metrics. For more information about this product go to <a href="http://aws.amazon.com/cloudwatch"> http://aws.amazon.com/cloudwatch </a> .
* </p>
* <p>
* Use the following links to get started using the <i>Amazon CloudWatch API Reference</i> :
* </p>
*
* <ul>
* <li> <a href="http://docs.amazonwebservices.com/AmazonCloudWatch/latest/APIReference/API_Operations.html"> Actions </a> : An alphabetical list of all
* Amazon CloudWatch actions.</li>
* <li> <a href="http://docs.amazonwebservices.com/AmazonCloudWatch/latest/APIReference/API_Types.html"> Data Types </a> : An alphabetical list of all
* Amazon CloudWatch data types.</li>
* <li> <a href="http://docs.amazonwebservices.com/AmazonCloudWatch/latest/APIReference/CommonParameters.html"> Common Parameters </a> : Parameters that
* all Query actions can use.</li>
* <li> <a href="http://docs.amazonwebservices.com/AmazonCloudWatch/latest/APIReference/CommonErrors.html"> Common Errors </a> : Client and server
* errors that all actions can return.</li>
* <li> <a href="http://docs.amazonwebservices.com/general/latest/gr/index.html?rande.html"> Regions and Endpoints </a> : Itemized regions and endpoints
* for all AWS products.</li>
* <li> <a href="http://monitoring.amazonaws.com/doc/2010-08-01/CloudWatch.wsdl"> WSDL Location </a> :
* http://monitoring.amazonaws.com/doc/2010-08-01/CloudWatch.wsdl</li>
*
* </ul>
*/
public interface AmazonCloudWatchAsync extends AmazonCloudWatch {
/**
* <p>
* Creates or updates an alarm and associates it with the specified
* Amazon CloudWatch metric. Optionally, this operation can associate one
* or more Amazon Simple Notification Service resources with the alarm.
* </p>
* <p>
* When this operation creates an alarm, the alarm state is immediately
* set to <code>INSUFFICIENT_DATA</code> . The alarm is evaluated and
* its <code>StateValue</code> is set appropriately. Any actions
* associated with the <code>StateValue</code> is then executed.
* </p>
* <p>
* <b>NOTE:</b> When updating an existing alarm, its StateValue is left
* unchanged.
* </p>
*
* @param putMetricAlarmRequest Container for the necessary parameters to
* execute the PutMetricAlarm operation on AmazonCloudWatch.
*
* @return A Java Future object containing the response from the
* PutMetricAlarm service method, as returned by AmazonCloudWatch.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonCloudWatch indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future<Void> putMetricAlarmAsync(PutMetricAlarmRequest putMetricAlarmRequest)
throws AmazonServiceException, AmazonClientException;
/**
* <p>
* Creates or updates an alarm and associates it with the specified
* Amazon CloudWatch metric. Optionally, this operation can associate one
* or more Amazon Simple Notification Service resources with the alarm.
* </p>
* <p>
* When this operation creates an alarm, the alarm state is immediately
* set to <code>INSUFFICIENT_DATA</code> . The alarm is evaluated and
* its <code>StateValue</code> is set appropriately. Any actions
* associated with the <code>StateValue</code> is then executed.
* </p>
* <p>
* <b>NOTE:</b> When updating an existing alarm, its StateValue is left
* unchanged.
* </p>
*
* @param putMetricAlarmRequest Container for the necessary parameters to
* execute the PutMetricAlarm operation on AmazonCloudWatch.
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the implementation of
* the four callback methods in this interface to process the operation
* result or handle the exception.
*
* @return A Java Future object containing the response from the
* PutMetricAlarm service method, as returned by AmazonCloudWatch.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonCloudWatch indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future<Void> putMetricAlarmAsync(PutMetricAlarmRequest putMetricAlarmRequest,
AsyncHandler<PutMetricAlarmRequest, Void> asyncHandler)
throws AmazonServiceException, AmazonClientException;
/**
* <p>
* Publishes metric data points to Amazon CloudWatch. Amazon Cloudwatch
* associates the data points with the specified metric. If the specified
* metric does not exist, Amazon CloudWatch creates the metric.
* </p>
* <p>
* <b>NOTE:</b> If you create a metric with the PutMetricData action,
* allow up to fifteen minutes for the metric to appear in calls to the
* ListMetrics action.
* </p>
* <p>
* The size of a PutMetricData request is limited to 8 KB for HTTP GET
* requests and 40 KB for HTTP POST requests.
* </p>
* <p>
* <b>IMPORTANT:</b> Although the Value parameter accepts numbers of type
* Double, Amazon CloudWatch truncates values with very large exponents.
* Values with base-10 exponents greater than 126 (1 x 10^126) are
* truncated. Likewise, values with base-10 exponents less than -130 (1 x
* 10^-130) are also truncated.
* </p>
*
* @param putMetricDataRequest Container for the necessary parameters to
* execute the PutMetricData operation on AmazonCloudWatch.
*
* @return A Java Future object containing the response from the
* PutMetricData service method, as returned by AmazonCloudWatch.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonCloudWatch indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future<Void> putMetricDataAsync(PutMetricDataRequest putMetricDataRequest)
throws AmazonServiceException, AmazonClientException;
/**
* <p>
* Publishes metric data points to Amazon CloudWatch. Amazon Cloudwatch
* associates the data points with the specified metric. If the specified
* metric does not exist, Amazon CloudWatch creates the metric.
* </p>
* <p>
* <b>NOTE:</b> If you create a metric with the PutMetricData action,
* allow up to fifteen minutes for the metric to appear in calls to the
* ListMetrics action.
* </p>
* <p>
* The size of a PutMetricData request is limited to 8 KB for HTTP GET
* requests and 40 KB for HTTP POST requests.
* </p>
* <p>
* <b>IMPORTANT:</b> Although the Value parameter accepts numbers of type
* Double, Amazon CloudWatch truncates values with very large exponents.
* Values with base-10 exponents greater than 126 (1 x 10^126) are
* truncated. Likewise, values with base-10 exponents less than -130 (1 x
* 10^-130) are also truncated.
* </p>
*
* @param putMetricDataRequest Container for the necessary parameters to
* execute the PutMetricData operation on AmazonCloudWatch.
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the implementation of
* the four callback methods in this interface to process the operation
* result or handle the exception.
*
* @return A Java Future object containing the response from the
* PutMetricData service method, as returned by AmazonCloudWatch.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonCloudWatch indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future<Void> putMetricDataAsync(PutMetricDataRequest putMetricDataRequest,
AsyncHandler<PutMetricDataRequest, Void> asyncHandler)
throws AmazonServiceException, AmazonClientException;
/**
* <p>
* Returns a list of valid metrics stored for the AWS account owner.
* Returned metrics can be used with <code>GetMetricStatistics</code> to
* obtain statistical data for a given metric.
* </p>
* <p>
* <b>NOTE:</b> Up to 500 results are returned for any one call. To
* retrieve further results, use returned NextToken values with
* subsequent ListMetrics operations.
* </p>
* <p>
* <b>NOTE:</b> If you create a metric with the PutMetricData action,
* allow up to fifteen minutes for the metric to appear in calls to the
* ListMetrics action.
* </p>
*
* @param listMetricsRequest Container for the necessary parameters to
* execute the ListMetrics operation on AmazonCloudWatch.
*
* @return A Java Future object containing the response from the
* ListMetrics service method, as returned by AmazonCloudWatch.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonCloudWatch indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future<ListMetricsResult> listMetricsAsync(ListMetricsRequest listMetricsRequest)
throws AmazonServiceException, AmazonClientException;
/**
* <p>
* Returns a list of valid metrics stored for the AWS account owner.
* Returned metrics can be used with <code>GetMetricStatistics</code> to
* obtain statistical data for a given metric.
* </p>
* <p>
* <b>NOTE:</b> Up to 500 results are returned for any one call. To
* retrieve further results, use returned NextToken values with
* subsequent ListMetrics operations.
* </p>
* <p>
* <b>NOTE:</b> If you create a metric with the PutMetricData action,
* allow up to fifteen minutes for the metric to appear in calls to the
* ListMetrics action.
* </p>
*
* @param listMetricsRequest Container for the necessary parameters to
* execute the ListMetrics operation on AmazonCloudWatch.
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the implementation of
* the four callback methods in this interface to process the operation
* result or handle the exception.
*
* @return A Java Future object containing the response from the
* ListMetrics service method, as returned by AmazonCloudWatch.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonCloudWatch indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future<ListMetricsResult> listMetricsAsync(ListMetricsRequest listMetricsRequest,
AsyncHandler<ListMetricsRequest, ListMetricsResult> asyncHandler)
throws AmazonServiceException, AmazonClientException;
/**
* <p>
* Gets statistics for the specified metric.
* </p>
* <p>
* <b>NOTE:</b> The maximum number of data points returned from a single
* GetMetricStatistics request is 1,440. If a request is made that
* generates more than 1,440 data points, Amazon CloudWatch returns an
* error. In such a case, alter the request by narrowing the specified
* time range or increasing the specified period. Alternatively, make
* multiple requests across adjacent time ranges.
* </p>
* <p>
* Amazon CloudWatch aggregates data points based on the length of the
* <code>period</code> that you specify. For example, if you request
* statistics with a one-minute granularity, Amazon CloudWatch aggregates
* data points with time stamps that fall within the same one-minute
* period. In such a case, the data points queried can greatly outnumber
* the data points returned.
* </p>
* <p>
* <b>NOTE:</b> The maximum number of data points that can be queried is
* 50,850; whereas the maximum number of data points returned is 1,440.
* </p>
* <p>
* The following examples show various statistics allowed by the data
* point query maximum of 50,850 when you call
* <code>GetMetricStatistics</code> on Amazon EC2 instances with detailed
* (one-minute) monitoring enabled:
* </p>
*
* <ul>
* <li>Statistics for up to 400 instances for a span of one hour</li>
* <li>Statistics for up to 35 instances over a span of 24 hours</li>
* <li>Statistics for up to 2 instances over a span of 2 weeks</li>
*
* </ul>
*
* @param getMetricStatisticsRequest Container for the necessary
* parameters to execute the GetMetricStatistics operation on
* AmazonCloudWatch.
*
* @return A Java Future object containing the response from the
* GetMetricStatistics service method, as returned by AmazonCloudWatch.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonCloudWatch indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future<GetMetricStatisticsResult> getMetricStatisticsAsync(GetMetricStatisticsRequest getMetricStatisticsRequest)
throws AmazonServiceException, AmazonClientException;
/**
* <p>
* Gets statistics for the specified metric.
* </p>
* <p>
* <b>NOTE:</b> The maximum number of data points returned from a single
* GetMetricStatistics request is 1,440. If a request is made that
* generates more than 1,440 data points, Amazon CloudWatch returns an
* error. In such a case, alter the request by narrowing the specified
* time range or increasing the specified period. Alternatively, make
* multiple requests across adjacent time ranges.
* </p>
* <p>
* Amazon CloudWatch aggregates data points based on the length of the
* <code>period</code> that you specify. For example, if you request
* statistics with a one-minute granularity, Amazon CloudWatch aggregates
* data points with time stamps that fall within the same one-minute
* period. In such a case, the data points queried can greatly outnumber
* the data points returned.
* </p>
* <p>
* <b>NOTE:</b> The maximum number of data points that can be queried is
* 50,850; whereas the maximum number of data points returned is 1,440.
* </p>
* <p>
* The following examples show various statistics allowed by the data
* point query maximum of 50,850 when you call
* <code>GetMetricStatistics</code> on Amazon EC2 instances with detailed
* (one-minute) monitoring enabled:
* </p>
*
* <ul>
* <li>Statistics for up to 400 instances for a span of one hour</li>
* <li>Statistics for up to 35 instances over a span of 24 hours</li>
* <li>Statistics for up to 2 instances over a span of 2 weeks</li>
*
* </ul>
*
* @param getMetricStatisticsRequest Container for the necessary
* parameters to execute the GetMetricStatistics operation on
* AmazonCloudWatch.
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the implementation of
* the four callback methods in this interface to process the operation
* result or handle the exception.
*
* @return A Java Future object containing the response from the
* GetMetricStatistics service method, as returned by AmazonCloudWatch.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonCloudWatch indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future<GetMetricStatisticsResult> getMetricStatisticsAsync(GetMetricStatisticsRequest getMetricStatisticsRequest,
AsyncHandler<GetMetricStatisticsRequest, GetMetricStatisticsResult> asyncHandler)
throws AmazonServiceException, AmazonClientException;
/**
* <p>
* Disables actions for the specified alarms. When an alarm's actions
* are disabled the alarm's state may change, but none of the alarm's
* actions will execute.
* </p>
*
* @param disableAlarmActionsRequest Container for the necessary
* parameters to execute the DisableAlarmActions operation on
* AmazonCloudWatch.
*
* @return A Java Future object containing the response from the
* DisableAlarmActions service method, as returned by AmazonCloudWatch.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonCloudWatch indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future<Void> disableAlarmActionsAsync(DisableAlarmActionsRequest disableAlarmActionsRequest)
throws AmazonServiceException, AmazonClientException;
/**
* <p>
* Disables actions for the specified alarms. When an alarm's actions
* are disabled the alarm's state may change, but none of the alarm's
* actions will execute.
* </p>
*
* @param disableAlarmActionsRequest Container for the necessary
* parameters to execute the DisableAlarmActions operation on
* AmazonCloudWatch.
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the implementation of
* the four callback methods in this interface to process the operation
* result or handle the exception.
*
* @return A Java Future object containing the response from the
* DisableAlarmActions service method, as returned by AmazonCloudWatch.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonCloudWatch indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future<Void> disableAlarmActionsAsync(DisableAlarmActionsRequest disableAlarmActionsRequest,
AsyncHandler<DisableAlarmActionsRequest, Void> asyncHandler)
throws AmazonServiceException, AmazonClientException;
/**
* <p>
* Retrieves alarms with the specified names. If no name is specified,
* all alarms for the user are returned. Alarms can be retrieved by using
* only a prefix for the alarm name, the alarm state, or a prefix for any
* action.
* </p>
*
* @param describeAlarmsRequest Container for the necessary parameters to
* execute the DescribeAlarms operation on AmazonCloudWatch.
*
* @return A Java Future object containing the response from the
* DescribeAlarms service method, as returned by AmazonCloudWatch.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonCloudWatch indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future<DescribeAlarmsResult> describeAlarmsAsync(DescribeAlarmsRequest describeAlarmsRequest)
throws AmazonServiceException, AmazonClientException;
/**
* <p>
* Retrieves alarms with the specified names. If no name is specified,
* all alarms for the user are returned. Alarms can be retrieved by using
* only a prefix for the alarm name, the alarm state, or a prefix for any
* action.
* </p>
*
* @param describeAlarmsRequest Container for the necessary parameters to
* execute the DescribeAlarms operation on AmazonCloudWatch.
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the implementation of
* the four callback methods in this interface to process the operation
* result or handle the exception.
*
* @return A Java Future object containing the response from the
* DescribeAlarms service method, as returned by AmazonCloudWatch.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonCloudWatch indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future<DescribeAlarmsResult> describeAlarmsAsync(DescribeAlarmsRequest describeAlarmsRequest,
AsyncHandler<DescribeAlarmsRequest, DescribeAlarmsResult> asyncHandler)
throws AmazonServiceException, AmazonClientException;
/**
* <p>
* Retrieves all alarms for a single metric. Specify a statistic,
* period, or unit to filter the set of alarms further.
* </p>
*
* @param describeAlarmsForMetricRequest Container for the necessary
* parameters to execute the DescribeAlarmsForMetric operation on
* AmazonCloudWatch.
*
* @return A Java Future object containing the response from the
* DescribeAlarmsForMetric service method, as returned by
* AmazonCloudWatch.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonCloudWatch indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future<DescribeAlarmsForMetricResult> describeAlarmsForMetricAsync(DescribeAlarmsForMetricRequest describeAlarmsForMetricRequest)
throws AmazonServiceException, AmazonClientException;
/**
* <p>
* Retrieves all alarms for a single metric. Specify a statistic,
* period, or unit to filter the set of alarms further.
* </p>
*
* @param describeAlarmsForMetricRequest Container for the necessary
* parameters to execute the DescribeAlarmsForMetric operation on
* AmazonCloudWatch.
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the implementation of
* the four callback methods in this interface to process the operation
* result or handle the exception.
*
* @return A Java Future object containing the response from the
* DescribeAlarmsForMetric service method, as returned by
* AmazonCloudWatch.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonCloudWatch indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future<DescribeAlarmsForMetricResult> describeAlarmsForMetricAsync(DescribeAlarmsForMetricRequest describeAlarmsForMetricRequest,
AsyncHandler<DescribeAlarmsForMetricRequest, DescribeAlarmsForMetricResult> asyncHandler)
throws AmazonServiceException, AmazonClientException;
/**
* <p>
* Retrieves history for the specified alarm. Filter alarms by date
* range or item type. If an alarm name is not specified, Amazon
* CloudWatch returns histories for all of the owner's alarms.
* </p>
* <p>
* <b>NOTE:</b> Amazon CloudWatch retains the history of an alarm for two
* weeks, whether or not you delete the alarm.
* </p>
*
* @param describeAlarmHistoryRequest Container for the necessary
* parameters to execute the DescribeAlarmHistory operation on
* AmazonCloudWatch.
*
* @return A Java Future object containing the response from the
* DescribeAlarmHistory service method, as returned by AmazonCloudWatch.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonCloudWatch indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future<DescribeAlarmHistoryResult> describeAlarmHistoryAsync(DescribeAlarmHistoryRequest describeAlarmHistoryRequest)
throws AmazonServiceException, AmazonClientException;
/**
* <p>
* Retrieves history for the specified alarm. Filter alarms by date
* range or item type. If an alarm name is not specified, Amazon
* CloudWatch returns histories for all of the owner's alarms.
* </p>
* <p>
* <b>NOTE:</b> Amazon CloudWatch retains the history of an alarm for two
* weeks, whether or not you delete the alarm.
* </p>
*
* @param describeAlarmHistoryRequest Container for the necessary
* parameters to execute the DescribeAlarmHistory operation on
* AmazonCloudWatch.
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the implementation of
* the four callback methods in this interface to process the operation
* result or handle the exception.
*
* @return A Java Future object containing the response from the
* DescribeAlarmHistory service method, as returned by AmazonCloudWatch.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonCloudWatch indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future<DescribeAlarmHistoryResult> describeAlarmHistoryAsync(DescribeAlarmHistoryRequest describeAlarmHistoryRequest,
AsyncHandler<DescribeAlarmHistoryRequest, DescribeAlarmHistoryResult> asyncHandler)
throws AmazonServiceException, AmazonClientException;
/**
* <p>
* Enables actions for the specified alarms.
* </p>
*
* @param enableAlarmActionsRequest Container for the necessary
* parameters to execute the EnableAlarmActions operation on
* AmazonCloudWatch.
*
* @return A Java Future object containing the response from the
* EnableAlarmActions service method, as returned by AmazonCloudWatch.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonCloudWatch indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future<Void> enableAlarmActionsAsync(EnableAlarmActionsRequest enableAlarmActionsRequest)
throws AmazonServiceException, AmazonClientException;
/**
* <p>
* Enables actions for the specified alarms.
* </p>
*
* @param enableAlarmActionsRequest Container for the necessary
* parameters to execute the EnableAlarmActions operation on
* AmazonCloudWatch.
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the implementation of
* the four callback methods in this interface to process the operation
* result or handle the exception.
*
* @return A Java Future object containing the response from the
* EnableAlarmActions service method, as returned by AmazonCloudWatch.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonCloudWatch indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future<Void> enableAlarmActionsAsync(EnableAlarmActionsRequest enableAlarmActionsRequest,
AsyncHandler<EnableAlarmActionsRequest, Void> asyncHandler)
throws AmazonServiceException, AmazonClientException;
/**
* <p>
* Deletes all specified alarms. In the event of an error, no alarms are
* deleted.
* </p>
*
* @param deleteAlarmsRequest Container for the necessary parameters to
* execute the DeleteAlarms operation on AmazonCloudWatch.
*
* @return A Java Future object containing the response from the
* DeleteAlarms service method, as returned by AmazonCloudWatch.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonCloudWatch indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future<Void> deleteAlarmsAsync(DeleteAlarmsRequest deleteAlarmsRequest)
throws AmazonServiceException, AmazonClientException;
/**
* <p>
* Deletes all specified alarms. In the event of an error, no alarms are
* deleted.
* </p>
*
* @param deleteAlarmsRequest Container for the necessary parameters to
* execute the DeleteAlarms operation on AmazonCloudWatch.
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the implementation of
* the four callback methods in this interface to process the operation
* result or handle the exception.
*
* @return A Java Future object containing the response from the
* DeleteAlarms service method, as returned by AmazonCloudWatch.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonCloudWatch indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future<Void> deleteAlarmsAsync(DeleteAlarmsRequest deleteAlarmsRequest,
AsyncHandler<DeleteAlarmsRequest, Void> asyncHandler)
throws AmazonServiceException, AmazonClientException;
/**
* <p>
* Temporarily sets the state of an alarm. When the updated
* <code>StateValue</code> differs from the previous value, the action
* configured for the appropriate state is invoked. This is not a
* permanent change. The next periodic alarm check (in about a minute)
* will set the alarm to its actual state.
* </p>
*
* @param setAlarmStateRequest Container for the necessary parameters to
* execute the SetAlarmState operation on AmazonCloudWatch.
*
* @return A Java Future object containing the response from the
* SetAlarmState service method, as returned by AmazonCloudWatch.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonCloudWatch indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future<Void> setAlarmStateAsync(SetAlarmStateRequest setAlarmStateRequest)
throws AmazonServiceException, AmazonClientException;
/**
* <p>
* Temporarily sets the state of an alarm. When the updated
* <code>StateValue</code> differs from the previous value, the action
* configured for the appropriate state is invoked. This is not a
* permanent change. The next periodic alarm check (in about a minute)
* will set the alarm to its actual state.
* </p>
*
* @param setAlarmStateRequest Container for the necessary parameters to
* execute the SetAlarmState operation on AmazonCloudWatch.
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the implementation of
* the four callback methods in this interface to process the operation
* result or handle the exception.
*
* @return A Java Future object containing the response from the
* SetAlarmState service method, as returned by AmazonCloudWatch.
*
* @throws AmazonClientException
* If any internal errors are encountered inside the client while
* attempting to make the request or handle the response. For example
* if a network connection is not available.
* @throws AmazonServiceException
* If an error response is returned by AmazonCloudWatch indicating
* either a problem with the data in the request, or a server side issue.
*/
public Future<Void> setAlarmStateAsync(SetAlarmStateRequest setAlarmStateRequest,
AsyncHandler<SetAlarmStateRequest, Void> asyncHandler)
throws AmazonServiceException, AmazonClientException;
}