pub struct AlertRulesResource<'a> { /* private fields */ }Expand description
The alert-rules API. Reached via Client::alert_rules.
Implementations§
Source§impl<'a> AlertRulesResource<'a>
impl<'a> AlertRulesResource<'a>
Sourcepub async fn create(&self, params: CreateAlertRuleParams) -> Result<AlertRule>
pub async fn create(&self, params: CreateAlertRuleParams) -> Result<AlertRule>
Creates an alert rule.
Sourcepub async fn list(
&self,
params: ListAlertRulesParams,
) -> Result<Page<AlertRule>>
pub async fn list( &self, params: ListAlertRulesParams, ) -> Result<Page<AlertRule>>
Lists alert rules, one page at a time.
Sourcepub fn list_stream(
&self,
params: ListAlertRulesParams,
) -> impl Stream<Item = Result<AlertRule>> + Send
pub fn list_stream( &self, params: ListAlertRulesParams, ) -> impl Stream<Item = Result<AlertRule>> + Send
Lists alert rules, transparently fetching every page.
Sourcepub async fn update(
&self,
alert_rule_id: &str,
params: UpdateAlertRuleParams,
) -> Result<AlertRule>
pub async fn update( &self, alert_rule_id: &str, params: UpdateAlertRuleParams, ) -> Result<AlertRule>
Updates an alert rule.
Sourcepub async fn delete(&self, alert_rule_id: &str) -> Result<MessageResponse>
pub async fn delete(&self, alert_rule_id: &str) -> Result<MessageResponse>
Deletes an alert rule.
Trait Implementations§
Source§impl<'a> Clone for AlertRulesResource<'a>
impl<'a> Clone for AlertRulesResource<'a>
Source§fn clone(&self) -> AlertRulesResource<'a>
fn clone(&self) -> AlertRulesResource<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a> Copy for AlertRulesResource<'a>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for AlertRulesResource<'a>
impl<'a> !UnwindSafe for AlertRulesResource<'a>
impl<'a> Freeze for AlertRulesResource<'a>
impl<'a> Send for AlertRulesResource<'a>
impl<'a> Sync for AlertRulesResource<'a>
impl<'a> Unpin for AlertRulesResource<'a>
impl<'a> UnsafeUnpin for AlertRulesResource<'a>
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
Mutably borrows from an owned value. Read more