Interface CfnServiceLevelObjective.MetricDataQueryProperty

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

@Stability(Stable) public static interface CfnServiceLevelObjective.MetricDataQueryProperty extends software.amazon.jsii.JsiiSerializable
Use this structure to define a metric or metric math expression that you want to use as for a service level objective.

Each MetricDataQuery in the MetricDataQueries array specifies either a metric to retrieve, or a metric math expression to be performed on retrieved metrics. A single MetricDataQueries array can include as many as 20 MetricDataQuery structures in the array. The 20 structures can include as many as 10 structures that contain a MetricStat parameter to retrieve a metric, and as many as 10 structures that contain the Expression parameter to perform a math expression. Of those Expression structures, exactly one must have true as the value for ReturnData . The result of this expression used for the SLO.

For more information about metric math expressions, see Use metric math .

Within each MetricDataQuery object, you must specify either Expression or MetricStat but not both.

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.applicationsignals.*;
 MetricDataQueryProperty metricDataQueryProperty = MetricDataQueryProperty.builder()
         .id("id")
         // the properties below are optional
         .accountId("accountId")
         .expression("expression")
         .metricStat(MetricStatProperty.builder()
                 .metric(MetricProperty.builder()
                         .dimensions(List.of(DimensionProperty.builder()
                                 .name("name")
                                 .value("value")
                                 .build()))
                         .metricName("metricName")
                         .namespace("namespace")
                         .build())
                 .period(123)
                 .stat("stat")
                 // the properties below are optional
                 .unit("unit")
                 .build())
         .returnData(false)
         .build();
 

See Also: