File: //snap/google-cloud-cli/396/help/man/man1/gcloud_alpha_monitoring_policies_conditions_create.1
.TH "GCLOUD_ALPHA_MONITORING_POLICIES_CONDITIONS_CREATE" 1
.SH "NAME"
.HP
gcloud alpha monitoring policies conditions create \- create a condition in an alerting policy
.SH "SYNOPSIS"
.HP
\f5gcloud alpha monitoring policies conditions create\fR \fIALERT_POLICY\fR [\fB\-\-aggregation\fR=\fIAGGREGATION\fR\ \fB\-\-condition\-display\-name\fR=\fICONDITION_DISPLAY_NAME\fR\ \fB\-\-condition\-filter\fR=\fICONDITION_FILTER\fR\ \fB\-\-duration\fR=\fIDURATION\fR\ \fB\-\-if\fR=\fIIF_VALUE\fR\ \fB\-\-trigger\-count\fR=\fITRIGGER_COUNT\fR\ |\ \fB\-\-trigger\-percent\fR=\fITRIGGER_PERCENT\fR] [\fB\-\-condition\fR=\fICONDITION\fR\ |\ \fB\-\-condition\-from\-file\fR=\fIPATH_TO_FILE\fR] [\fIGCLOUD_WIDE_FLAG\ ...\fR]
.SH "DESCRIPTION"
\fB(ALPHA)\fR Create a condition in an alerting policy.
.SH "POSITIONAL ARGUMENTS"
.RS 2m
.TP 2m
Alert Policy resource \- Name of the Alert Policy to add a condition to. This
represents a Cloud resource. (NOTE) Some attributes are not given arguments in
this group but can be set in other ways.
To set the \f5project\fR attribute:
.RS 2m
.IP "\(em" 2m
provide the argument \f5alert_policy\fR on the command line with a fully
specified name;
.IP "\(em" 2m
provide the argument \f5\-\-project\fR on the command line;
.IP "\(em" 2m
set the property \f5core/project\fR.
.RE
.sp
This must be specified.
.RS 2m
.TP 2m
\fIALERT_POLICY\fR
ID of the Alert Policy or fully qualified identifier for the Alert Policy.
To set the \f5policy\fR attribute:
.RS 2m
.IP "\(bu" 2m
provide the argument \f5alert_policy\fR on the command line.
.RE
.sp
.RE
.RE
.sp
.SH "FLAGS"
.RS 2m
.TP 2m
Condition Settings. This will add a condition to the created policy. If any
conditions are already specified, this condition will be appended.
.RS 2m
.TP 2m
\fB\-\-aggregation\fR=\fIAGGREGATION\fR
Specifies an Aggregation message as a JSON/YAML value to be applied to the
condition. For more information about the format:
https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.alertPolicies
.TP 2m
\fB\-\-condition\-display\-name\fR=\fICONDITION_DISPLAY_NAME\fR
The display name for the condition.
.TP 2m
\fB\-\-condition\-filter\fR=\fICONDITION_FILTER\fR
Specifies the "filter" in a metric absence or metric threshold condition.
.TP 2m
\fB\-\-duration\fR=\fIDURATION\fR
The duration (e.g. "60s", "2min", etc.) that the condition must hold in order to
trigger as true.
.TP 2m
\fB\-\-if\fR=\fIIF_VALUE\fR
One of "absent", "< THRESHOLD", "> THRESHOLD" where "THRESHOLD" is an integer or
float.
.TP 2m
At most one of these can be specified:
.RS 2m
.TP 2m
\fB\-\-trigger\-count\fR=\fITRIGGER_COUNT\fR
The absolute number of time series that must fail the predicate for the
condition to be triggered.
.TP 2m
\fB\-\-trigger\-percent\fR=\fITRIGGER_PERCENT\fR
The percentage of time series that must fail the predicate for the condition to
be triggered.
.RE
.RE
.sp
.TP 2m
At most one of these can be specified:
.RS 2m
.TP 2m
\fB\-\-condition\fR=\fICONDITION\fR
The condition as a string. In either JSON or YAML format.
.TP 2m
\fB\-\-condition\-from\-file\fR=\fIPATH_TO_FILE\fR
The path to a JSON or YAML file containing the condition. Use a full or relative
path to a local file containing the value of condition.
.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 alpha and might change without notice. If this
command fails with API permission errors despite specifying the correct project,
you might be trying to access an API with an invitation\-only early access
allowlist.