Skip to content

Describe Alarms For Metric

cloudwatch_describe_alarms_for_metric R Documentation

Retrieves the alarms for the specified metric

Description

Retrieves the alarms for the specified metric. To filter the results, specify a statistic, period, or unit.

This operation retrieves only standard alarms that are based on the specified metric. It does not return alarms based on math expressions that use the specified metric, or composite alarms that use the specified metric.

Usage

cloudwatch_describe_alarms_for_metric(MetricName, Namespace, Statistic,
  ExtendedStatistic, Dimensions, Period, Unit)

Arguments

MetricName

[required] The name of the metric.

Namespace

[required] The namespace of the metric.

Statistic

The statistic for the metric, other than percentiles. For percentile statistics, use ExtendedStatistics.

ExtendedStatistic

The percentile statistic for the metric. Specify a value between p0.0 and p100.

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.

Period

The period, in seconds, over which the statistic is applied.

Unit

The unit for the metric.

Value

A list with the following syntax:

list(
  MetricAlarms = list(
    list(
      AlarmName = "string",
      AlarmArn = "string",
      AlarmDescription = "string",
      AlarmConfigurationUpdatedTimestamp = as.POSIXct(
        "2015-01-01"
      ),
      ActionsEnabled = TRUE|FALSE,
      OKActions = list(
        "string"
      ),
      AlarmActions = list(
        "string"
      ),
      InsufficientDataActions = list(
        "string"
      ),
      StateValue = "OK"|"ALARM"|"INSUFFICIENT_DATA",
      StateReason = "string",
      StateReasonData = "string",
      StateUpdatedTimestamp = as.POSIXct(
        "2015-01-01"
      ),
      MetricName = "string",
      Namespace = "string",
      Statistic = "SampleCount"|"Average"|"Sum"|"Minimum"|"Maximum",
      ExtendedStatistic = "string",
      Dimensions = list(
        list(
          Name = "string",
          Value = "string"
        )
      ),
      Period = 123,
      Unit = "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",
      EvaluationPeriods = 123,
      DatapointsToAlarm = 123,
      Threshold = 123.0,
      ComparisonOperator = "GreaterThanOrEqualToThreshold"|"GreaterThanThreshold"|"LessThanThreshold"|"LessThanOrEqualToThreshold"|"LessThanLowerOrGreaterThanUpperThreshold"|"LessThanLowerThreshold"|"GreaterThanUpperThreshold",
      TreatMissingData = "string",
      EvaluateLowSampleCountPercentile = "string",
      Metrics = list(
        list(
          Id = "string",
          MetricStat = list(
            Metric = list(
              Namespace = "string",
              MetricName = "string",
              Dimensions = list(
                list(
                  Name = "string",
                  Value = "string"
                )
              )
            ),
            Period = 123,
            Stat = "string",
            Unit = "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"
          ),
          Expression = "string",
          Label = "string",
          ReturnData = TRUE|FALSE,
          Period = 123,
          AccountId = "string"
        )
      ),
      ThresholdMetricId = "string",
      EvaluationState = "PARTIAL_DATA",
      StateTransitionedTimestamp = as.POSIXct(
        "2015-01-01"
      )
    )
  )
)

Request syntax

svc$describe_alarms_for_metric(
  MetricName = "string",
  Namespace = "string",
  Statistic = "SampleCount"|"Average"|"Sum"|"Minimum"|"Maximum",
  ExtendedStatistic = "string",
  Dimensions = list(
    list(
      Name = "string",
      Value = "string"
    )
  ),
  Period = 123,
  Unit = "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"
)