Skip to content

Commit

Permalink
feat(monitoring): update the api
Browse files Browse the repository at this point in the history
#### monitoring:v1

The following keys were added:
- resources.projects.resources.location.resources.prometheus.resources.api.resources.v1.methods.query_exemplars (Total Keys: 15)
- schemas.QueryExemplarsRequest (Total Keys: 5)
  • Loading branch information
yoshi-automation committed Feb 1, 2023
1 parent b547436 commit 43e09ec
Show file tree
Hide file tree
Showing 4 changed files with 103 additions and 9 deletions.
38 changes: 38 additions & 0 deletions docs/dyn/monitoring_v1.projects.location.prometheus.api.v1.html
Expand Up @@ -95,6 +95,9 @@ <h2>Instance Methods</h2>
<p class="toc_element">
<code><a href="#query">query(name, location, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Evaluate a PromQL query at a single point in time.</p>
<p class="toc_element">
<code><a href="#query_exemplars">query_exemplars(name, location, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Lists exemplars relevant to a given PromQL query,</p>
<p class="toc_element">
<code><a href="#query_range">query_range(name, location, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Evaluate a PromQL query with start, end time range.</p>
Expand Down Expand Up @@ -142,6 +145,41 @@ <h3>Method Details</h3>
}</pre>
</div>

<div class="method">
<code class="details" id="query_exemplars">query_exemplars(name, location, body=None, x__xgafv=None)</code>
<pre>Lists exemplars relevant to a given PromQL query,

Args:
name: string, The project on which to execute the request. Data associcated with the project&#x27;s workspace stored under the The format is: projects/PROJECT_ID_OR_NUMBER. Open source API but used as a request path prefix to distinguish different virtual Prometheus instances of Google Prometheus Engine. (required)
location: string, Location of the resource information. Has to be &quot;global&quot; now. (required)
body: object, The request body.
The object takes the form of:

{ # QueryExemplarsRequest holds all parameters of the Prometheus upstream API for querying exemplars.
&quot;end&quot;: &quot;A String&quot;, # The end time to evaluate the query for. Either floating point UNIX seconds or RFC3339 formatted timestamp.
&quot;query&quot;: &quot;A String&quot;, # A PromQL query string. Query lanauge documentation: https://prometheus.io/docs/prometheus/latest/querying/basics/.
&quot;start&quot;: &quot;A String&quot;, # The start time to evaluate the query for. Either floating point UNIX seconds or RFC3339 formatted timestamp.
}

x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format

Returns:
An object of the form:

{ # Message that represents an arbitrary HTTP body. It should only be used for payload formats that can&#x27;t be represented as JSON, such as raw binary or an HTML page.This message can be used both in streaming and non-streaming API methods in the request as well as the response.It can be used as a top-level request field, which is convenient if one wants to extract parameters from either the URL or HTTP template into the request fields and also want access to the raw HTTP body.Example: message GetResourceRequest { // A unique request id. string request_id = 1; // The raw HTTP body is bound to this field. google.api.HttpBody http_body = 2; } service ResourceService { rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); } Example with streaming methods: service CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); } Use of this type only changes how the request and response bodies are handled, all other features will continue to work unchanged.
&quot;contentType&quot;: &quot;A String&quot;, # The HTTP Content-Type header value specifying the content type of the body.
&quot;data&quot;: &quot;A String&quot;, # The HTTP request/response body as raw binary.
&quot;extensions&quot;: [ # Application specific response metadata. Must be set in the first response for streaming APIs.
{
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
},
],
}</pre>
</div>

<div class="method">
<code class="details" id="query_range">query_range(name, location, body=None, x__xgafv=None)</code>
<pre>Evaluate a PromQL query with start, end time range.
Expand Down
12 changes: 6 additions & 6 deletions docs/dyn/monitoring_v3.projects.snoozes.html
Expand Up @@ -109,7 +109,7 @@ <h3>Method Details</h3>

{ # A Snooze will prevent any alerts from being opened, and close any that are already open. The Snooze will work on alerts that match the criteria defined in the Snooze. The Snooze will be active from interval.start_time through interval.end_time.
&quot;criteria&quot;: { # Criteria specific to the AlertPolicys that this Snooze applies to. The Snooze will suppress alerts that come from one of the AlertPolicys whose names are supplied. # Required. This defines the criteria for applying the Snooze. See Criteria for more information.
&quot;policies&quot;: [ # The specific AlertPolicy names for the alert that should be snoozed. The format is: projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID] There is a limit of 100 policies per snooze. This limit is checked during snooze creation.
&quot;policies&quot;: [ # The specific AlertPolicy names for the alert that should be snoozed. The format is: projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID] There is a limit of 16 policies per snooze. This limit is checked during snooze creation.
&quot;A String&quot;,
],
},
Expand All @@ -131,7 +131,7 @@ <h3>Method Details</h3>

{ # A Snooze will prevent any alerts from being opened, and close any that are already open. The Snooze will work on alerts that match the criteria defined in the Snooze. The Snooze will be active from interval.start_time through interval.end_time.
&quot;criteria&quot;: { # Criteria specific to the AlertPolicys that this Snooze applies to. The Snooze will suppress alerts that come from one of the AlertPolicys whose names are supplied. # Required. This defines the criteria for applying the Snooze. See Criteria for more information.
&quot;policies&quot;: [ # The specific AlertPolicy names for the alert that should be snoozed. The format is: projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID] There is a limit of 100 policies per snooze. This limit is checked during snooze creation.
&quot;policies&quot;: [ # The specific AlertPolicy names for the alert that should be snoozed. The format is: projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID] There is a limit of 16 policies per snooze. This limit is checked during snooze creation.
&quot;A String&quot;,
],
},
Expand Down Expand Up @@ -160,7 +160,7 @@ <h3>Method Details</h3>

{ # A Snooze will prevent any alerts from being opened, and close any that are already open. The Snooze will work on alerts that match the criteria defined in the Snooze. The Snooze will be active from interval.start_time through interval.end_time.
&quot;criteria&quot;: { # Criteria specific to the AlertPolicys that this Snooze applies to. The Snooze will suppress alerts that come from one of the AlertPolicys whose names are supplied. # Required. This defines the criteria for applying the Snooze. See Criteria for more information.
&quot;policies&quot;: [ # The specific AlertPolicy names for the alert that should be snoozed. The format is: projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID] There is a limit of 100 policies per snooze. This limit is checked during snooze creation.
&quot;policies&quot;: [ # The specific AlertPolicy names for the alert that should be snoozed. The format is: projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID] There is a limit of 16 policies per snooze. This limit is checked during snooze creation.
&quot;A String&quot;,
],
},
Expand Down Expand Up @@ -195,7 +195,7 @@ <h3>Method Details</h3>
&quot;snoozes&quot;: [ # Snoozes matching this list call.
{ # A Snooze will prevent any alerts from being opened, and close any that are already open. The Snooze will work on alerts that match the criteria defined in the Snooze. The Snooze will be active from interval.start_time through interval.end_time.
&quot;criteria&quot;: { # Criteria specific to the AlertPolicys that this Snooze applies to. The Snooze will suppress alerts that come from one of the AlertPolicys whose names are supplied. # Required. This defines the criteria for applying the Snooze. See Criteria for more information.
&quot;policies&quot;: [ # The specific AlertPolicy names for the alert that should be snoozed. The format is: projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID] There is a limit of 100 policies per snooze. This limit is checked during snooze creation.
&quot;policies&quot;: [ # The specific AlertPolicy names for the alert that should be snoozed. The format is: projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID] There is a limit of 16 policies per snooze. This limit is checked during snooze creation.
&quot;A String&quot;,
],
},
Expand Down Expand Up @@ -235,7 +235,7 @@ <h3>Method Details</h3>

{ # A Snooze will prevent any alerts from being opened, and close any that are already open. The Snooze will work on alerts that match the criteria defined in the Snooze. The Snooze will be active from interval.start_time through interval.end_time.
&quot;criteria&quot;: { # Criteria specific to the AlertPolicys that this Snooze applies to. The Snooze will suppress alerts that come from one of the AlertPolicys whose names are supplied. # Required. This defines the criteria for applying the Snooze. See Criteria for more information.
&quot;policies&quot;: [ # The specific AlertPolicy names for the alert that should be snoozed. The format is: projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID] There is a limit of 100 policies per snooze. This limit is checked during snooze creation.
&quot;policies&quot;: [ # The specific AlertPolicy names for the alert that should be snoozed. The format is: projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID] There is a limit of 16 policies per snooze. This limit is checked during snooze creation.
&quot;A String&quot;,
],
},
Expand All @@ -258,7 +258,7 @@ <h3>Method Details</h3>

{ # A Snooze will prevent any alerts from being opened, and close any that are already open. The Snooze will work on alerts that match the criteria defined in the Snooze. The Snooze will be active from interval.start_time through interval.end_time.
&quot;criteria&quot;: { # Criteria specific to the AlertPolicys that this Snooze applies to. The Snooze will suppress alerts that come from one of the AlertPolicys whose names are supplied. # Required. This defines the criteria for applying the Snooze. See Criteria for more information.
&quot;policies&quot;: [ # The specific AlertPolicy names for the alert that should be snoozed. The format is: projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID] There is a limit of 100 policies per snooze. This limit is checked during snooze creation.
&quot;policies&quot;: [ # The specific AlertPolicy names for the alert that should be snoozed. The format is: projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID] There is a limit of 16 policies per snooze. This limit is checked during snooze creation.
&quot;A String&quot;,
],
},
Expand Down
58 changes: 57 additions & 1 deletion googleapiclient/discovery_cache/documents/monitoring.v1.json
Expand Up @@ -520,6 +520,43 @@
"https://www.googleapis.com/auth/monitoring.read"
]
},
"query_exemplars": {
"description": "Lists exemplars relevant to a given PromQL query,",
"flatPath": "v1/projects/{projectsId}/location/{location}/prometheus/api/v1/query_exemplars",
"httpMethod": "POST",
"id": "monitoring.projects.location.prometheus.api.v1.query_exemplars",
"parameterOrder": [
"name",
"location"
],
"parameters": {
"location": {
"description": "Location of the resource information. Has to be \"global\" now.",
"location": "path",
"required": true,
"type": "string"
},
"name": {
"description": "The project on which to execute the request. Data associcated with the project's workspace stored under the The format is: projects/PROJECT_ID_OR_NUMBER. Open source API but used as a request path prefix to distinguish different virtual Prometheus instances of Google Prometheus Engine.",
"location": "path",
"pattern": "^projects/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+name}/location/{location}/prometheus/api/v1/query_exemplars",
"request": {
"$ref": "QueryExemplarsRequest"
},
"response": {
"$ref": "HttpBody"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/monitoring",
"https://www.googleapis.com/auth/monitoring.read"
]
},
"query_range": {
"description": "Evaluate a PromQL query with start, end time range.",
"flatPath": "v1/projects/{projectsId}/location/{location}/prometheus/api/v1/query_range",
Expand Down Expand Up @@ -769,7 +806,7 @@
}
}
},
"revision": "20230123",
"revision": "20230130",
"rootUrl": "https://monitoring.googleapis.com/",
"schemas": {
"Aggregation": {
Expand Down Expand Up @@ -1591,6 +1628,25 @@
},
"type": "object"
},
"QueryExemplarsRequest": {
"description": "QueryExemplarsRequest holds all parameters of the Prometheus upstream API for querying exemplars.",
"id": "QueryExemplarsRequest",
"properties": {
"end": {
"description": "The end time to evaluate the query for. Either floating point UNIX seconds or RFC3339 formatted timestamp.",
"type": "string"
},
"query": {
"description": "A PromQL query string. Query lanauge documentation: https://prometheus.io/docs/prometheus/latest/querying/basics/.",
"type": "string"
},
"start": {
"description": "The start time to evaluate the query for. Either floating point UNIX seconds or RFC3339 formatted timestamp.",
"type": "string"
}
},
"type": "object"
},
"QueryInstantRequest": {
"description": "QueryInstantRequest holds all parameters of the Prometheus upstream instant query API plus GCM specific parameters.",
"id": "QueryInstantRequest",
Expand Down
4 changes: 2 additions & 2 deletions googleapiclient/discovery_cache/documents/monitoring.v3.json
Expand Up @@ -2714,7 +2714,7 @@
}
}
},
"revision": "20230123",
"revision": "20230130",
"rootUrl": "https://monitoring.googleapis.com/",
"schemas": {
"Aggregation": {
Expand Down Expand Up @@ -3334,7 +3334,7 @@
"id": "Criteria",
"properties": {
"policies": {
"description": "The specific AlertPolicy names for the alert that should be snoozed. The format is: projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID] There is a limit of 100 policies per snooze. This limit is checked during snooze creation.",
"description": "The specific AlertPolicy names for the alert that should be snoozed. The format is: projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID] There is a limit of 16 policies per snooze. This limit is checked during snooze creation.",
"items": {
"type": "string"
},
Expand Down

0 comments on commit 43e09ec

Please sign in to comment.