1 | import { ConcreteWidget } from './widget';
|
2 | /**
|
3 | * Types of view
|
4 | */
|
5 | export declare enum LogQueryVisualizationType {
|
6 | /**
|
7 | * Table view
|
8 | */
|
9 | TABLE = "table",
|
10 | /**
|
11 | * Line view
|
12 | */
|
13 | LINE = "line",
|
14 | /**
|
15 | * Stacked area view
|
16 | */
|
17 | STACKEDAREA = "stackedarea",
|
18 | /**
|
19 | * Bar view
|
20 | */
|
21 | BAR = "bar",
|
22 | /**
|
23 | * Pie view
|
24 | */
|
25 | PIE = "pie"
|
26 | }
|
27 | /**
|
28 | * Properties for a Query widget
|
29 | */
|
30 | export interface LogQueryWidgetProps {
|
31 | /**
|
32 | * Title for the widget
|
33 | *
|
34 | * @default No title
|
35 | */
|
36 | readonly title?: string;
|
37 | /**
|
38 | * Names of log groups to query
|
39 | */
|
40 | readonly logGroupNames: string[];
|
41 | /**
|
42 | * Full query string for log insights
|
43 | *
|
44 | * Be sure to prepend every new line with a newline and pipe character
|
45 | * (`\n|`).
|
46 | *
|
47 | * @default - Exactly one of `queryString`, `queryLines` is required.
|
48 | */
|
49 | readonly queryString?: string;
|
50 | /**
|
51 | * A sequence of lines to use to build the query
|
52 | *
|
53 | * The query will be built by joining the lines together using `\n|`.
|
54 | *
|
55 | * @default - Exactly one of `queryString`, `queryLines` is required.
|
56 | */
|
57 | readonly queryLines?: string[];
|
58 | /**
|
59 | * The region the metrics of this widget should be taken from
|
60 | *
|
61 | * @default Current region
|
62 | */
|
63 | readonly region?: string;
|
64 | /**
|
65 | * The type of view to use
|
66 | *
|
67 | * @default LogQueryVisualizationType.TABLE
|
68 | */
|
69 | readonly view?: LogQueryVisualizationType;
|
70 | /**
|
71 | * Width of the widget, in a grid of 24 units wide
|
72 | *
|
73 | * @default 6
|
74 | */
|
75 | readonly width?: number;
|
76 | /**
|
77 | * Height of the widget
|
78 | *
|
79 | * @default 6
|
80 | */
|
81 | readonly height?: number;
|
82 | }
|
83 | /**
|
84 | * Display query results from Logs Insights
|
85 | */
|
86 | export declare class LogQueryWidget extends ConcreteWidget {
|
87 | private readonly props;
|
88 | constructor(props: LogQueryWidgetProps);
|
89 | toJson(): any[];
|
90 | }
|