#[non_exhaustive]pub struct SqlCondition {
pub query: String,
pub schedule: Option<Schedule>,
pub evaluate: Option<Evaluate>,
}Expand description
A condition that allows alerting policies to be defined using GoogleSQL. SQL conditions examine a sliding window of logs using GoogleSQL. Alert policies with SQL conditions may incur additional billing.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.query: StringRequired. The Log Analytics SQL query to run, as a string. The query must conform to the required shape. Specifically, the query must not try to filter the input by time. A filter will automatically be applied to filter the input so that the query receives all rows received since the last time the query was run.
For example, the following query extracts all log entries containing an HTTP request:
SELECT
timestamp, log_name, severity, http_request, resource, labels
FROM
my-project.global._Default._AllLogs
WHERE
http_request IS NOT NULLschedule: Option<Schedule>The schedule indicates how often the query should be run.
evaluate: Option<Evaluate>The test to be run against the SQL result set.
Implementations§
Source§impl SqlCondition
impl SqlCondition
Sourcepub fn set_schedule<T: Into<Option<Schedule>>>(self, v: T) -> Self
pub fn set_schedule<T: Into<Option<Schedule>>>(self, v: T) -> Self
Sets the value of schedule.
Sourcepub fn get_minutes(&self) -> Option<&Box<Minutes>>
pub fn get_minutes(&self) -> Option<&Box<Minutes>>
The value of schedule
if it holds a Minutes, None if the field is not set or
holds a different branch.
Sourcepub fn get_hourly(&self) -> Option<&Box<Hourly>>
pub fn get_hourly(&self) -> Option<&Box<Hourly>>
The value of schedule
if it holds a Hourly, None if the field is not set or
holds a different branch.
Sourcepub fn get_daily(&self) -> Option<&Box<Daily>>
pub fn get_daily(&self) -> Option<&Box<Daily>>
The value of schedule
if it holds a Daily, None if the field is not set or
holds a different branch.
Sourcepub fn set_minutes<T: Into<Box<Minutes>>>(self, v: T) -> Self
pub fn set_minutes<T: Into<Box<Minutes>>>(self, v: T) -> Self
Sets the value of schedule
to hold a Minutes.
Note that all the setters affecting schedule are
mutually exclusive.
Sourcepub fn set_hourly<T: Into<Box<Hourly>>>(self, v: T) -> Self
pub fn set_hourly<T: Into<Box<Hourly>>>(self, v: T) -> Self
Sets the value of schedule
to hold a Hourly.
Note that all the setters affecting schedule are
mutually exclusive.
Sourcepub fn set_daily<T: Into<Box<Daily>>>(self, v: T) -> Self
pub fn set_daily<T: Into<Box<Daily>>>(self, v: T) -> Self
Sets the value of schedule
to hold a Daily.
Note that all the setters affecting schedule are
mutually exclusive.
Sourcepub fn set_evaluate<T: Into<Option<Evaluate>>>(self, v: T) -> Self
pub fn set_evaluate<T: Into<Option<Evaluate>>>(self, v: T) -> Self
Sets the value of evaluate.
Sourcepub fn get_row_count_test(&self) -> Option<&Box<RowCountTest>>
pub fn get_row_count_test(&self) -> Option<&Box<RowCountTest>>
The value of evaluate
if it holds a RowCountTest, None if the field is not set or
holds a different branch.
Sourcepub fn get_boolean_test(&self) -> Option<&Box<BooleanTest>>
pub fn get_boolean_test(&self) -> Option<&Box<BooleanTest>>
The value of evaluate
if it holds a BooleanTest, None if the field is not set or
holds a different branch.
Sourcepub fn set_row_count_test<T: Into<Box<RowCountTest>>>(self, v: T) -> Self
pub fn set_row_count_test<T: Into<Box<RowCountTest>>>(self, v: T) -> Self
Sets the value of evaluate
to hold a RowCountTest.
Note that all the setters affecting evaluate are
mutually exclusive.
Sourcepub fn set_boolean_test<T: Into<Box<BooleanTest>>>(self, v: T) -> Self
pub fn set_boolean_test<T: Into<Box<BooleanTest>>>(self, v: T) -> Self
Sets the value of evaluate
to hold a BooleanTest.
Note that all the setters affecting evaluate are
mutually exclusive.
Trait Implementations§
Source§impl Clone for SqlCondition
impl Clone for SqlCondition
Source§fn clone(&self) -> SqlCondition
fn clone(&self) -> SqlCondition
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more