File: //snap/google-cloud-cli/396/help/man/man1/gcloud_beta_asset_saved-queries_update.1
.TH "GCLOUD_BETA_ASSET_SAVED\-QUERIES_UPDATE" 1
.SH "NAME"
.HP
gcloud beta asset saved\-queries update \- update an existing Cloud Asset Inventory saved query
.SH "SYNOPSIS"
.HP
\f5gcloud beta asset saved\-queries update\fR \fIQUERY_ID\fR (\fB\-\-folder\fR=\fIFOLDER_ID\fR\ |\ \fB\-\-organization\fR=\fIORGANIZATION_ID\fR\ |\ \fB\-\-project\fR=\fIPROJECT_ID\fR) [\fB\-\-description\fR=\fIDESCRIPTION\fR] [\fB\-\-query\-file\-path\fR=\fIQUERY_FILE_PATH\fR] [\fB\-\-update\-labels\fR=[\fIKEY\fR=\fIVALUE\fR,...]] [\fB\-\-clear\-labels\fR\ |\ \fB\-\-remove\-labels\fR=[\fIKEY\fR,...]] [\fIGCLOUD_WIDE_FLAG\ ...\fR]
.SH "DESCRIPTION"
\fB(BETA)\fR Update an existing Cloud Asset Inventory saved query.
.SH "EXAMPLES"
To update the content of an existing saved query, run:
.RS 2m
$ gcloud beta asset saved\-queries update query\-id\-1 \-\-project=p1 \e
\-\-query\-file\-path=./query\-content.json \e
\-\-description="updating a query with query id query\-id\-1" \e
\-\-update\-labels="key1=val1"
.RE
.SH "POSITIONAL ARGUMENTS"
.RS 2m
.TP 2m
\fIQUERY_ID\fR
Saved query identifier being updated. It must be unique under the specified
parent resource project/folder/organization.
.RE
.sp
.SH "REQUIRED FLAGS"
.RS 2m
.TP 2m
Exactly one of these must be specified:
.RS 2m
.TP 2m
\fB\-\-folder\fR=\fIFOLDER_ID\fR
Folder of the saved query.
.TP 2m
\fB\-\-organization\fR=\fIORGANIZATION_ID\fR
Organization of the saved query.
.TP 2m
\fB\-\-project\fR=\fIPROJECT_ID\fR
Project of the saved query.
The Google Cloud project ID to use for this invocation. If omitted, then the
current project is assumed; the current project can be listed using \f5gcloud
config list \-\-format='text(core.project)'\fR and can be set using \f5gcloud
config set project PROJECTID\fR.
\f5\-\-project\fR and its fallback \f5core/project\fR property play two roles in
the invocation. It specifies the project of the resource to operate on. It also
specifies the project for API enablement check, quota, and billing. To specify a
different project for quota and billing, use \f5\-\-billing\-project\fR or
\f5billing/quota_project\fR property.
.RE
.RE
.sp
.SH "OPTIONAL FLAGS"
.RS 2m
.TP 2m
\fB\-\-description\fR=\fIDESCRIPTION\fR
A string describing the query.
.TP 2m
\fB\-\-query\-file\-path\fR=\fIQUERY_FILE_PATH\fR
Path to JSON or YAML file that contains the query.
.TP 2m
\fB\-\-update\-labels\fR=[\fIKEY\fR=\fIVALUE\fR,...]
List of label KEY=VALUE pairs to update. If a label exists, its value is
modified. Otherwise, a new label is created.
Keys must start with a lowercase character and contain only hyphens (\f5\-\fR),
underscores (\f5_\fR), lowercase characters, and numbers. Values must contain
only hyphens (\f5\-\fR), underscores (\f5_\fR), lowercase characters, and
numbers.
.TP 2m
At most one of these can be specified:
.RS 2m
.TP 2m
\fB\-\-clear\-labels\fR
Remove all labels. If \f5\-\-update\-labels\fR is also specified then
\f5\-\-clear\-labels\fR is applied first.
For example, to remove all labels:
.RS 2m
$ gcloud beta asset saved\-queries update \-\-clear\-labels
.RE
To remove all existing labels and create two new labels, \f5\fIfoo\fR\fR and
\f5\fIbaz\fR\fR:
.RS 2m
$ gcloud beta asset saved\-queries update \-\-clear\-labels \e
\-\-update\-labels foo=bar,baz=qux
.RE
.TP 2m
\fB\-\-remove\-labels\fR=[\fIKEY\fR,...]
List of label keys to remove. If a label does not exist it is silently ignored.
If \f5\-\-update\-labels\fR is also specified then \f5\-\-update\-labels\fR is
applied first.
.RE
.RE
.sp
.SH "GCLOUD WIDE FLAGS"
These flags are available to all commands: \-\-access\-token\-file, \-\-account,
\-\-billing\-project, \-\-configuration, \-\-flags\-file, \-\-flatten,
\-\-format, \-\-help, \-\-impersonate\-service\-account, \-\-log\-http,
\-\-project, \-\-quiet, \-\-trace\-token, \-\-user\-output\-enabled,
\-\-verbosity.
Run \fB$ gcloud help\fR for details.
.SH "NOTES"
This command is currently in beta and might change without notice. These
variants are also available:
.RS 2m
$ gcloud asset saved\-queries update
.RE
.RS 2m
$ gcloud alpha asset saved\-queries update
.RE