import { Token } from "@aws-cdk/cdk"; import { Alarm } from "./alarm"; import { Metric } from "./metric"; import { ConcreteWidget } from "./widget"; /** * An AWS region */ export declare class Region extends Token { } /** * Basic properties for widgets that display metrics */ export interface MetricWidgetProps { /** * Title for the graph */ title?: string; /** * The region the metrics of this graph should be taken from * * @default Current region */ region?: Region; /** * Width of the widget, in a grid of 24 units wide * * @default 6 */ width?: number; /** * Height of the widget * * @default Depends on the type of widget */ height?: number; } /** * Properties for an AlarmWidget */ export interface AlarmWidgetProps extends MetricWidgetProps { /** * The alarm to show */ alarm: Alarm; /** * Range of left Y axis * * @default 0..automatic */ leftAxisRange?: YAxisRange; } /** * Display the metric associated with an alarm, including the alarm line */ export declare class AlarmWidget extends ConcreteWidget { private readonly props; constructor(props: AlarmWidgetProps); toJson(): any[]; } /** * Properties for a GraphWidget */ export interface GraphWidgetProps extends MetricWidgetProps { /** * Metrics to display on left Y axis */ left?: Metric[]; /** * Metrics to display on right Y axis */ right?: Metric[]; /** * Annotations for the left Y axis */ leftAnnotations?: HorizontalAnnotation[]; /** * Annotations for the right Y axis */ rightAnnotations?: HorizontalAnnotation[]; /** * Whether the graph should be shown as stacked lines */ stacked?: boolean; /** * Range of left Y axis * * @default 0..automatic */ leftAxisRange?: YAxisRange; /** * Range of right Y axis * * @default 0..automatic */ rightAxisRange?: YAxisRange; } /** * A dashboard widget that displays MarkDown */ export declare class GraphWidget extends ConcreteWidget { private readonly props; constructor(props: GraphWidgetProps); toJson(): any[]; } /** * Properties for a SingleValueWidget */ export interface SingleValueWidgetProps extends MetricWidgetProps { /** * Metrics to display */ metrics: Metric[]; } /** * A dashboard widget that displays the most recent value for every metric */ export declare class SingleValueWidget extends ConcreteWidget { private readonly props; constructor(props: SingleValueWidgetProps); toJson(): any[]; } /** * A minimum and maximum value for either the left or right Y axis */ export interface YAxisRange { /** * The minimum value * * @default Automatic */ min?: number; /** * The maximum value * * @default Automatic */ max?: number; } /** * Horizontal annotation to be added to a graph */ export interface HorizontalAnnotation { /** * The value of the annotation */ value: number; /** * Label for the annotation * * @default No label */ label?: string; /** * Hex color code to be used for the annotation * * @default Automatic color */ color?: string; /** * Add shading above or below the annotation * * @default No shading */ fill?: Shading; /** * Whether the annotation is visible * * @default true */ visible?: boolean; } export declare enum Shading { /** * Don't add shading */ None = "none", /** * Add shading above the annotation */ Above = "above", /** * Add shading below the annotation */ Below = "below" }