Interface CfnAlarm.MetricProperty

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
CfnAlarm.MetricProperty.Jsii$Proxy
Enclosing class:
CfnAlarm

@Stability(Stable) public static interface CfnAlarm.MetricProperty extends software.amazon.jsii.JsiiSerializable
The Metric property type represents a specific metric.

Metric is a property of the MetricStat property type.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.cloudwatch.*;
 MetricProperty metricProperty = MetricProperty.builder()
         .dimensions(List.of(DimensionProperty.builder()
                 .name("name")
                 .value("value")
                 .build()))
         .metricName("metricName")
         .namespace("namespace")
         .build();
 
  • Method Details

    • getDimensions

      @Stability(Stable) @Nullable default Object getDimensions()
      The metric dimensions that you want to be used for the metric that the alarm will watch.
    • getMetricName

      @Stability(Stable) @Nullable default String getMetricName()
      The name of the metric that you want the alarm to watch.

      This is a required field.

    • getNamespace

      @Stability(Stable) @Nullable default String getNamespace()
      The namespace of the metric that the alarm will watch.
    • builder

      @Stability(Stable) static CfnAlarm.MetricProperty.Builder builder()
      Returns:
      a CfnAlarm.MetricProperty.Builder of CfnAlarm.MetricProperty