Resource: SavedQuery
Describes a query that has been saved by a user.
JSON representation |
---|
{ "name": string, "displayName": string, "description": string, "createTime": string, "updateTime": string, "visibility": enum ( |
Fields | |
---|---|
name |
Output only. Resource name of the saved query. In the format:
For a list of supported locations, see Supported Regions After the saved query is created, the location cannot be changed. If the user doesn't provide a [QUERY_ID], the system will generate an alphanumeric ID. |
displayName |
Required. The user specified title for the SavedQuery. |
description |
Optional. A human readable description of the saved query. |
createTime |
Output only. The timestamp when the saved query was created. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
updateTime |
Output only. The timestamp when the saved query was last updated. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
visibility |
Required. The visibility status of this query, which determines its ownership. |
Union field query_oneof . The query that is saved. query_oneof can be only one of the following: |
|
loggingQuery |
Logging query that can be executed in Logs Explorer or via Logging API. |
opsAnalyticsQuery |
Analytics query that can be executed in Log Analytics. |
LoggingQuery
Describes a Cloud Logging query that can be run in Logs Explorer UI or via the logging API.
In addition to the query itself, additional information may be stored to capture the display configuration and other UI state used in association with analysis of query results.
JSON representation |
---|
{ "filter": string, "summaryFields": [ { object ( |
Fields | |
---|---|
filter |
Required. An advanced query using the Logging Query Language. The maximum length of the filter is 20000 characters. |
summaryFields[] |
Optional. The set of summary fields to display for this saved query. |
Union field summary_field_width . The user's setting for number of characters to display for each summary field. In the Logs Explorer page of Google Cloud console, negative values are ignored and the default (0) means there is no truncation. summary_field_width can be only one of the following: |
|
summaryFieldStart |
Characters will be counted from the start of the string. |
summaryFieldEnd |
Characters will be counted from the end of the string. |
SummaryField
A field from the LogEntry that is added to the summary line for a query in the Logs Explorer.
JSON representation |
---|
{ "field": string } |
Fields | |
---|---|
field |
Optional. The field from the LogEntry to include in the summary line, for example |
OpsAnalyticsQuery
Describes an analytics query that can be run in the Log Analytics page of Google Cloud console.
Preview: This is a preview feature and may be subject to change before final release.
JSON representation |
---|
{ "sqlQueryText": string } |
Fields | |
---|---|
sqlQueryText |
Required. A logs analytics SQL query, which generally follows BigQuery format. This is the SQL query that appears in the Log Analytics UI's query editor. |
Visibility
Saved query visibility.
Enums | |
---|---|
VISIBILITY_UNSPECIFIED |
The saved query visibility is unspecified. A savedQueries.create request with an unspecified visibility will be rejected. |
PRIVATE |
The saved query is only visible to the user that created it. |
SHARED |
The saved query is visible to anyone in the project. |
Methods |
|
---|---|
|
Creates a new SavedQuery for the user making the request. |
|
Deletes an existing SavedQuery that was created by the user making the request. |
|
Lists the SavedQueries that were created by the user making the request. |