Struct google_api_proto::google::monitoring::v3::alert_policy::Condition
source · pub struct Condition {
pub name: String,
pub display_name: String,
pub condition: Option<Condition>,
}
Expand description
A condition is a true/false test that determines when an alerting policy should open an incident. If a condition evaluates to true, it signifies that something is wrong.
Fields§
§name: String
Required if the condition exists. The unique resource name for this condition. Its format is:
projects/\[PROJECT_ID_OR_NUMBER\]/alertPolicies/\[POLICY_ID\]/conditions/\[CONDITION_ID\]
\[CONDITION_ID\]
is assigned by Cloud Monitoring when the
condition is created as part of a new or updated alerting policy.
When calling the
[alertPolicies.create][google.monitoring.v3.AlertPolicyService.CreateAlertPolicy]
method, do not include the name
field in the conditions of the
requested alerting policy. Cloud Monitoring creates the
condition identifiers and includes them in the new policy.
When calling the
[alertPolicies.update][google.monitoring.v3.AlertPolicyService.UpdateAlertPolicy]
method to update a policy, including a condition name
causes the
existing condition to be updated. Conditions without names are added to
the updated policy. Existing conditions are deleted if they are not
updated.
Best practice is to preserve \[CONDITION_ID\]
if you make only small
changes, such as those to condition thresholds, durations, or trigger
values. Otherwise, treat the change as a new condition and let the
existing condition be deleted.
display_name: String
A short name or phrase used to identify the condition in dashboards, notifications, and incidents. To avoid confusion, don’t use the same display name for multiple conditions in the same policy.
condition: Option<Condition>
Only one of the following condition types will be specified.
Trait Implementations§
source§impl Message for Condition
impl Message for Condition
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for Condition
impl PartialEq for Condition
impl StructuralPartialEq for Condition
Auto Trait Implementations§
impl Freeze for Condition
impl RefUnwindSafe for Condition
impl Send for Condition
impl Sync for Condition
impl Unpin for Condition
impl UnwindSafe for Condition
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request