1 | import { Resource } from '@aws-cdk/core';
|
2 | import { Construct } from 'constructs';
|
3 | import { IWidget } from './widget';
|
4 | /**
|
5 | * Specify the period for graphs when the CloudWatch dashboard loads
|
6 | */
|
7 | export declare enum PeriodOverride {
|
8 | /**
|
9 | * Period of all graphs on the dashboard automatically adapt to the time range of the dashboard.
|
10 | */
|
11 | AUTO = "auto",
|
12 | /**
|
13 | * Period set for each graph will be used
|
14 | */
|
15 | INHERIT = "inherit"
|
16 | }
|
17 | /**
|
18 | * Properties for defining a CloudWatch Dashboard
|
19 | */
|
20 | export interface DashboardProps {
|
21 | /**
|
22 | * Name of the dashboard.
|
23 | *
|
24 | * If set, must only contain alphanumerics, dash (-) and underscore (_)
|
25 | *
|
26 | * @default - automatically generated name
|
27 | */
|
28 | readonly dashboardName?: string;
|
29 | /**
|
30 | * The start of the time range to use for each widget on the dashboard.
|
31 | * You can specify start without specifying end to specify a relative time range that ends with the current time.
|
32 | * In this case, the value of start must begin with -P, and you can use M, H, D, W and M as abbreviations for
|
33 | * minutes, hours, days, weeks and months. For example, -PT8H shows the last 8 hours and -P3M shows the last three months.
|
34 | * You can also use start along with an end field, to specify an absolute time range.
|
35 | * When specifying an absolute time range, use the ISO 8601 format. For example, 2018-12-17T06:00:00.000Z.
|
36 | *
|
37 | * @default When the dashboard loads, the start time will be the default time range.
|
38 | */
|
39 | readonly start?: string;
|
40 | /**
|
41 | * The end of the time range to use for each widget on the dashboard when the dashboard loads.
|
42 | * If you specify a value for end, you must also specify a value for start.
|
43 | * Specify an absolute time in the ISO 8601 format. For example, 2018-12-17T06:00:00.000Z.
|
44 | *
|
45 | * @default When the dashboard loads, the end date will be the current time.
|
46 | */
|
47 | readonly end?: string;
|
48 | /**
|
49 | * Use this field to specify the period for the graphs when the dashboard loads.
|
50 | * Specifying `Auto` causes the period of all graphs on the dashboard to automatically adapt to the time range of the dashboard.
|
51 | * Specifying `Inherit` ensures that the period set for each graph is always obeyed.
|
52 | *
|
53 | * @default Auto
|
54 | */
|
55 | readonly periodOverride?: PeriodOverride;
|
56 | /**
|
57 | * Initial set of widgets on the dashboard
|
58 | *
|
59 | * One array represents a row of widgets.
|
60 | *
|
61 | * @default - No widgets
|
62 | */
|
63 | readonly widgets?: IWidget[][];
|
64 | }
|
65 | /**
|
66 | * A CloudWatch dashboard
|
67 | */
|
68 | export declare class Dashboard extends Resource {
|
69 | /**
|
70 | * The name of this dashboard
|
71 | *
|
72 | * @attribute
|
73 | */
|
74 | readonly dashboardName: string;
|
75 | /**
|
76 | * ARN of this dashboard
|
77 | *
|
78 | * @attribute
|
79 | */
|
80 | readonly dashboardArn: string;
|
81 | private readonly rows;
|
82 | constructor(scope: Construct, id: string, props?: DashboardProps);
|
83 | /**
|
84 | * Add a widget to the dashboard.
|
85 | *
|
86 | * Widgets given in multiple calls to add() will be laid out stacked on
|
87 | * top of each other.
|
88 | *
|
89 | * Multiple widgets added in the same call to add() will be laid out next
|
90 | * to each other.
|
91 | */
|
92 | addWidgets(...widgets: IWidget[]): void;
|
93 | }
|