-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdatadog-api-dashboard.generated.ts
1993 lines (1885 loc) · 71.7 KB
/
datadog-api-dashboard.generated.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// curl -Lo datadog-api-dashboard.generated.ts https://raw.githubusercontent.com/GoodNotes/ts-interface-generator/3e1d9a740ffe4d10f7279b636ca3e01a34dbc0dd/src/Dashboard.generated.ts
export interface Dashboard {
/** Identifier of the dashboard author. */
readonly authorHandle?: string;
/** Name of the dashboard author. */
readonly authorName?: string;
/** Creation date of the dashboard. */
readonly createdAt?: Date;
/** Description of the dashboard. */
readonly description?: string;
/** ID of the dashboard. */
readonly id?: string;
/** Whether this dashboard is read-only. If True, only the author and admins can make changes to it. Prefer using `restricted_roles` to manage write authorization. */
readonly isReadOnly?: boolean;
/** Layout type of the dashboard. */
readonly layoutType: 'ordered' | 'free' | UnparsedObject;
/** Modification date of the dashboard. */
readonly modifiedAt?: Date;
/** List of handles of users to notify when changes are made to this dashboard. */
readonly notifyList?: string[];
/**
* Reflow type for a **new dashboard layout** dashboard. Set this only when layout type is 'ordered'.
* If set to 'fixed', the dashboard expects all widgets to have a layout, and if it's set to 'auto',
* widgets should not have layouts.
*/
readonly reflowType?: 'auto' | 'fixed' | UnparsedObject;
/** A list of role identifiers. Only the author and users associated with at least one of these roles can edit this dashboard. */
readonly restrictedRoles?: string[];
/** List of team names representing ownership of a dashboard. */
readonly tags?: string[];
/** Array of template variables saved views. */
readonly templateVariablePresets?: Array<DashboardTemplateVariablePreset>;
/** List of template variables for this dashboard. */
readonly templateVariables?: Array<DashboardTemplateVariable>;
/** Title of the dashboard. */
readonly title: string;
/** The URL of the dashboard. */
readonly url?: string;
/** List of widgets to display on the dashboard. */
readonly widgets: Array<Widget>;
}
export interface UnparsedObject {
/** @internal */
readonly _data: any;
}
export interface DashboardTemplateVariablePreset {
/** The name of the variable. */
readonly name?: string;
/** List of variables. */
readonly templateVariables?: Array<DashboardTemplateVariablePresetValue>;
}
export interface DashboardTemplateVariablePresetValue {
/** The name of the variable. */
readonly name?: string;
/** (deprecated) The value of the template variable within the saved view. Cannot be used in conjunction with `values`. */
readonly value?: string;
/** One or many template variable values within the saved view, which will be unioned together using `OR` if more than one is specified. Cannot be used in conjunction with `value`. */
readonly values?: string[];
}
export interface DashboardTemplateVariable {
/** The list of values that the template variable drop-down is limited to. */
readonly availableValues?: string[];
/** One or many default values for template variables on load. If more than one default is specified, they will be unioned together with `OR`. Cannot be used in conjunction with `default`. */
readonly defaults?: string[];
/** The name of the variable. */
readonly name: string;
/** The tag prefix associated with the variable. Only tags with this prefix appear in the variable drop-down. */
readonly prefix?: string;
}
export interface Widget {
/** [Definition of the widget](https://docs.datadoghq.com/dashboards/widgets/). */
readonly definition:
| AlertGraphWidgetDefinition
| AlertValueWidgetDefinition
| ChangeWidgetDefinition
| CheckStatusWidgetDefinition
| DistributionWidgetDefinition
| EventStreamWidgetDefinition
| EventTimelineWidgetDefinition
| FreeTextWidgetDefinition
| GeomapWidgetDefinition
| GroupWidgetDefinition
| HeatMapWidgetDefinition
| HostMapWidgetDefinition
| IFrameWidgetDefinition
| ImageWidgetDefinition
| LogStreamWidgetDefinition
| MonitorSummaryWidgetDefinition
| NoteWidgetDefinition
| QueryValueWidgetDefinition
| RunWorkflowWidgetDefinition
| ScatterPlotWidgetDefinition
| SLOWidgetDefinition
| SLOListWidgetDefinition
| ServiceMapWidgetDefinition
| ServiceSummaryWidgetDefinition
| SunburstWidgetDefinition
| TableWidgetDefinition
| TimeseriesWidgetDefinition
| ToplistWidgetDefinition
| TreeMapWidgetDefinition
| ListStreamWidgetDefinition
| FunnelWidgetDefinition
| TopologyMapWidgetDefinition
| UnparsedObject;
/** ID of the widget. */
readonly id?: number;
/** The layout for a widget on a `free` or **new dashboard layout** dashboard. */
readonly layout?: WidgetLayout;
}
export interface AlertGraphWidgetDefinition {
/** ID of the alert to use in the widget. */
readonly alertId: string;
/** Time setting for the widget. */
readonly time?: WidgetTime;
/** The title of the widget. */
readonly title?: string;
/** How to align the text on the widget. */
readonly titleAlign?: 'center' | 'left' | 'right' | UnparsedObject;
/** Size of the title. */
readonly titleSize?: string;
/** Type of the alert graph widget. */
readonly type: 'alert_graph' | UnparsedObject;
/** Whether to display the Alert Graph as a timeseries or a top list. */
readonly vizType: 'timeseries' | 'toplist' | UnparsedObject;
}
export interface WidgetTime {
/** The available timeframes depend on the widget you are using. */
readonly liveSpan?:
| '1m'
| '5m'
| '10m'
| '15m'
| '30m'
| '1h'
| '4h'
| '1d'
| '2d'
| '1w'
| '1mo'
| '3mo'
| '6mo'
| '1y'
| 'alert'
| UnparsedObject;
}
export interface AlertValueWidgetDefinition {
/** ID of the alert to use in the widget. */
readonly alertId: string;
/** Number of decimal to show. If not defined, will use the raw value. */
readonly precision?: number;
/** How to align the text on the widget. */
readonly textAlign?: 'center' | 'left' | 'right' | UnparsedObject;
/** Title of the widget. */
readonly title?: string;
/** How to align the text on the widget. */
readonly titleAlign?: 'center' | 'left' | 'right' | UnparsedObject;
/** Size of value in the widget. */
readonly titleSize?: string;
/** Type of the alert value widget. */
readonly type: 'alert_value' | UnparsedObject;
/** Unit to display with the value. */
readonly unit?: string;
}
export interface ChangeWidgetDefinition {
/** List of custom links. */
readonly customLinks?: Array<WidgetCustomLink>;
/**
* Array of one request object to display in the widget.
*
* See the dedicated [Request JSON schema documentation](https://docs.datadoghq.com/dashboards/graphing_json/request_json)
* to learn how to build the `REQUEST_SCHEMA`.
*/
readonly requests: Array<ChangeWidgetRequest>;
/** Time setting for the widget. */
readonly time?: WidgetTime;
/** Title of the widget. */
readonly title?: string;
/** How to align the text on the widget. */
readonly titleAlign?: 'center' | 'left' | 'right' | UnparsedObject;
/** Size of the title. */
readonly titleSize?: string;
/** Type of the change widget. */
readonly type: 'change' | UnparsedObject;
}
export interface WidgetCustomLink {
/** The flag for toggling context menu link visibility. */
readonly isHidden?: boolean;
/** The label for the custom link URL. Keep the label short and descriptive. Use metrics and tags as variables. */
readonly label?: string;
/** The URL of the custom link. URL must include `http` or `https`. A relative URL must start with `/`. */
readonly link?: string;
/** The label ID that refers to a context menu link. Can be `logs`, `hosts`, `traces`, `profiles`, `processes`, `containers`, or `rum`. */
readonly overrideLabel?: string;
}
export interface ChangeWidgetRequest {
/** The log query. */
readonly apmQuery?: LogQueryDefinition;
/** Show the absolute or the relative change. */
readonly changeType?: 'absolute' | 'relative' | UnparsedObject;
/** Timeframe used for the change comparison. */
readonly compareTo?: 'hour_before' | 'day_before' | 'week_before' | 'month_before' | UnparsedObject;
/** The log query. */
readonly eventQuery?: LogQueryDefinition;
/** List of formulas that operate on queries. */
readonly formulas?: Array<WidgetFormula>;
/** Whether to show increase as good. */
readonly increaseGood?: boolean;
/** The log query. */
readonly logQuery?: LogQueryDefinition;
/** The log query. */
readonly networkQuery?: LogQueryDefinition;
/** What to order by. */
readonly orderBy?: 'change' | 'name' | 'present' | 'past' | UnparsedObject;
/** Widget sorting methods. */
readonly orderDir?: 'asc' | 'desc' | UnparsedObject;
/** The process query to use in the widget. */
readonly processQuery?: ProcessQueryDefinition;
/** The log query. */
readonly profileMetricsQuery?: LogQueryDefinition;
/** Query definition. */
readonly q?: string;
/** List of queries that can be returned directly or used in formulas. */
readonly queries?: Array<
| FormulaAndFunctionMetricQueryDefinition
| FormulaAndFunctionEventQueryDefinition
| FormulaAndFunctionProcessQueryDefinition
| FormulaAndFunctionApmDependencyStatsQueryDefinition
| FormulaAndFunctionApmResourceStatsQueryDefinition
| FormulaAndFunctionSLOQueryDefinition
| FormulaAndFunctionCloudCostQueryDefinition
| UnparsedObject
>;
/** Timeseries, scalar, or event list response. Event list response formats are supported by Geomap widgets. */
readonly responseFormat?: 'timeseries' | 'scalar' | 'event_list' | UnparsedObject;
/** The log query. */
readonly rumQuery?: LogQueryDefinition;
/** The log query. */
readonly securityQuery?: LogQueryDefinition;
/** Whether to show the present value. */
readonly showPresent?: boolean;
}
export interface LogQueryDefinition {
/** Define computation for a log query. */
readonly compute?: LogsQueryCompute;
/** List of tag prefixes to group by in the case of a cluster check. */
readonly groupBy?: Array<LogQueryDefinitionGroupBy>;
/** A coma separated-list of index names. Use "*" query all indexes at once. [Multiple Indexes](https://docs.datadoghq.com/logs/indexes/#multiple-indexes) */
readonly index?: string;
/** This field is mutually exclusive with `compute`. */
readonly multiCompute?: Array<LogsQueryCompute>;
/** The query being made on the logs. */
readonly search?: LogQueryDefinitionSearch;
}
export interface LogsQueryCompute {
/** The aggregation method. */
readonly aggregation: string;
/** Facet name. */
readonly facet?: string;
/** Define a time interval in seconds. */
readonly interval?: number;
}
export interface LogQueryDefinitionGroupBy {
/** Facet name. */
readonly facet: string;
/** Maximum number of items in the group. */
readonly limit?: number;
/** Define a sorting method. */
readonly sort?: LogQueryDefinitionGroupBySort;
}
export interface LogQueryDefinitionGroupBySort {
/** The aggregation method. */
readonly aggregation: string;
/** Facet name. */
readonly facet?: string;
/** Widget sorting methods. */
readonly order: 'asc' | 'desc' | UnparsedObject;
}
export interface LogQueryDefinitionSearch {
/** Search value to apply. */
readonly query: string;
}
export interface WidgetFormula {
/** Expression alias. */
readonly alias?: string;
/** Define a display mode for the table cell. */
readonly cellDisplayMode?: 'number' | 'bar' | UnparsedObject;
/** List of conditional formats. */
readonly conditionalFormats?: Array<WidgetConditionalFormat>;
/** String expression built from queries, formulas, and functions. */
readonly formula: string;
/** Options for limiting results returned. */
readonly limit?: WidgetFormulaLimit;
/** Styling options for widget formulas. */
readonly style?: WidgetFormulaStyle;
}
export interface WidgetConditionalFormat {
/** Comparator to apply. */
readonly comparator: '=' | '>' | '>=' | '<' | '<=' | UnparsedObject;
/** Color palette to apply to the background, same values available as palette. */
readonly customBgColor?: string;
/** Color palette to apply to the foreground, same values available as palette. */
readonly customFgColor?: string;
/** True hides values. */
readonly hideValue?: boolean;
/** Displays an image as the background. */
readonly imageUrl?: string;
/** Metric from the request to correlate this conditional format with. */
readonly metric?: string;
/** Color palette to apply. */
readonly palette:
| 'blue'
| 'custom_bg'
| 'custom_image'
| 'custom_text'
| 'gray_on_white'
| 'grey'
| 'green'
| 'orange'
| 'red'
| 'red_on_white'
| 'white_on_gray'
| 'white_on_green'
| 'green_on_white'
| 'white_on_red'
| 'white_on_yellow'
| 'yellow_on_white'
| 'black_on_light_yellow'
| 'black_on_light_green'
| 'black_on_light_red'
| UnparsedObject;
/** Defines the displayed timeframe. */
readonly timeframe?: string;
/** Value for the comparator. */
readonly value: number;
}
export interface WidgetFormulaLimit {
/** Number of results to return. */
readonly count?: number;
/** Direction of sort. */
readonly order?: 'asc' | 'desc' | UnparsedObject;
}
export interface WidgetFormulaStyle {
/** The color palette used to display the formula. A guide to the available color palettes can be found at https://docs.datadoghq.com/dashboards/guide/widget_colors */
readonly palette?: string;
/** Index specifying which color to use within the palette. */
readonly paletteIndex?: number;
}
export interface ProcessQueryDefinition {
/** List of processes. */
readonly filterBy?: string[];
/** Max number of items in the filter list. */
readonly limit?: number;
/** Your chosen metric. */
readonly metric: string;
/** Your chosen search term. */
readonly searchBy?: string;
}
export interface FormulaAndFunctionMetricQueryDefinition {
/** The aggregation methods available for metrics queries. */
readonly aggregator?: 'avg' | 'min' | 'max' | 'sum' | 'last' | 'area' | 'l2norm' | 'percentile' | UnparsedObject;
/** Data source for metrics queries. */
readonly dataSource: 'metrics' | UnparsedObject;
/** Name of the query for use in formulas. */
readonly name: string;
/** Metrics query definition. */
readonly query: string;
}
export interface FormulaAndFunctionEventQueryDefinition {
/** Compute options. */
readonly compute: FormulaAndFunctionEventQueryDefinitionCompute;
/** Data source for event platform-based queries. */
readonly dataSource:
| 'logs'
| 'spans'
| 'network'
| 'rum'
| 'security_signals'
| 'profiles'
| 'audit'
| 'events'
| 'ci_tests'
| 'ci_pipelines'
| UnparsedObject;
/** Group by options. */
readonly groupBy?: Array<FormulaAndFunctionEventQueryGroupBy>;
/** An array of index names to query in the stream. Omit or use `[]` to query all indexes at once. */
readonly indexes?: string[];
/** Name of the query for use in formulas. */
readonly name: string;
/** Search options. */
readonly search?: FormulaAndFunctionEventQueryDefinitionSearch;
/** Option for storage location. Feature in Private Beta. */
readonly storage?: string;
}
export interface FormulaAndFunctionEventQueryDefinitionCompute {
/** Aggregation methods for event platform queries. */
readonly aggregation:
| 'count'
| 'cardinality'
| 'median'
| 'pc75'
| 'pc90'
| 'pc95'
| 'pc98'
| 'pc99'
| 'sum'
| 'min'
| 'max'
| 'avg'
| UnparsedObject;
/** A time interval in milliseconds. */
readonly interval?: number;
/** Measurable attribute to compute. */
readonly metric?: string;
}
export interface FormulaAndFunctionEventQueryGroupBy {
/** Event facet. */
readonly facet: string;
/** Number of groups to return. */
readonly limit?: number;
/** Options for sorting group by results. */
readonly sort?: FormulaAndFunctionEventQueryGroupBySort;
}
export interface FormulaAndFunctionEventQueryGroupBySort {
/** Aggregation methods for event platform queries. */
readonly aggregation:
| 'count'
| 'cardinality'
| 'median'
| 'pc75'
| 'pc90'
| 'pc95'
| 'pc98'
| 'pc99'
| 'sum'
| 'min'
| 'max'
| 'avg'
| UnparsedObject;
/** Metric used for sorting group by results. */
readonly metric?: string;
/** Direction of sort. */
readonly order?: 'asc' | 'desc' | UnparsedObject;
}
export interface FormulaAndFunctionEventQueryDefinitionSearch {
/** Events search string. */
readonly query: string;
}
export interface FormulaAndFunctionProcessQueryDefinition {
/** The aggregation methods available for metrics queries. */
readonly aggregator?: 'avg' | 'min' | 'max' | 'sum' | 'last' | 'area' | 'l2norm' | 'percentile' | UnparsedObject;
/** Data sources that rely on the process backend. */
readonly dataSource: 'process' | 'container' | UnparsedObject;
/** Whether to normalize the CPU percentages. */
readonly isNormalizedCpu?: boolean;
/** Number of hits to return. */
readonly limit?: number;
/** Process metric name. */
readonly metric: string;
/** Name of query for use in formulas. */
readonly name: string;
/** Direction of sort. */
readonly sort?: 'asc' | 'desc' | UnparsedObject;
/** An array of tags to filter by. */
readonly tagFilters?: string[];
/** Text to use as filter. */
readonly textFilter?: string;
}
export interface FormulaAndFunctionApmDependencyStatsQueryDefinition {
/** Data source for APM dependency stats queries. */
readonly dataSource: 'apm_dependency_stats' | UnparsedObject;
/** APM environment. */
readonly env: string;
/** Determines whether stats for upstream or downstream dependencies should be queried. */
readonly isUpstream?: boolean;
/** Name of query to use in formulas. */
readonly name: string;
/** Name of operation on service. */
readonly operationName: string;
/** The name of the second primary tag used within APM; required when `primary_tag_value` is specified. See https://docs.datadoghq.com/tracing/guide/setting_primary_tags_to_scope/#add-a-second-primary-tag-in-datadog. */
readonly primaryTagName?: string;
/** Filter APM data by the second primary tag. `primary_tag_name` must also be specified. */
readonly primaryTagValue?: string;
/** APM resource. */
readonly resourceName: string;
/** APM service. */
readonly service: string;
/** APM statistic. */
readonly stat:
| 'avg_duration'
| 'avg_root_duration'
| 'avg_spans_per_trace'
| 'error_rate'
| 'pct_exec_time'
| 'pct_of_traces'
| 'total_traces_count'
| UnparsedObject;
}
export interface FormulaAndFunctionApmResourceStatsQueryDefinition {
/** Data source for APM resource stats queries. */
readonly dataSource: 'apm_resource_stats' | UnparsedObject;
/** APM environment. */
readonly env: string;
/** Array of fields to group results by. */
readonly groupBy?: string[];
/** Name of this query to use in formulas. */
readonly name: string;
/** Name of operation on service. */
readonly operationName?: string;
/** Name of the second primary tag used within APM. Required when `primary_tag_value` is specified. See https://docs.datadoghq.com/tracing/guide/setting_primary_tags_to_scope/#add-a-second-primary-tag-in-datadog */
readonly primaryTagName?: string;
/** Value of the second primary tag by which to filter APM data. `primary_tag_name` must also be specified. */
readonly primaryTagValue?: string;
/** APM resource name. */
readonly resourceName?: string;
/** APM service name. */
readonly service: string;
/** APM resource stat name. */
readonly stat:
| 'errors'
| 'error_rate'
| 'hits'
| 'latency_avg'
| 'latency_distribution'
| 'latency_max'
| 'latency_p50'
| 'latency_p75'
| 'latency_p90'
| 'latency_p95'
| 'latency_p99'
| UnparsedObject;
}
export interface FormulaAndFunctionSLOQueryDefinition {
/** Additional filters applied to the SLO query. */
readonly additionalQueryFilters?: string;
/** Data source for SLO measures queries. */
readonly dataSource: 'slo' | UnparsedObject;
/** Group mode to query measures. */
readonly groupMode?: 'overall' | 'components' | UnparsedObject;
/** SLO measures queries. */
readonly measure:
| 'good_events'
| 'bad_events'
| 'slo_status'
| 'error_budget_remaining'
| 'burn_rate'
| 'error_budget_burndown'
| UnparsedObject;
/** Name of the query for use in formulas. */
readonly name?: string;
/** ID of an SLO to query measures. */
readonly sloId: string;
/** Name of the query for use in formulas. */
readonly sloQueryType?: 'metric' | UnparsedObject;
}
export interface FormulaAndFunctionCloudCostQueryDefinition {
/** Aggregator used for the request. */
readonly aggregator?: 'avg' | 'last' | 'max' | 'min' | 'sum' | 'percentile' | UnparsedObject;
/** Data source for Cloud Cost queries. */
readonly dataSource: 'cloud_cost' | UnparsedObject;
/** Name of the query for use in formulas. */
readonly name: string;
/** Query for Cloud Cost data. */
readonly query: string;
}
export interface CheckStatusWidgetDefinition {
/** Name of the check to use in the widget. */
readonly check: string;
/** Group reporting a single check. */
readonly group?: string;
/** List of tag prefixes to group by in the case of a cluster check. */
readonly groupBy?: string[];
/** The kind of grouping to use. */
readonly grouping: 'check' | 'cluster' | UnparsedObject;
/** List of tags used to filter the groups reporting a cluster check. */
readonly tags?: string[];
/** Time setting for the widget. */
readonly time?: WidgetTime;
/** Title of the widget. */
readonly title?: string;
/** How to align the text on the widget. */
readonly titleAlign?: 'center' | 'left' | 'right' | UnparsedObject;
/** Size of the title. */
readonly titleSize?: string;
/** Type of the check status widget. */
readonly type: 'check_status' | UnparsedObject;
}
export interface DistributionWidgetDefinition {
/** A list of custom links. */
readonly customLinks?: Array<WidgetCustomLink>;
/** (Deprecated) The widget legend was replaced by a tooltip and sidebar. */
readonly legendSize?: string;
/** List of markers. */
readonly markers?: Array<WidgetMarker>;
/**
* Array of one request object to display in the widget.
*
* See the dedicated [Request JSON schema documentation](https://docs.datadoghq.com/dashboards/graphing_json/request_json)
* to learn how to build the `REQUEST_SCHEMA`.
*/
readonly requests: Array<DistributionWidgetRequest>;
/** (Deprecated) The widget legend was replaced by a tooltip and sidebar. */
readonly showLegend?: boolean;
/** Time setting for the widget. */
readonly time?: WidgetTime;
/** Title of the widget. */
readonly title?: string;
/** How to align the text on the widget. */
readonly titleAlign?: 'center' | 'left' | 'right' | UnparsedObject;
/** Size of the title. */
readonly titleSize?: string;
/** Type of the distribution widget. */
readonly type: 'distribution' | UnparsedObject;
/** X Axis controls for the distribution widget. */
readonly xaxis?: DistributionWidgetXAxis;
/** Y Axis controls for the distribution widget. */
readonly yaxis?: DistributionWidgetYAxis;
}
export interface WidgetMarker {
/**
* Combination of:
* - A severity error, warning, ok, or info
* - A line type: dashed, solid, or bold
* In this case of a Distribution widget, this can be set to be `x_axis_percentile`.
*/
readonly displayType?: string;
/** Label to display over the marker. */
readonly label?: string;
/** Timestamp for the widget. */
readonly time?: string;
/** Value to apply. Can be a single value y = 15 or a range of values 0 < y < 10. */
readonly value: string;
}
export interface DistributionWidgetRequest {
/** The log query. */
readonly apmQuery?: LogQueryDefinition;
/** The APM stats query for table and distributions widgets. */
readonly apmStatsQuery?: ApmStatsQueryDefinition;
/** The log query. */
readonly eventQuery?: LogQueryDefinition;
/** The log query. */
readonly logQuery?: LogQueryDefinition;
/** The log query. */
readonly networkQuery?: LogQueryDefinition;
/** The process query to use in the widget. */
readonly processQuery?: ProcessQueryDefinition;
/** The log query. */
readonly profileMetricsQuery?: LogQueryDefinition;
/** Widget query. */
readonly q?: string;
/** Query definition for Distribution Widget Histogram Request */
readonly query?:
| FormulaAndFunctionMetricQueryDefinition
| FormulaAndFunctionEventQueryDefinition
| FormulaAndFunctionApmResourceStatsQueryDefinition
| UnparsedObject;
/** Request type for the histogram request. */
readonly requestType?: 'histogram' | UnparsedObject;
/** The log query. */
readonly rumQuery?: LogQueryDefinition;
/** The log query. */
readonly securityQuery?: LogQueryDefinition;
/** Widget style definition. */
readonly style?: WidgetStyle;
}
export interface ApmStatsQueryDefinition {
/** Column properties used by the front end for display. */
readonly columns?: Array<ApmStatsQueryColumnType>;
/** Environment name. */
readonly env: string;
/** Operation name associated with service. */
readonly name: string;
/** The organization's host group name and value. */
readonly primaryTag: string;
/** Resource name. */
readonly resource?: string;
/** The level of detail for the request. */
readonly rowType: 'service' | 'resource' | 'span' | UnparsedObject;
/** Service name. */
readonly service: string;
}
export interface ApmStatsQueryColumnType {
/** A user-assigned alias for the column. */
readonly alias?: string;
/** Define a display mode for the table cell. */
readonly cellDisplayMode?: 'number' | 'bar' | UnparsedObject;
/** Column name. */
readonly name: string;
/** Widget sorting methods. */
readonly order?: 'asc' | 'desc' | UnparsedObject;
}
export interface WidgetStyle {
/** Color palette to apply to the widget. */
readonly palette?: string;
}
export interface DistributionWidgetXAxis {
/** True includes zero. */
readonly includeZero?: boolean;
/** Specifies maximum value to show on the x-axis. It takes a number, percentile (p90 === 90th percentile), or auto for default behavior. */
readonly max?: string;
/** Specifies minimum value to show on the x-axis. It takes a number, percentile (p90 === 90th percentile), or auto for default behavior. */
readonly min?: string;
/** Specifies the scale type. Possible values are `linear`. */
readonly scale?: string;
}
export interface DistributionWidgetYAxis {
/** True includes zero. */
readonly includeZero?: boolean;
/** The label of the axis to display on the graph. */
readonly label?: string;
/** Specifies the maximum value to show on the y-axis. It takes a number, or auto for default behavior. */
readonly max?: string;
/** Specifies minimum value to show on the y-axis. It takes a number, or auto for default behavior. */
readonly min?: string;
/** Specifies the scale type. Possible values are `linear` or `log`. */
readonly scale?: string;
}
export interface EventStreamWidgetDefinition {
/** Size to use to display an event. */
readonly eventSize?: 's' | 'l' | UnparsedObject;
/** Query to filter the event stream with. */
readonly query: string;
/** The execution method for multi-value filters. Can be either and or or. */
readonly tagsExecution?: string;
/** Time setting for the widget. */
readonly time?: WidgetTime;
/** Title of the widget. */
readonly title?: string;
/** How to align the text on the widget. */
readonly titleAlign?: 'center' | 'left' | 'right' | UnparsedObject;
/** Size of the title. */
readonly titleSize?: string;
/** Type of the event stream widget. */
readonly type: 'event_stream' | UnparsedObject;
}
export interface EventTimelineWidgetDefinition {
/** Query to filter the event timeline with. */
readonly query: string;
/** The execution method for multi-value filters. Can be either and or or. */
readonly tagsExecution?: string;
/** Time setting for the widget. */
readonly time?: WidgetTime;
/** Title of the widget. */
readonly title?: string;
/** How to align the text on the widget. */
readonly titleAlign?: 'center' | 'left' | 'right' | UnparsedObject;
/** Size of the title. */
readonly titleSize?: string;
/** Type of the event timeline widget. */
readonly type: 'event_timeline' | UnparsedObject;
}
export interface FreeTextWidgetDefinition {
/** Color of the text. */
readonly color?: string;
/** Size of the text. */
readonly fontSize?: string;
/** Text to display. */
readonly text: string;
/** How to align the text on the widget. */
readonly textAlign?: 'center' | 'left' | 'right' | UnparsedObject;
/** Type of the free text widget. */
readonly type: 'free_text' | UnparsedObject;
}
export interface GeomapWidgetDefinition {
/** A list of custom links. */
readonly customLinks?: Array<WidgetCustomLink>;
/**
* Array of one request object to display in the widget. The request must contain a `group-by` tag whose value is a country ISO code.
*
* See the [Request JSON schema documentation](https://docs.datadoghq.com/dashboards/graphing_json/request_json)
* for information about building the `REQUEST_SCHEMA`.
*/
readonly requests: Array<GeomapWidgetRequest>;
/** The style to apply to the widget. */
readonly style: GeomapWidgetDefinitionStyle;
/** Time setting for the widget. */
readonly time?: WidgetTime;
/** The title of your widget. */
readonly title?: string;
/** How to align the text on the widget. */
readonly titleAlign?: 'center' | 'left' | 'right' | UnparsedObject;
/** The size of the title. */
readonly titleSize?: string;
/** Type of the geomap widget. */
readonly type: 'geomap' | UnparsedObject;
/** The view of the world that the map should render. */
readonly view: GeomapWidgetDefinitionView;
}
export interface GeomapWidgetRequest {
/** Widget columns. */
readonly columns?: Array<ListStreamColumn>;
/** List of formulas that operate on queries. */
readonly formulas?: Array<WidgetFormula>;
/** The log query. */
readonly logQuery?: LogQueryDefinition;
/** The widget metrics query. */
readonly q?: string;
/** List of queries that can be returned directly or used in formulas. */
readonly queries?: Array<
| FormulaAndFunctionMetricQueryDefinition
| FormulaAndFunctionEventQueryDefinition
| FormulaAndFunctionProcessQueryDefinition
| FormulaAndFunctionApmDependencyStatsQueryDefinition
| FormulaAndFunctionApmResourceStatsQueryDefinition
| FormulaAndFunctionSLOQueryDefinition
| FormulaAndFunctionCloudCostQueryDefinition
| UnparsedObject
>;
/** Updated list stream widget. */
readonly query?: ListStreamQuery;
/** Timeseries, scalar, or event list response. Event list response formats are supported by Geomap widgets. */
readonly responseFormat?: 'timeseries' | 'scalar' | 'event_list' | UnparsedObject;
/** The log query. */
readonly rumQuery?: LogQueryDefinition;
/** The log query. */
readonly securityQuery?: LogQueryDefinition;
}
export interface ListStreamColumn {
/** Widget column field. */
readonly field: string;
/** Widget column width. */
readonly width: 'auto' | 'compact' | 'full' | UnparsedObject;
}
export interface ListStreamQuery {
/** Compute configuration for the List Stream Widget. Compute can be used only with the logs_transaction_stream (from 1 to 5 items) list stream source. */
readonly compute?: Array<ListStreamComputeItems>;
/** Source from which to query items to display in the stream. */
readonly dataSource:
| 'logs_stream'
| 'audit_stream'
| 'ci_pipeline_stream'
| 'ci_test_stream'
| 'rum_issue_stream'
| 'apm_issue_stream'
| 'logs_issue_stream'
| 'logs_pattern_stream'
| 'logs_transaction_stream'
| 'event_stream'
| UnparsedObject;
/** Size to use to display an event. */
readonly eventSize?: 's' | 'l' | UnparsedObject;
/** Group by configuration for the List Stream Widget. Group by can be used only with logs_pattern_stream (up to 3 items) or logs_transaction_stream (one group by item is required) list stream source. */
readonly groupBy?: Array<ListStreamGroupByItems>;
/** List of indexes. */
readonly indexes?: string[];
/** Widget query. */
readonly queryString: string;
/** Which column and order to sort by */
readonly sort?: WidgetFieldSort;
/** Option for storage location. Feature in Private Beta. */
readonly storage?: string;
}
export interface ListStreamComputeItems {
/** Aggregation value. */
readonly aggregation:
| 'count'
| 'cardinality'
| 'median'
| 'pc75'
| 'pc90'
| 'pc95'
| 'pc98'
| 'pc99'
| 'sum'
| 'min'
| 'max'
| 'avg'
| 'earliest'
| 'latest'
| 'most_frequent'
| UnparsedObject;
/** Facet name. */
readonly facet?: string;
}
export interface ListStreamGroupByItems {
/** Facet name. */
readonly facet: string;
}
export interface WidgetFieldSort {
/** Facet path for the column */
readonly column: string;
/** Widget sorting methods. */
readonly order: 'asc' | 'desc' | UnparsedObject;
}
export interface GeomapWidgetDefinitionStyle {
/** The color palette to apply to the widget. */
readonly palette: string;
/** Whether to flip the palette tones. */
readonly paletteFlip: boolean;
}
export interface GeomapWidgetDefinitionView {
/** The 2-letter ISO code of a country to focus the map on. Or `WORLD`. */
readonly focus: string;
}
export interface GroupWidgetDefinition {
/** Background color of the group title. */
readonly backgroundColor?: string;
/** URL of image to display as a banner for the group. */
readonly bannerImg?: string;
/** Layout type of the group. */
readonly layoutType: 'ordered' | UnparsedObject;
/** Whether to show the title or not. */
readonly showTitle?: boolean;
/** Title of the widget. */
readonly title?: string;
/** How to align the text on the widget. */
readonly titleAlign?: 'center' | 'left' | 'right' | UnparsedObject;
/** Type of the group widget. */
readonly type: 'group' | UnparsedObject;
/** List of widget groups. */
readonly widgets: Array<Widget>;
}
export interface HeatMapWidgetDefinition {
/** List of custom links. */
readonly customLinks?: Array<WidgetCustomLink>;
/** List of widget events. */
readonly events?: Array<WidgetEvent>;
/** Available legend sizes for a widget. Should be one of "0", "2", "4", "8", "16", or "auto". */
readonly legendSize?: string;
/** List of widget types. */
readonly requests: Array<HeatMapWidgetRequest>;
/** Whether or not to display the legend on this widget. */
readonly showLegend?: boolean;
/** Time setting for the widget. */
readonly time?: WidgetTime;
/** Title of the widget. */
readonly title?: string;
/** How to align the text on the widget. */
readonly titleAlign?: 'center' | 'left' | 'right' | UnparsedObject;
/** Size of the title. */
readonly titleSize?: string;
/** Type of the heat map widget. */
readonly type: 'heatmap' | UnparsedObject;
/** Axis controls for the widget. */
readonly yaxis?: WidgetAxis;
}
export interface WidgetEvent {
/** Query definition. */
readonly q: string;
/** The execution method for multi-value filters. */
readonly tagsExecution?: string;
}