pub struct AlertSchedulerClient { /* private fields */ }
Expand description
The Alert Scheduler API client. Read more at https://coralogix.com/docs/coralogix-user-defined-alerts/
Implementations§
source§impl AlertSchedulerClient
impl AlertSchedulerClient
sourcepub fn new(region: CoralogixRegion, auth_context: AuthContext) -> Result<Self>
pub fn new(region: CoralogixRegion, auth_context: AuthContext) -> Result<Self>
Creates a new client for the Alert Scheduler API.
§Arguments
auth_context
- The API key to use for authentication.region
- The region to connect to.
sourcepub async fn create(
&self,
alert_scheduler_rule: AlertSchedulerRule,
) -> Result<AlertSchedulerRule>
pub async fn create( &self, alert_scheduler_rule: AlertSchedulerRule, ) -> Result<AlertSchedulerRule>
Creates a new Alert Scheduler Rule
§Arguments
alert_scheduler_rule
- TheAlertSchedulerRule
to create.
sourcepub async fn create_bulk(
&self,
alert_scheduler_rules: Vec<AlertSchedulerRule>,
) -> Result<Vec<AlertSchedulerRule>>
pub async fn create_bulk( &self, alert_scheduler_rules: Vec<AlertSchedulerRule>, ) -> Result<Vec<AlertSchedulerRule>>
Creates multiple Alert Scheduler Rules
§Arguments
alert_scheduler_rules
- TheAlertSchedulerRule
s to create.
sourcepub async fn update(
&self,
alert_scheduler_rule: AlertSchedulerRule,
) -> Result<AlertSchedulerRule>
pub async fn update( &self, alert_scheduler_rule: AlertSchedulerRule, ) -> Result<AlertSchedulerRule>
Updates an existing Alert Scheduler Rule identified by its unique identifier.
§Arguments
alert_scheduler_rule
- TheAlertSchedulerRule
to update.
sourcepub async fn update_bulk(
&self,
alert_scheduler_rules: Vec<AlertSchedulerRule>,
) -> Result<Vec<AlertSchedulerRule>>
pub async fn update_bulk( &self, alert_scheduler_rules: Vec<AlertSchedulerRule>, ) -> Result<Vec<AlertSchedulerRule>>
Updates multiple existing Alert Scheduler Rules identified by their unique identifiers.
§Arguments
alert_scheduler_rules
- TheAlertSchedulerRule
s to update.
sourcepub async fn get(&self, id: String) -> Result<AlertSchedulerRule>
pub async fn get(&self, id: String) -> Result<AlertSchedulerRule>
Retrieves an Alert Scheduler Rule by its unique identifier.
§Arguments
id
- The unique identifier of the Alert Scheduler Rule to retrieve.
sourcepub async fn get_bulk(
&self,
active_time_frame: ActiveTimeframe,
alert_scheduler_rule_ids: Vec<String>,
enabled: bool,
) -> Result<Vec<AlertSchedulerRuleWithActiveTimeframe>>
pub async fn get_bulk( &self, active_time_frame: ActiveTimeframe, alert_scheduler_rule_ids: Vec<String>, enabled: bool, ) -> Result<Vec<AlertSchedulerRuleWithActiveTimeframe>>
Retrieves multiple Alert Scheduler Rules by their unique identifiers.
§Arguments
active_time_frame
- TheActiveTimeframe
to filter the Alert Scheduler Rules by.
Auto Trait Implementations§
impl !Freeze for AlertSchedulerClient
impl !RefUnwindSafe for AlertSchedulerClient
impl Send for AlertSchedulerClient
impl Sync for AlertSchedulerClient
impl Unpin for AlertSchedulerClient
impl !UnwindSafe for AlertSchedulerClient
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
§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>
Wrap the input message
T
in a tonic::Request