def alarms(options = {})
      batches = Enumerator.new do |y|
        batch = []
        options = options.merge(
          namespace: @namespace,
          metric_name: @name
        )
        resp = @client.describe_alarms_for_metric(options)
        resp.data.metric_alarms.each do |m|
          batch << Alarm.new(
            name: m.alarm_name,
            data: m,
            client: @client
          )
        end
        y.yield(batch)
      end
      Alarm::Collection.new(batches)
    end
def alarms(options = {})
      batches = Enumerator.new do |y|
        batch = []
        options = options.merge(
          namespace: @namespace,
          metric_name: @name
        )
        resp = @client.describe_alarms_for_metric(options)
        resp.data.metric_alarms.each do |m|
          batch << Alarm.new(
            name: m.alarm_name,
            data: m,
            client: @client
          )
        end
        y.yield(batch)
      end
      Alarm::Collection.new(batches)
    end
@!group Associations
 @example Request syntax with placeholder values

   alarms = metric.alarms({
     statistic: "SampleCount", # accepts SampleCount, Average, Sum, Minimum, Maximum
     extended_statistic: "ExtendedStatistic",
     dimensions: [
       {
         name: "DimensionName", # required
         value: "DimensionValue", # required
       },
     ],
     period: 1,
     unit: "Seconds", # accepts 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
   })
 @param [Hash] options ({})
 @option options [String] :statistic
   The statistic for the metric, other than percentiles. For percentile
   statistics, use `ExtendedStatistics`.
 @option options [String] :extended_statistic
   The percentile statistic for the metric. Specify a value between p0.0
   and p100.
 @option options [Array<Types::Dimension>] :dimensions
   The dimensions associated with the metric. If the metric has any
   associated dimensions, you must specify them in order for the call to
   succeed.
 @option options [Integer] :period
   The period, in seconds, over which the statistic is applied.
 @option options [String] :unit
   The unit for the metric.
 @return [Alarm::Collection]