@maxim_mazurok/gapi.client.monitoring-v3 0.0.20230626 → 0.0.20230708
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.
- package/index.d.ts +56 -1
- package/package.json +1 -1
- package/tests.ts +23 -1
package/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
// This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
|
|
10
10
|
// In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
|
|
11
11
|
// Generated from: https://monitoring.googleapis.com/$discovery/rest?version=v3
|
|
12
|
-
// Revision:
|
|
12
|
+
// Revision: 20230708
|
|
13
13
|
|
|
14
14
|
/// <reference types="gapi.client" />
|
|
15
15
|
|
|
@@ -306,6 +306,9 @@ declare namespace gapi.client {
|
|
|
306
306
|
/** A condition that uses the Monitoring Query Language to define alerts. */
|
|
307
307
|
conditionMonitoringQueryLanguage?:
|
|
308
308
|
MonitoringQueryLanguageCondition;
|
|
309
|
+
/** A condition that uses the Prometheus query language to define alerts. */
|
|
310
|
+
conditionPrometheusQueryLanguage?:
|
|
311
|
+
PrometheusQueryLanguageCondition;
|
|
309
312
|
/** A condition that compares a time series against a threshold. */
|
|
310
313
|
conditionThreshold?:
|
|
311
314
|
MetricThreshold;
|
|
@@ -448,6 +451,15 @@ declare namespace gapi.client {
|
|
|
448
451
|
/** The format of the content field. Presently, only the value "text/markdown" is supported. See Markdown (https://en.wikipedia.org/wiki/Markdown) for more information. */
|
|
449
452
|
mimeType?:
|
|
450
453
|
string;
|
|
454
|
+
/**
|
|
455
|
+
* Optional. The subject line of the notification. The subject line may not exceed 10,240 bytes. In notifications generated by this policy, the contents of the subject line after
|
|
456
|
+
* variable expansion will be truncated to 255 bytes or shorter at the latest UTF-8 character boundary. The 255-byte limit is recommended by this thread
|
|
457
|
+
* (https://stackoverflow.com/questions/1592291/what-is-the-email-subject-length-limit). It is both the limit imposed by some third-party ticketing products and it is common to define
|
|
458
|
+
* textual fields in databases as VARCHAR(255).The contents of the subject line can be templatized by using variables (https://cloud.google.com/monitoring/alerts/doc-variables). If
|
|
459
|
+
* this field is missing or empty, a default subject line will be generated.
|
|
460
|
+
*/
|
|
461
|
+
subject?:
|
|
462
|
+
string;
|
|
451
463
|
}
|
|
452
464
|
interface DroppedLabels {
|
|
453
465
|
/** Map from label to its value, for all labels dropped in any aggregation. */
|
|
@@ -1438,6 +1450,49 @@ declare namespace gapi.client {
|
|
|
1438
1450
|
values?:
|
|
1439
1451
|
TypedValue[];
|
|
1440
1452
|
}
|
|
1453
|
+
interface PrometheusQueryLanguageCondition {
|
|
1454
|
+
/**
|
|
1455
|
+
* Optional. The alerting rule name of this alert in the corresponding Prometheus configuration file.Some external tools may require this field to be populated correctly in order to
|
|
1456
|
+
* refer to the original Prometheus configuration file. The rule group name and the alert name are necessary to update the relevant AlertPolicies in case the definition of the rule
|
|
1457
|
+
* group changes in the future.This field is optional. If this field is not empty, then it must be a valid Prometheus label name
|
|
1458
|
+
* (https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels).
|
|
1459
|
+
*/
|
|
1460
|
+
alertRule?:
|
|
1461
|
+
string;
|
|
1462
|
+
/**
|
|
1463
|
+
* Optional. Alerts are considered firing once their PromQL expression was evaluated to be "true" for this long. Alerts whose PromQL expression was not evaluated to be "true" for long
|
|
1464
|
+
* enough are considered pending. The default value is zero. Must be zero or positive.
|
|
1465
|
+
*/
|
|
1466
|
+
duration?:
|
|
1467
|
+
string;
|
|
1468
|
+
/**
|
|
1469
|
+
* Required. How often this rule should be evaluated. Must be a positive multiple of 30 seconds or missing. The default value is 30 seconds. If this PrometheusQueryLanguageCondition
|
|
1470
|
+
* was generated from a Prometheus alerting rule, then this value should be taken from the enclosing rule group.
|
|
1471
|
+
*/
|
|
1472
|
+
evaluationInterval?:
|
|
1473
|
+
string;
|
|
1474
|
+
/**
|
|
1475
|
+
* Optional. Labels to add to or overwrite in the PromQL query result. Label names must be valid (https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels). Label values
|
|
1476
|
+
* can be templatized by using variables (https://cloud.google.com/monitoring/alerts/doc-variables). The only available variable names are the names of the labels in the PromQL result,
|
|
1477
|
+
* including "__name__" and "value". "labels" may be empty.
|
|
1478
|
+
*/
|
|
1479
|
+
labels?:
|
|
1480
|
+
{ [P in string]: string };
|
|
1481
|
+
/**
|
|
1482
|
+
* Required. The PromQL expression to evaluate. Every evaluation cycle this expression is evaluated at the current time, and all resultant time series become pending/firing alerts.
|
|
1483
|
+
* This field must not be empty.
|
|
1484
|
+
*/
|
|
1485
|
+
query?:
|
|
1486
|
+
string;
|
|
1487
|
+
/**
|
|
1488
|
+
* Optional. The rule group name of this alert in the corresponding Prometheus configuration file.Some external tools may require this field to be populated correctly in order to refer
|
|
1489
|
+
* to the original Prometheus configuration file. The rule group name and the alert name are necessary to update the relevant AlertPolicies in case the definition of the rule group
|
|
1490
|
+
* changes in the future.This field is optional. If this field is not empty, then it must be a valid Prometheus label name
|
|
1491
|
+
* (https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels).
|
|
1492
|
+
*/
|
|
1493
|
+
ruleGroup?:
|
|
1494
|
+
string;
|
|
1495
|
+
}
|
|
1441
1496
|
interface QueryTimeSeriesRequest {
|
|
1442
1497
|
/** A positive number that is the maximum number of time_series_data to return. */
|
|
1443
1498
|
pageSize?:
|
package/package.json
CHANGED
package/tests.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
|
|
4
4
|
// In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
|
|
5
5
|
|
|
6
|
-
// Revision:
|
|
6
|
+
// Revision: 20230708
|
|
7
7
|
|
|
8
8
|
gapi.load('client', async () => {
|
|
9
9
|
/** now we can use gapi.client */
|
|
@@ -130,6 +130,16 @@ gapi.load('client', async () => {
|
|
|
130
130
|
percent: 42,
|
|
131
131
|
},
|
|
132
132
|
},
|
|
133
|
+
conditionPrometheusQueryLanguage: {
|
|
134
|
+
alertRule: "Test string",
|
|
135
|
+
duration: "Test string",
|
|
136
|
+
evaluationInterval: "Test string",
|
|
137
|
+
labels: {
|
|
138
|
+
A: "Test string"
|
|
139
|
+
},
|
|
140
|
+
query: "Test string",
|
|
141
|
+
ruleGroup: "Test string",
|
|
142
|
+
},
|
|
133
143
|
conditionThreshold: {
|
|
134
144
|
aggregations: [
|
|
135
145
|
{
|
|
@@ -177,6 +187,7 @@ gapi.load('client', async () => {
|
|
|
177
187
|
documentation: {
|
|
178
188
|
content: "Test string",
|
|
179
189
|
mimeType: "Test string",
|
|
190
|
+
subject: "Test string",
|
|
180
191
|
},
|
|
181
192
|
enabled: true,
|
|
182
193
|
mutationRecord: {
|
|
@@ -278,6 +289,16 @@ gapi.load('client', async () => {
|
|
|
278
289
|
percent: 42,
|
|
279
290
|
},
|
|
280
291
|
},
|
|
292
|
+
conditionPrometheusQueryLanguage: {
|
|
293
|
+
alertRule: "Test string",
|
|
294
|
+
duration: "Test string",
|
|
295
|
+
evaluationInterval: "Test string",
|
|
296
|
+
labels: {
|
|
297
|
+
A: "Test string"
|
|
298
|
+
},
|
|
299
|
+
query: "Test string",
|
|
300
|
+
ruleGroup: "Test string",
|
|
301
|
+
},
|
|
281
302
|
conditionThreshold: {
|
|
282
303
|
aggregations: [
|
|
283
304
|
{
|
|
@@ -325,6 +346,7 @@ gapi.load('client', async () => {
|
|
|
325
346
|
documentation: {
|
|
326
347
|
content: "Test string",
|
|
327
348
|
mimeType: "Test string",
|
|
349
|
+
subject: "Test string",
|
|
328
350
|
},
|
|
329
351
|
enabled: true,
|
|
330
352
|
mutationRecord: {
|