diff options
author | Felix Yan <felixonmars@gmail.com> | 2014-07-13 14:23:14 +0800 |
---|---|---|
committer | Felix Yan <felixonmars@gmail.com> | 2014-07-13 14:23:14 +0800 |
commit | 925adfcd2401281ba078ba213778709a5d928c55 (patch) | |
tree | 02eb18b3ef160932c4d5b65d1ca4d4de9b96ec48 /boto/ec2/cloudwatch/alarm.py | |
parent | 5a28d1c6a3b11b979bf32ea7fbfd6d5156c01395 (diff) | |
download | boto-925adfcd2401281ba078ba213778709a5d928c55.tar.gz |
cloudwatch module: add backward-compatible support for Python 3.3+
Diffstat (limited to 'boto/ec2/cloudwatch/alarm.py')
-rw-r--r-- | boto/ec2/cloudwatch/alarm.py | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/boto/ec2/cloudwatch/alarm.py b/boto/ec2/cloudwatch/alarm.py index 1ef8869c..4989fb34 100644 --- a/boto/ec2/cloudwatch/alarm.py +++ b/boto/ec2/cloudwatch/alarm.py @@ -21,7 +21,6 @@ # from datetime import datetime -from boto.resultset import ResultSet from boto.ec2.cloudwatch.listelement import ListElement from boto.ec2.cloudwatch.dimension import Dimension from boto.compat import json @@ -253,11 +252,11 @@ class MetricAlarm(object): def add_alarm_action(self, action_arn=None): """ - Adds an alarm action, represented as an SNS topic, to this alarm. + Adds an alarm action, represented as an SNS topic, to this alarm. What do do when alarm is triggered. :type action_arn: str - :param action_arn: SNS topics to which notification should be + :param action_arn: SNS topics to which notification should be sent if the alarm goes to state ALARM. """ if not action_arn: @@ -271,21 +270,21 @@ class MetricAlarm(object): this alarm. What to do when the insufficient_data state is reached. :type action_arn: str - :param action_arn: SNS topics to which notification should be + :param action_arn: SNS topics to which notification should be sent if the alarm goes to state INSUFFICIENT_DATA. """ if not action_arn: return self.actions_enabled = 'true' self.insufficient_data_actions.append(action_arn) - + def add_ok_action(self, action_arn=None): """ Adds an ok action, represented as an SNS topic, to this alarm. What to do when the ok state is reached. :type action_arn: str - :param action_arn: SNS topics to which notification should be + :param action_arn: SNS topics to which notification should be sent if the alarm goes to state INSUFFICIENT_DATA. """ if not action_arn: @@ -321,4 +320,3 @@ class AlarmHistoryItem(object): '%Y-%m-%dT%H:%M:%S.%fZ') except ValueError: self.timestamp = datetime.strptime(value, '%Y-%m-%dT%H:%M:%SZ') - |