Skip to content

Commit d6ab1de

Browse files
yoshi-automationsofisl
authored andcommittedAug 15, 2023
feat(monitoring): update the API
#### monitoring:v1 The following keys were added: - schemas.Scorecard.properties.blankView.$ref - schemas.Scorecard.properties.blankView.description - schemas.TimeSeriesQuery.properties.outputFullDuration.description - schemas.TimeSeriesQuery.properties.outputFullDuration.type The following keys were changed: - schemas.Operation.properties.response.description #### monitoring:v3 The following keys were changed: - schemas.AlertPolicy.properties.userLabels.description - schemas.PrometheusQueryLanguageCondition.properties.alertRule.description - schemas.PrometheusQueryLanguageCondition.properties.duration.description - schemas.PrometheusQueryLanguageCondition.properties.evaluationInterval.description - schemas.PrometheusQueryLanguageCondition.properties.ruleGroup.description
1 parent 43d3a7e commit d6ab1de

File tree

3 files changed

+21
-13
lines changed

3 files changed

+21
-13
lines changed
 

‎discovery/monitoring-v1.json

+10-2
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,7 @@
753753
}
754754
}
755755
},
756-
"revision": "20230731",
756+
"revision": "20230806",
757757
"rootUrl": "https://monitoring.googleapis.com/",
758758
"schemas": {
759759
"Aggregation": {
@@ -1489,7 +1489,7 @@
14891489
"description": "Properties of the object. Contains field @type with type URL.",
14901490
"type": "any"
14911491
},
1492-
"description": "The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse.",
1492+
"description": "The normal, successful response of the operation. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse.",
14931493
"type": "object"
14941494
}
14951495
},
@@ -1746,6 +1746,10 @@
17461746
"description": "A widget showing the latest value of a metric, and how this value relates to one or more thresholds.",
17471747
"id": "Scorecard",
17481748
"properties": {
1749+
"blankView": {
1750+
"$ref": "Empty",
1751+
"description": "Will cause the Scorecard to show only the value, with no indicator to its value relative to its thresholds."
1752+
},
17491753
"gaugeView": {
17501754
"$ref": "GaugeView",
17511755
"description": "Will cause the scorecard to show a gauge chart."
@@ -2171,6 +2175,10 @@
21712175
"description": "TimeSeriesQuery collects the set of supported methods for querying time series data from the Stackdriver metrics API.",
21722176
"id": "TimeSeriesQuery",
21732177
"properties": {
2178+
"outputFullDuration": {
2179+
"description": "Optional. If set, Cloud Monitoring will treat the full query duration as the alignment period so that there will be only 1 output value.*Note: This could override the configured alignment period except for the cases where a series of data points are expected, like - XyChart - Scorecard's spark chart",
2180+
"type": "boolean"
2181+
},
21742182
"prometheusQuery": {
21752183
"description": "A query used to fetch time series with PromQL.",
21762184
"type": "string"

‎discovery/monitoring-v3.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -2714,7 +2714,7 @@
27142714
}
27152715
}
27162716
},
2717-
"revision": "20230731",
2717+
"revision": "20230806",
27182718
"rootUrl": "https://monitoring.googleapis.com/",
27192719
"schemas": {
27202720
"Aggregation": {
@@ -2884,7 +2884,7 @@
28842884
"additionalProperties": {
28852885
"type": "string"
28862886
},
2887-
"description": "User-supplied key/value data to be used for organizing and identifying the AlertPolicy objects.The field can contain up to 64 entries. Each key and value is limited to 63 Unicode characters or 128 bytes, whichever is smaller. Labels and values can contain only lowercase letters, numerals, underscores, and dashes. Keys must begin with a letter.Note that Prometheus {rule group name} and {alert name} are valid Prometheus label names (https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels). This means that they cannot be stored as-is in user labels, because Prometheus labels may contain upper-case letters.",
2887+
"description": "User-supplied key/value data to be used for organizing and identifying the AlertPolicy objects.The field can contain up to 64 entries. Each key and value is limited to 63 Unicode characters or 128 bytes, whichever is smaller. Labels and values can contain only lowercase letters, numerals, underscores, and dashes. Keys must begin with a letter.Note that Prometheus {alert name} is a valid Prometheus label names (https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels), whereas Prometheus {rule group} is an unrestricted UTF-8 string. This means that they cannot be stored as-is in user labels, because they may contain characters that are not allowed in user-label values.",
28882888
"type": "object"
28892889
},
28902890
"validity": {
@@ -5121,16 +5121,16 @@
51215121
"id": "PrometheusQueryLanguageCondition",
51225122
"properties": {
51235123
"alertRule": {
5124-
"description": "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 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 group changes in the future.This field is optional. If this field is not empty, then it must be a valid Prometheus label name (https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels).",
5124+
"description": "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 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 group changes in the future.This field is optional. If this field is not empty, then it must be a valid Prometheus label name (https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels). This field may not exceed 2048 Unicode characters in length.",
51255125
"type": "string"
51265126
},
51275127
"duration": {
5128-
"description": "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 enough are considered pending. The default value is zero. Must be zero or positive.",
5128+
"description": "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 enough are considered pending. Must be a non-negative duration or missing. This field is optional. Its default value is zero.",
51295129
"format": "google-duration",
51305130
"type": "string"
51315131
},
51325132
"evaluationInterval": {
5133-
"description": "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 was generated from a Prometheus alerting rule, then this value should be taken from the enclosing rule group.",
5133+
"description": "Optional. How often this rule should be evaluated. Must be a positive multiple of 30 seconds or missing. This field is optional. Its default value is 30 seconds. If this PrometheusQueryLanguageCondition was generated from a Prometheus alerting rule, then this value should be taken from the enclosing rule group.",
51345134
"format": "google-duration",
51355135
"type": "string"
51365136
},
@@ -5146,7 +5146,7 @@
51465146
"type": "string"
51475147
},
51485148
"ruleGroup": {
5149-
"description": "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 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 changes in the future.This field is optional. If this field is not empty, then it must be a valid Prometheus label name (https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels).",
5149+
"description": "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 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 changes in the future.This field is optional. If this field is not empty, then it must contain a valid UTF-8 string. This field may not exceed 2048 Unicode characters in length.",
51505150
"type": "string"
51515151
}
51525152
},

‎src/apis/monitoring/v3.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ export namespace monitoring_v3 {
198198
*/
199199
notificationChannels?: string[] | null;
200200
/**
201-
* User-supplied key/value data to be used for organizing and identifying the AlertPolicy objects.The field can contain up to 64 entries. Each key and value is limited to 63 Unicode characters or 128 bytes, whichever is smaller. Labels and values can contain only lowercase letters, numerals, underscores, and dashes. Keys must begin with a letter.Note that Prometheus {rule group name\} and {alert name\} are valid Prometheus label names (https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels). This means that they cannot be stored as-is in user labels, because Prometheus labels may contain upper-case letters.
201+
* User-supplied key/value data to be used for organizing and identifying the AlertPolicy objects.The field can contain up to 64 entries. Each key and value is limited to 63 Unicode characters or 128 bytes, whichever is smaller. Labels and values can contain only lowercase letters, numerals, underscores, and dashes. Keys must begin with a letter.Note that Prometheus {alert name\} is a valid Prometheus label names (https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels), whereas Prometheus {rule group\} is an unrestricted UTF-8 string. This means that they cannot be stored as-is in user labels, because they may contain characters that are not allowed in user-label values.
202202
*/
203203
userLabels?: {[key: string]: string} | null;
204204
/**
@@ -1717,15 +1717,15 @@ export namespace monitoring_v3 {
17171717
*/
17181718
export interface Schema$PrometheusQueryLanguageCondition {
17191719
/**
1720-
* 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 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 group changes in the future.This field is optional. If this field is not empty, then it must be a valid Prometheus label name (https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels).
1720+
* 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 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 group changes in the future.This field is optional. If this field is not empty, then it must be a valid Prometheus label name (https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels). This field may not exceed 2048 Unicode characters in length.
17211721
*/
17221722
alertRule?: string | null;
17231723
/**
1724-
* 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 enough are considered pending. The default value is zero. Must be zero or positive.
1724+
* 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 enough are considered pending. Must be a non-negative duration or missing. This field is optional. Its default value is zero.
17251725
*/
17261726
duration?: string | null;
17271727
/**
1728-
* 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 was generated from a Prometheus alerting rule, then this value should be taken from the enclosing rule group.
1728+
* Optional. How often this rule should be evaluated. Must be a positive multiple of 30 seconds or missing. This field is optional. Its default value is 30 seconds. If this PrometheusQueryLanguageCondition was generated from a Prometheus alerting rule, then this value should be taken from the enclosing rule group.
17291729
*/
17301730
evaluationInterval?: string | null;
17311731
/**
@@ -1737,7 +1737,7 @@ export namespace monitoring_v3 {
17371737
*/
17381738
query?: string | null;
17391739
/**
1740-
* 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 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 changes in the future.This field is optional. If this field is not empty, then it must be a valid Prometheus label name (https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels).
1740+
* 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 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 changes in the future.This field is optional. If this field is not empty, then it must contain a valid UTF-8 string. This field may not exceed 2048 Unicode characters in length.
17411741
*/
17421742
ruleGroup?: string | null;
17431743
}

0 commit comments

Comments
 (0)
Please sign in to comment.