@intentius/chant-lexicon-grafana 0.99.0 → 0.100.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (224) hide show
  1. package/README.md +12 -6
  2. package/dist/annotations.d.ts +61 -0
  3. package/dist/annotations.d.ts.map +1 -0
  4. package/dist/api/apply.d.ts +8 -4
  5. package/dist/api/apply.d.ts.map +1 -1
  6. package/dist/api/fake-grafana.d.ts +2 -0
  7. package/dist/api/fake-grafana.d.ts.map +1 -1
  8. package/dist/api/folders.d.ts +53 -17
  9. package/dist/api/folders.d.ts.map +1 -1
  10. package/dist/build.d.ts +26 -5
  11. package/dist/build.d.ts.map +1 -1
  12. package/dist/catalog.d.ts +1 -1
  13. package/dist/catalog.d.ts.map +1 -1
  14. package/dist/codegen/docs.d.ts.map +1 -1
  15. package/dist/codegen/generate.d.ts +7 -1
  16. package/dist/codegen/generate.d.ts.map +1 -1
  17. package/dist/composites/shared.d.ts +4 -3
  18. package/dist/composites/shared.d.ts.map +1 -1
  19. package/dist/dashboard.d.ts +42 -14
  20. package/dist/dashboard.d.ts.map +1 -1
  21. package/dist/datasource-refs.d.ts +9 -5
  22. package/dist/datasource-refs.d.ts.map +1 -1
  23. package/dist/datasource-settings.d.ts +834 -0
  24. package/dist/datasource-settings.d.ts.map +1 -0
  25. package/dist/datasource.d.ts +53 -11
  26. package/dist/datasource.d.ts.map +1 -1
  27. package/dist/deep-observe-hooks.d.ts +1 -1
  28. package/dist/deep-observe-hooks.d.ts.map +1 -1
  29. package/dist/deep-observe.d.ts +9 -4
  30. package/dist/deep-observe.d.ts.map +1 -1
  31. package/dist/describe-resources.d.ts +1 -0
  32. package/dist/describe-resources.d.ts.map +1 -1
  33. package/dist/detect.d.ts +4 -2
  34. package/dist/detect.d.ts.map +1 -1
  35. package/dist/folder.d.ts +68 -0
  36. package/dist/folder.d.ts.map +1 -0
  37. package/dist/import/generator.d.ts.map +1 -1
  38. package/dist/import/mappings.d.ts +12 -6
  39. package/dist/import/mappings.d.ts.map +1 -1
  40. package/dist/import/model.d.ts +7 -0
  41. package/dist/import/model.d.ts.map +1 -1
  42. package/dist/import/normalize.d.ts.map +1 -1
  43. package/dist/import/parser.d.ts +16 -1
  44. package/dist/import/parser.d.ts.map +1 -1
  45. package/dist/import/testdata/fixtures.d.ts +6 -0
  46. package/dist/import/testdata/fixtures.d.ts.map +1 -1
  47. package/dist/import/v2.d.ts +4 -3
  48. package/dist/import/v2.d.ts.map +1 -1
  49. package/dist/index.d.ts +11 -9
  50. package/dist/index.d.ts.map +1 -1
  51. package/dist/init-templates.d.ts +27 -0
  52. package/dist/init-templates.d.ts.map +1 -0
  53. package/dist/integrity.json +11 -9
  54. package/dist/lint/audit-catalog.d.ts +1 -1
  55. package/dist/lint/audit-catalog.d.ts.map +1 -1
  56. package/dist/lint/post-synth/graf101.d.ts +1 -1
  57. package/dist/lint/post-synth/graf104.d.ts +2 -2
  58. package/dist/lint/post-synth/graf106.d.ts +2 -2
  59. package/dist/lint/post-synth/graf110.d.ts +8 -0
  60. package/dist/lint/post-synth/graf110.d.ts.map +1 -0
  61. package/dist/lint/post-synth/grafana-helpers.d.ts.map +1 -1
  62. package/dist/lint/post-synth/index.d.ts.map +1 -1
  63. package/dist/manifest.json +1 -1
  64. package/dist/meta.json +70 -0
  65. package/dist/okf/index.md +18 -3
  66. package/dist/okf/rules/GRAF101.md +2 -2
  67. package/dist/okf/rules/GRAF104.md +2 -2
  68. package/dist/okf/rules/GRAF106.md +2 -2
  69. package/dist/okf/rules/GRAF110.md +11 -0
  70. package/dist/okf/types/AdhocVariable.md +9 -0
  71. package/dist/okf/types/AzureMonitorQuery.md +9 -0
  72. package/dist/okf/types/BigQueryQuery.md +9 -0
  73. package/dist/okf/types/CloudMonitoringQuery.md +9 -0
  74. package/dist/okf/types/CloudWatchQuery.md +9 -0
  75. package/dist/okf/types/Dashboard.md +1 -1
  76. package/dist/okf/types/Datasource.md +1 -1
  77. package/dist/okf/types/DatasourceProvisioning.md +9 -0
  78. package/dist/okf/types/ElasticsearchQuery.md +9 -0
  79. package/dist/okf/types/ExternalDatasource.md +1 -1
  80. package/dist/okf/types/Folder.md +9 -0
  81. package/dist/okf/types/GroupByVariable.md +9 -0
  82. package/dist/okf/types/MSSQLQuery.md +9 -0
  83. package/dist/okf/types/MySQLQuery.md +9 -0
  84. package/dist/okf/types/PostgresQuery.md +9 -0
  85. package/dist/okf/types/PyroscopeQuery.md +9 -0
  86. package/dist/okf/types/SwitchVariable.md +9 -0
  87. package/dist/op/activities/grafana-apply.d.ts +11 -0
  88. package/dist/op/activities/grafana-apply.d.ts.map +1 -1
  89. package/dist/op/activities/index.d.ts +1 -1
  90. package/dist/op/activities/index.d.ts.map +1 -1
  91. package/dist/ownership.d.ts +11 -0
  92. package/dist/ownership.d.ts.map +1 -1
  93. package/dist/pin.d.ts +1 -1
  94. package/dist/pin.d.ts.map +1 -1
  95. package/dist/plugin.d.ts.map +1 -1
  96. package/dist/promql-check.d.ts.map +1 -1
  97. package/dist/query-models.d.ts +95 -0
  98. package/dist/query-models.d.ts.map +1 -0
  99. package/dist/query.d.ts +107 -10
  100. package/dist/query.d.ts.map +1 -1
  101. package/dist/rules/graf101.ts +2 -2
  102. package/dist/rules/graf104.ts +3 -3
  103. package/dist/rules/graf106.ts +3 -3
  104. package/dist/rules/graf110.ts +17 -0
  105. package/dist/rules/grafana-helpers.ts +13 -3
  106. package/dist/schema/azuremonitor.gen.d.ts +354 -0
  107. package/dist/schema/azuremonitor.gen.d.ts.map +1 -0
  108. package/dist/schema/bigquery.gen.d.ts +93 -0
  109. package/dist/schema/bigquery.gen.d.ts.map +1 -0
  110. package/dist/schema/cloudwatch.gen.d.ts +394 -0
  111. package/dist/schema/cloudwatch.gen.d.ts.map +1 -0
  112. package/dist/schema/elasticsearch.gen.d.ts +444 -0
  113. package/dist/schema/elasticsearch.gen.d.ts.map +1 -0
  114. package/dist/schema/googlecloudmonitoring.gen.d.ts +312 -0
  115. package/dist/schema/googlecloudmonitoring.gen.d.ts.map +1 -0
  116. package/dist/schema/grafanapyroscope.gen.d.ts +60 -0
  117. package/dist/schema/grafanapyroscope.gen.d.ts.map +1 -0
  118. package/dist/schema/index.d.ts +6 -0
  119. package/dist/schema/index.d.ts.map +1 -1
  120. package/dist/schema/table.gen.d.ts +13 -0
  121. package/dist/schema/table.gen.d.ts.map +1 -1
  122. package/dist/schema-validate.d.ts +9 -0
  123. package/dist/schema-validate.d.ts.map +1 -1
  124. package/dist/skill-defs.d.ts.map +1 -1
  125. package/dist/skills/chant-grafana-operations.md +108 -0
  126. package/dist/skills/chant-grafana.md +5 -4
  127. package/dist/spec/schemas.d.ts +9 -7
  128. package/dist/spec/schemas.d.ts.map +1 -1
  129. package/dist/spec/schemas.gen.d.ts +3 -0
  130. package/dist/spec/schemas.gen.d.ts.map +1 -0
  131. package/dist/validate-alerting.d.ts.map +1 -1
  132. package/dist/validate-output.d.ts +15 -2
  133. package/dist/validate-output.d.ts.map +1 -1
  134. package/dist/validate.d.ts.map +1 -1
  135. package/dist/validation.d.ts +14 -0
  136. package/dist/validation.d.ts.map +1 -0
  137. package/dist/variables.d.ts +102 -5
  138. package/dist/variables.d.ts.map +1 -1
  139. package/package.json +2 -2
  140. package/src/annotations.ts +84 -0
  141. package/src/api/apply.test.ts +19 -1
  142. package/src/api/apply.ts +18 -8
  143. package/src/api/fake-grafana.ts +6 -2
  144. package/src/api/folders.ts +106 -32
  145. package/src/build.test.ts +142 -6
  146. package/src/build.ts +126 -24
  147. package/src/catalog.ts +20 -2
  148. package/src/codegen/docs.ts +13 -6
  149. package/src/codegen/generate.ts +27 -1
  150. package/src/composites/shared.ts +3 -2
  151. package/src/dashboard.ts +59 -14
  152. package/src/datasource-refs.ts +30 -6
  153. package/src/datasource-settings.test.ts +106 -0
  154. package/src/datasource-settings.ts +941 -0
  155. package/src/datasource.ts +71 -11
  156. package/src/deep-observe-hooks.ts +16 -1
  157. package/src/deep-observe.test.ts +47 -1
  158. package/src/deep-observe.ts +36 -13
  159. package/src/describe-resources.test.ts +16 -0
  160. package/src/describe-resources.ts +36 -1
  161. package/src/detect.ts +3 -3
  162. package/src/folder.ts +118 -0
  163. package/src/generated/lexicon-grafana.json +70 -0
  164. package/src/import/generated-types.e2e.test.ts +15 -3
  165. package/src/import/generator.ts +2 -1
  166. package/src/import/mappings.ts +98 -26
  167. package/src/import/model.ts +7 -0
  168. package/src/import/normalize.ts +32 -3
  169. package/src/import/parser.test.ts +97 -21
  170. package/src/import/parser.ts +169 -18
  171. package/src/import/roundtrip.test.ts +104 -9
  172. package/src/import/testdata/fixtures.ts +8 -0
  173. package/src/import/v2.ts +4 -3
  174. package/src/index.ts +122 -13
  175. package/src/init-templates.test.ts +74 -0
  176. package/src/init-templates.ts +349 -0
  177. package/src/lint/audit-catalog.ts +9 -1
  178. package/src/lint/post-synth/graf101.ts +2 -2
  179. package/src/lint/post-synth/graf104.ts +3 -3
  180. package/src/lint/post-synth/graf106.ts +3 -3
  181. package/src/lint/post-synth/graf110.ts +17 -0
  182. package/src/lint/post-synth/grafana-helpers.ts +13 -3
  183. package/src/lint/post-synth/index.ts +2 -0
  184. package/src/lint/post-synth/post-synth.test.ts +99 -2
  185. package/src/load-cost.test.ts +35 -0
  186. package/src/op/activities/grafana-apply.e2e.test.ts +14 -5
  187. package/src/op/activities/grafana-apply.test.ts +16 -2
  188. package/src/op/activities/grafana-apply.ts +29 -3
  189. package/src/op/activities/index.ts +1 -1
  190. package/src/ownership.ts +19 -0
  191. package/src/panels.test.ts +3 -1
  192. package/src/pin.ts +12 -0
  193. package/src/plugin.test.ts +9 -2
  194. package/src/plugin.ts +9 -0
  195. package/src/promql-check.ts +5 -1
  196. package/src/query-models.ts +94 -0
  197. package/src/query.test.ts +166 -0
  198. package/src/query.ts +177 -12
  199. package/src/schema/azuremonitor.gen.ts +381 -0
  200. package/src/schema/bigquery.gen.ts +110 -0
  201. package/src/schema/cloudwatch.gen.ts +423 -0
  202. package/src/schema/elasticsearch.gen.ts +508 -0
  203. package/src/schema/googlecloudmonitoring.gen.ts +330 -0
  204. package/src/schema/grafanapyroscope.gen.ts +66 -0
  205. package/src/schema/index.ts +6 -0
  206. package/src/schema/table.gen.ts +14 -0
  207. package/src/schema-validate.ts +58 -7
  208. package/src/skill-defs.ts +17 -0
  209. package/src/skills/chant-grafana-operations.md +108 -0
  210. package/src/skills/chant-grafana.md +5 -4
  211. package/src/spec/overlay/table.overlay.json +19 -0
  212. package/src/spec/schemas/azuremonitor.jsonschema.json +679 -0
  213. package/src/spec/schemas/bigquery.jsonschema.json +290 -0
  214. package/src/spec/schemas/cloudwatch.jsonschema.json +721 -0
  215. package/src/spec/schemas/elasticsearch.jsonschema.json +1695 -0
  216. package/src/spec/schemas/googlecloudmonitoring.jsonschema.json +488 -0
  217. package/src/spec/schemas/grafanapyroscope.jsonschema.json +93 -0
  218. package/src/spec/schemas.gen.ts +40 -0
  219. package/src/spec/schemas.ts +9 -7
  220. package/src/validate-alerting.ts +4 -2
  221. package/src/validate-output.ts +96 -4
  222. package/src/validate.ts +14 -0
  223. package/src/validation.ts +27 -0
  224. package/src/variables.ts +113 -6
