'Creates a new Alarm.
:type name: str
:param name: Name of alarm.
:type metric: str
:param metric: Name of alarm\'s associated metric.
:type namespace: str
:param namespace: The namespace for the alarm\'s metric.
:type statistic: str
:param statistic: The statistic to apply to the alarm\'s associated
metric.
Valid values: SampleCount|Average|Sum|Minimum|Maximum
:type comparison: str
:param comparison: Comparison used to compare statistic with threshold.
Valid values: >= | > | < | <=
:type threshold: float
:param threshold: The value against which the specified statistic
is compared.
:type period: int
:param period: The period in seconds over which the specified
statistic is applied.
:type evaluation_periods: int
:param evaluation_periods: The number of periods over which data is
compared to the specified threshold.
:type unit: str
:param unit: Allowed 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 description: str
:param description: Description of MetricAlarm
:type dimensions: dict
:param dimensions: A dictionary of dimension key/values where
the key is the dimension name and the value
is either a scalar value or an iterator
of values to be associated with that
dimension.
Example: {
\'InstanceId\': [\'i-0123456\', \'i-0123457\'],
\'LoadBalancerName\': \'test-lb\'
:type alarm_actions: list of strs
:param alarm_actions: A list of the ARNs of the actions to take in
ALARM state
:type insufficient_data_actions: list of strs
:param insufficient_data_actions: A list of the ARNs of the actions to
take in INSUFFICIENT_DATA state
:type ok_actions: list of strs
:param ok_actions: A list of the ARNs of the actions to take in OK state'

def __init__(self, connection=None, name=None, metric=None, namespace=None, statistic=None, comparison=None, threshold=None, period=None, evaluation_periods=None, unit=None, description='', dimensions=None, alarm_actions=None, insufficient_data_actions=None, ok_actions=None):

    self.name = name
    self.connection = connection
    self.metric = metric
    self.namespace = namespace
    self.statistic = statistic
    if (threshold is not None):
        self.threshold = float(threshold)
    else:
        self.threshold = None
    self.comparison = self._cmp_map.get(comparison)
    if (period is not None):
        self.period = int(period)
    else:
        self.period = None
    if (evaluation_periods is not None):
        self.evaluation_periods = int(evaluation_periods)
    else:
        self.evaluation_periods = None
    self.actions_enabled = None
    self.alarm_arn = None
    self.last_updated = None
    self.description = description
    self.dimensions = dimensions
    self.state_reason = None
    self.state_value = None
    self.unit = unit
    self.alarm_actions = alarm_actions
    self.insufficient_data_actions = insufficient_data_actions
    self.ok_actions = ok_actions
