MDAA TS Docs
    Preparing search index...

    Configuration for CloudWatch metric data queries used in metric math alarms.

    Defines individual metrics or expressions for metric math alarms enabling complex alerting logic combining multiple metrics.

    Use cases: Metric math expressions; Multi-metric alarms; Calculated metrics; Complex alerting

    AWS: CloudWatch metric data query for metric math alarms and complex metric expressions

    Validation: id required; either expression or metricName/namespace required

    interface MetricDataQueryProps {
        dimensions?: { [key: string]: string };
        expression?: string;
        id: string;
        label?: string;
        metricName?: string;
        namespace?: string;
        period?: number;
        returnData?: boolean;
        statistic?: string;
        unit?: string;
    }
    Index

    Properties

    dimensions?: { [key: string]: string }

    Metric dimensions for filtering to specific instances.

    expression?: string

    Metric math expression (e.g., "m1+m2"). Mutually exclusive with metricName.

    id: string

    Unique identifier for the query, referenced in metric math expressions (e.g., "m1", "total").

    label?: string

    Human-readable label for dashboards and alarms.

    metricName?: string

    CloudWatch metric name. Mutually exclusive with expression.

    namespace?: string

    CloudWatch metric namespace. Required when using metricName.

    period?: number

    Evaluation period in seconds for metric aggregation.

    returnData?: boolean

    Whether this metric data should be returned in query results.

    statistic?: string

    Statistic for metric aggregation (e.g., Sum, Average, Maximum).

    unit?: string

    CloudWatch metric unit (e.g., Count, Milliseconds).