@@ -0,0 +1,394 @@
1
+ export interface MetricStat {
2
+ /**
3
+ * AWS region to query for the metric
4
+ */
5
+ region: string;
6
+ /**
7
+ * A namespace is a container for CloudWatch metrics. Metrics in different namespaces are isolated from each other, so that metrics from different applications are not mistakenly aggregated into the same statistics. For example, Amazon EC2 uses the AWS/EC2 namespace.
8
+ */
9
+ namespace: string;
10
+ /**
11
+ * Name of the metric
12
+ */
13
+ metricName?: string;
14
+ /**
15
+ * The dimensions of the metric
16
+ */
17
+ dimensions?: Dimensions;
18
+ /**
19
+ * Only show metrics that exactly match all defined dimension names.
20
+ */
21
+ matchExact?: boolean;
22
+ /**
23
+ * The length of time associated with a specific Amazon CloudWatch statistic. Can be specified by a number of seconds, 'auto', or as a duration string e.g. '15m' being 15 minutes
24
+ */
25
+ period?: string;
26
+ /**
27
+ * The ID of the AWS account to query for the metric, specifying `all` will query all accounts that the monitoring account is permitted to query.
28
+ */
29
+ accountId?: string;
30
+ /**
31
+ * Metric data aggregations over specified periods of time. For detailed definitions of the statistics supported by CloudWatch, see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Statistics-definitions.html.
32
+ */
33
+ statistic?: string;
34
+ /**
35
+ * @deprecated use statistic
36
+ */
37
+ statistics?: string[];
38
+ }
39
+ /**
40
+ * A name/value pair that is part of the identity of a metric. For example, you can get statistics for a specific EC2 instance by specifying the InstanceId dimension when you search for metrics.
41
+ */
42
+ export type Dimensions = Record<string, string | string[]>;
43
+ /**
44
+ * Shape of a CloudWatch Metrics query
45
+ */
46
+ export interface MetricsQuery {
47
+ /**
48
+ * Whether a query is a Metrics, Logs, or Annotations query
49
+ */
50
+ queryMode: QueryMode;
51
+ /**
52
+ * Whether to use a metric search or metric insights query
53
+ */
54
+ metricQueryType?: MetricQueryType;
55
+ /**
56
+ * Whether to use the query builder or code editor to create the query
57
+ */
58
+ metricEditorMode?: MetricEditorMode;
59
+ /**
60
+ * ID can be used to reference other queries in math expressions. The ID can include numbers, letters, and underscore, and must start with a lowercase letter.
61
+ */
62
+ id: string;
63
+ /**
64
+ * Deprecated: use label
65
+ * @deprecated use label
66
+ */
67
+ alias?: string;
68
+ /**
69
+ * Change the time series legend names using dynamic labels. See https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/graph-dynamic-labels.html for more details.
70
+ */
71
+ label?: string;
72
+ /**
73
+ * Math expression query
74
+ */
75
+ expression?: string;
76
+ /**
77
+ * When the metric query type is set to `Insights`, this field is used to specify the query string.
78
+ */
79
+ sqlExpression?: string;
80
+ /**
81
+ * A unique identifier for the query within the list of targets.
82
+ * In server side expressions, the refId is used as a variable name to identify results.
83
+ * By default, the UI will assign A->Z; however setting meaningful names may be useful.
84
+ */
85
+ refId?: string | null;
86
+ /**
87
+ * If hide is set to true, Grafana will filter out the response(s) associated with this query before returning it to the panel.
88
+ */
89
+ hide?: boolean;
90
+ /**
91
+ * Specify the query flavor
92
+ * TODO make this required and give it a default
93
+ */
94
+ queryType?: string;
95
+ /**
96
+ * AWS region to query for the metric
97
+ */
98
+ region: string;
99
+ /**
100
+ * A namespace is a container for CloudWatch metrics. Metrics in different namespaces are isolated from each other, so that metrics from different applications are not mistakenly aggregated into the same statistics. For example, Amazon EC2 uses the AWS/EC2 namespace.
101
+ */
102
+ namespace: string;
103
+ /**
104
+ * Name of the metric
105
+ */
106
+ metricName?: string;
107
+ /**
108
+ * The dimensions of the metric
109
+ */
110
+ dimensions?: Dimensions;
111
+ /**
112
+ * Only show metrics that exactly match all defined dimension names.
113
+ */
114
+ matchExact?: boolean;
115
+ /**
116
+ * The length of time associated with a specific Amazon CloudWatch statistic. Can be specified by a number of seconds, 'auto', or as a duration string e.g. '15m' being 15 minutes
117
+ */
118
+ period?: string;
119
+ /**
120
+ * The ID of the AWS account to query for the metric, specifying `all` will query all accounts that the monitoring account is permitted to query.
121
+ */
122
+ accountId?: string;
123
+ /**
124
+ * Metric data aggregations over specified periods of time. For detailed definitions of the statistics supported by CloudWatch, see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Statistics-definitions.html.
125
+ */
126
+ statistic?: string;
127
+ /**
128
+ * When the metric query type is set to `Insights` and the `metricEditorMode` is set to `Builder`, this field is used to build up an object representation of a SQL query.
129
+ */
130
+ sql?: SQLExpression;
131
+ /**
132
+ * For mixed data sources the selected datasource is on the query level.
133
+ * For non mixed scenarios this is undefined.
134
+ * TODO find a better way to do this ^ that's friendly to schema
135
+ * TODO this shouldn't be unknown but DataSourceRef | null
136
+ */
137
+ datasource?: DataSourceRef;
138
+ /**
139
+ * @deprecated use statistic
140
+ */
141
+ statistics?: string[];
142
+ }
143
+ export type QueryMode = "Metrics" | "Logs" | "Annotations";
144
+ export type MetricQueryType = 0 | 1;
145
+ export type MetricEditorMode = 0 | 1;
146
+ export interface SQLExpression {
147
+ /**
148
+ * SELECT part of the SQL expression
149
+ */
150
+ select?: QueryEditorFunctionExpression;
151
+ /**
152
+ * FROM part of the SQL expression
153
+ */
154
+ from?: QueryEditorPropertyExpression | QueryEditorFunctionExpression;
155
+ /**
156
+ * WHERE part of the SQL expression
157
+ */
158
+ where?: QueryEditorArrayExpression;
159
+ /**
160
+ * GROUP BY part of the SQL expression
161
+ */
162
+ groupBy?: QueryEditorArrayExpression;
163
+ /**
164
+ * ORDER BY part of the SQL expression
165
+ */
166
+ orderBy?: QueryEditorFunctionExpression;
167
+ /**
168
+ * The sort order of the SQL expression, `ASC` or `DESC`
169
+ */
170
+ orderByDirection?: string;
171
+ /**
172
+ * LIMIT part of the SQL expression
173
+ */
174
+ limit?: number;
175
+ }
176
+ export interface QueryEditorFunctionExpression {
177
+ type: QueryEditorExpressionType;
178
+ name?: string;
179
+ parameters?: QueryEditorFunctionParameterExpression[];
180
+ }
181
+ export type QueryEditorExpressionType = "property" | "operator" | "or" | "and" | "groupBy" | "function" | "functionParameter";
182
+ export interface QueryEditorFunctionParameterExpression {
183
+ type: QueryEditorExpressionType;
184
+ name?: string;
185
+ }
186
+ export interface QueryEditorPropertyExpression {
187
+ type: QueryEditorExpressionType;
188
+ property: QueryEditorProperty;
189
+ }
190
+ export interface QueryEditorProperty {
191
+ type: QueryEditorPropertyType;
192
+ name?: string;
193
+ }
194
+ export type QueryEditorPropertyType = "string";
195
+ export interface QueryEditorArrayExpression {
196
+ type: "and" | "or";
197
+ expressions: QueryEditorExpression[];
198
+ }
199
+ export type QueryEditorExpression = QueryEditorArrayExpression | QueryEditorPropertyExpression | QueryEditorGroupByExpression | QueryEditorFunctionExpression | QueryEditorFunctionParameterExpression | QueryEditorOperatorExpression;
200
+ export interface QueryEditorGroupByExpression {
201
+ type: QueryEditorExpressionType;
202
+ property: QueryEditorProperty;
203
+ }
204
+ export interface QueryEditorOperatorExpression {
205
+ type: QueryEditorExpressionType;
206
+ property: QueryEditorProperty;
207
+ /**
208
+ * TS type is operator: QueryEditorOperator<QueryEditorOperatorValueType>, extended in veneer
209
+ */
210
+ operator: QueryEditorOperator;
211
+ }
212
+ /**
213
+ * TS type is QueryEditorOperator<T extends QueryEditorOperatorValueType>, extended in veneer
214
+ */
215
+ export interface QueryEditorOperator {
216
+ name?: string;
217
+ value?: QueryEditorOperatorType | QueryEditorOperatorType[];
218
+ }
219
+ export type QueryEditorOperatorType = string | boolean | number;
220
+ export type QueryEditorOperatorValueType = QueryEditorOperatorType | QueryEditorOperatorType[];
221
+ export type LogsQueryLanguage = "CWLI" | "SQL" | "PPL";
222
+ /**
223
+ * Shape of a CloudWatch Logs query
224
+ */
225
+ export interface LogsQuery {
226
+ /**
227
+ * Whether a query is a Metrics, Logs, or Annotations query
228
+ */
229
+ queryMode: QueryMode;
230
+ id: string;
231
+ /**
232
+ * AWS region to query for the logs
233
+ */
234
+ region: string;
235
+ /**
236
+ * The CloudWatch Logs Insights query to execute
237
+ */
238
+ expression?: string;
239
+ /**
240
+ * Fields to group the results by, this field is automatically populated whenever the query is updated
241
+ */
242
+ statsGroups?: string[];
243
+ /**
244
+ * Log groups to query
245
+ */
246
+ logGroups?: LogGroup[];
247
+ /**
248
+ * @deprecated use logGroups
249
+ */
250
+ logGroupNames?: string[];
251
+ /**
252
+ * A unique identifier for the query within the list of targets.
253
+ * In server side expressions, the refId is used as a variable name to identify results.
254
+ * By default, the UI will assign A->Z; however setting meaningful names may be useful.
255
+ */
256
+ refId?: string | null;
257
+ /**
258
+ * If hide is set to true, Grafana will filter out the response(s) associated with this query before returning it to the panel.
259
+ */
260
+ hide?: boolean;
261
+ /**
262
+ * Specify the query flavor
263
+ * TODO make this required and give it a default
264
+ */
265
+ queryType?: string;
266
+ /**
267
+ * Language used for querying logs, can be CWLI, SQL, or PPL. If empty, the default language is CWLI.
268
+ */
269
+ queryLanguage?: LogsQueryLanguage;
270
+ /**
271
+ * For mixed data sources the selected datasource is on the query level.
272
+ * For non mixed scenarios this is undefined.
273
+ * TODO find a better way to do this ^ that's friendly to schema
274
+ * TODO this shouldn't be unknown but DataSourceRef | null
275
+ */
276
+ datasource?: DataSourceRef;
277
+ }
278
+ export interface LogGroup {
279
+ /**
280
+ * ARN of the log group
281
+ */
282
+ arn: string;
283
+ /**
284
+ * Name of the log group
285
+ */
286
+ name: string;
287
+ /**
288
+ * AccountId of the log group
289
+ */
290
+ accountId?: string;
291
+ /**
292
+ * Label of the log group
293
+ */
294
+ accountLabel?: string;
295
+ }
296
+ /**
297
+ * Shape of a CloudWatch Annotation query
298
+ * TS type is CloudWatchDefaultQuery = Omit<CloudWatchLogsQuery, 'queryMode'> & CloudWatchMetricsQuery, declared in veneer
299
+ * #CloudWatchDefaultQuery: #CloudWatchLogsQuery & #CloudWatchMetricsQuery @cuetsy(kind="type")
300
+ */
301
+ export interface AnnotationQuery {
302
+ /**
303
+ * Whether a query is a Metrics, Logs, or Annotations query
304
+ */
305
+ queryMode: QueryMode;
306
+ /**
307
+ * Enable matching on the prefix of the action name or alarm name, specify the prefixes with actionPrefix and/or alarmNamePrefix
308
+ */
309
+ prefixMatching?: boolean;
310
+ /**
311
+ * Use this parameter to filter the results of the operation to only those alarms
312
+ * that use a certain alarm action. For example, you could specify the ARN of
313
+ * an SNS topic to find all alarms that send notifications to that topic.
314
+ * e.g. `arn:aws:sns:us-east-1:123456789012:my-app-` would match `arn:aws:sns:us-east-1:123456789012:my-app-action`
315
+ * but not match `arn:aws:sns:us-east-1:123456789012:your-app-action`
316
+ */
317
+ actionPrefix?: string;
318
+ /**
319
+ * A unique identifier for the query within the list of targets.
320
+ * In server side expressions, the refId is used as a variable name to identify results.
321
+ * By default, the UI will assign A->Z; however setting meaningful names may be useful.
322
+ */
323
+ refId?: string | null;
324
+ /**
325
+ * If hide is set to true, Grafana will filter out the response(s) associated with this query before returning it to the panel.
326
+ */
327
+ hide?: boolean;
328
+ /**
329
+ * Specify the query flavor
330
+ * TODO make this required and give it a default
331
+ */
332
+ queryType?: string;
333
+ /**
334
+ * AWS region to query for the metric
335
+ */
336
+ region: string;
337
+ /**
338
+ * A namespace is a container for CloudWatch metrics. Metrics in different namespaces are isolated from each other, so that metrics from different applications are not mistakenly aggregated into the same statistics. For example, Amazon EC2 uses the AWS/EC2 namespace.
339
+ */
340
+ namespace: string;
341
+ /**
342
+ * Name of the metric
343
+ */
344
+ metricName?: string;
345
+ /**
346
+ * The dimensions of the metric
347
+ */
348
+ dimensions?: Dimensions;
349
+ /**
350
+ * Only show metrics that exactly match all defined dimension names.
351
+ */
352
+ matchExact?: boolean;
353
+ /**
354
+ * The length of time associated with a specific Amazon CloudWatch statistic. Can be specified by a number of seconds, 'auto', or as a duration string e.g. '15m' being 15 minutes
355
+ */
356
+ period?: string;
357
+ /**
358
+ * The ID of the AWS account to query for the metric, specifying `all` will query all accounts that the monitoring account is permitted to query.
359
+ */
360
+ accountId?: string;
361
+ /**
362
+ * Metric data aggregations over specified periods of time. For detailed definitions of the statistics supported by CloudWatch, see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Statistics-definitions.html.
363
+ */
364
+ statistic?: string;
365
+ /**
366
+ * An alarm name prefix. If you specify this parameter, you receive information
367
+ * about all alarms that have names that start with this prefix.
368
+ * e.g. `my-team-service-` would match `my-team-service-high-cpu` but not match `your-team-service-high-cpu`
369
+ */
370
+ alarmNamePrefix?: string;
371
+ /**
372
+ * For mixed data sources the selected datasource is on the query level.
373
+ * For non mixed scenarios this is undefined.
374
+ * TODO find a better way to do this ^ that's friendly to schema
375
+ * TODO this shouldn't be unknown but DataSourceRef | null
376
+ */
377
+ datasource?: DataSourceRef;
378
+ /**
379
+ * @deprecated use statistic
380
+ */
381
+ statistics?: string[];
382
+ }
383
+ export type Request = MetricsQuery | LogsQuery | AnnotationQuery;
384
+ export interface DataSourceRef {
385
+ /**
386
+ * The plugin type-id
387
+ */
388
+ type?: string;
389
+ /**
390
+ * Specific datasource instance
391
+ */
392
+ uid?: string;
393
+ }
394
+ //# sourceMappingURL=cloudwatch.gen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cloudwatch.gen.d.ts","sourceRoot":"","sources":["../../src/schema/cloudwatch.gen.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,CAAC;AAE3D;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,SAAS,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC;;OAEG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH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