ó FRTc@s:ddlmZddlmZdefd„ƒYZdS(iÿÿÿÿ(t MetricAlarm(t DimensiontMetriccBsÝeZdddddgZddddd d d d d dddddddddddddddddd'gZd'd„Zd „Zd!„Zd"„Zd'd#d$„Z e d'd'd'd'd'd'd%„Z d'd'd'd'd&„Z RS((tMinimumtMaximumtSumtAveraget SampleCounttSecondst Microsecondst MillisecondstBytest Kilobytest Megabytest Gigabytest TerabytestBitstKilobitstMegabitstGigabitstTerabitstPercenttCounts Bytes/SecondsKilobytes/SecondsMegabytes/SecondsGigabytes/SecondsTerabytes/Seconds Bits/SecondsKilobits/SecondsMegabits/SecondsGigabits/SecondsTerabits/Seconds Count/SecondcCs(||_d|_d|_d|_dS(N(t connectiontNonetnamet namespacet dimensions(tselfR((sG/opt/freeware/lib/python2.7/site-packages/boto/ec2/cloudwatch/metric.pyt__init__(s   cCs d|jS(Ns Metric:%s(R(R((sG/opt/freeware/lib/python2.7/site-packages/boto/ec2/cloudwatch/metric.pyt__repr__.scCs#|dkrtƒ|_|jSdS(Nt Dimensions(RR(RRtattrsR((sG/opt/freeware/lib/python2.7/site-packages/boto/ec2/cloudwatch/metric.pyt startElement1s  cCsD|dkr||_n(|dkr0||_nt|||ƒdS(Nt MetricNamet Namespace(RRtsetattr(RRtvalueR((sG/opt/freeware/lib/python2.7/site-packages/boto/ec2/cloudwatch/metric.pyt endElement6s     i<c CsIt|tƒs|g}n|jj||||j|j||j|ƒS(s® :type start_time: datetime :param start_time: The time stamp to use for determining the first datapoint to return. The value specified is inclusive; results include datapoints with the time stamp specified. :type end_time: datetime :param end_time: The time stamp to use for determining the last datapoint to return. The value specified is exclusive; results will include datapoints up to the time stamp specified. :type statistics: list :param statistics: A list of statistics names Valid values: Average | Sum | SampleCount | Maximum | Minimum :type unit: string :param unit: The unit for the metric. Value values are: Seconds | Microseconds | Milliseconds | Bytes | Kilobytes | Megabytes | Gigabytes | Terabytes | Bits | Kilobits | Megabits | Gigabits | Terabits | Percent | Count | Bytes/Second | Kilobytes/Second | Megabytes/Second | Gigabytes/Second | Terabytes/Second | Bits/Second | Kilobits/Second | Megabits/Second | Gigabits/Second | Terabits/Second | Count/Second | None :type period: integer :param period: The granularity, in seconds, of the returned datapoints. Period must be at least 60 seconds and must be a multiple of 60. The default value is 60. (t isinstancetlistRtget_metric_statisticsRRR(Rt start_timetend_timet statisticstunittperiod((sG/opt/freeware/lib/python2.7/site-packages/boto/ec2/cloudwatch/metric.pytquery>s"  cCsk| s|j} nt|j||j|j|||||| || | | | ƒ}|jj|ƒrg|SdS(s‚ Creates or updates an alarm and associates it with this metric. Optionally, this operation can associate one or more Amazon Simple Notification Service resources with the alarm. When this operation creates an alarm, the alarm state is immediately set to INSUFFICIENT_DATA. The alarm is evaluated and its StateValue is set appropriately. Any actions associated with the StateValue is then executed. When updating an existing alarm, its StateValue is left unchanged. :type alarm: boto.ec2.cloudwatch.alarm.MetricAlarm :param alarm: MetricAlarm object. N(RRRRRtput_metric_alarm(RRt comparisont thresholdR.tevaluation_periodst statistictenabledt descriptionRt alarm_actionst ok_actionstinsufficient_data_actionsR-talarm((sG/opt/freeware/lib/python2.7/site-packages/boto/ec2/cloudwatch/metric.pyt create_alarmks     cCs%|jj|j|j||||ƒS(sA Retrieves all alarms for this metric. Specify a statistic, period, or unit to filter the set of alarms further. :type period: int :param period: The period in seconds over which the statistic is applied. :type statistic: string :param statistic: The statistic for the metric. :param dimension_filters: A dictionary containing name/value pairs that will be used to filter the results. The key in the dictionary is the name of a Dimension. The value in the dictionary is either a scalar value of that Dimension name that you want to filter on, a list of values to filter on or None if you want all metrics with that Dimension name. :type unit: string :rtype list (Rtdescribe_alarms_for_metricRR(RR.R4RR-((sG/opt/freeware/lib/python2.7/site-packages/boto/ec2/cloudwatch/metric.pytdescribe_alarmsŠs N( t__name__t __module__t StatisticsRtUnitsRRR!R&R/tTrueR;R=(((sG/opt/freeware/lib/python2.7/site-packages/boto/ec2/cloudwatch/metric.pyRs$       / N(tboto.ec2.cloudwatch.alarmRtboto.ec2.cloudwatch.dimensionRtobjectR(((sG/opt/freeware/lib/python2.7/site-packages/boto/ec2/cloudwatch/metric.pyts