pub struct AlertsClient { /* private fields */ }Expand description
The Alerts API client. Read more at https://coralogix.com/docs/coralogix-user-defined-alerts/
Implementations§
Source§impl AlertsClient
impl AlertsClient
Sourcepub fn new(
region: CoralogixRegion,
auth_context: AuthContext,
default_labels: Option<DefaultLabels>,
) -> Result<Self>
pub fn new( region: CoralogixRegion, auth_context: AuthContext, default_labels: Option<DefaultLabels>, ) -> Result<Self>
Creates a new client for the Alerts API.
§Arguments
auth_context- The API key to use for authentication.region- The region to connect to.default_labels- Labels to add to each request. Overwrites keys if they already exist.
Sourcepub async fn get(&self, alert_id: String) -> Result<GetAlertDefResponse>
pub async fn get(&self, alert_id: String) -> Result<GetAlertDefResponse>
Sourcepub async fn list(&self) -> Result<ListAlertDefsResponse>
pub async fn list(&self) -> Result<ListAlertDefsResponse>
List all alert definitions.
Sourcepub async fn create(&self, alert: AlertDef) -> Result<CreateAlertDefResponse>
pub async fn create(&self, alert: AlertDef) -> Result<CreateAlertDefResponse>
Sourcepub async fn replace(&self, alert: AlertDef) -> Result<ReplaceAlertDefResponse>
pub async fn replace(&self, alert: AlertDef) -> Result<ReplaceAlertDefResponse>
Auto Trait Implementations§
impl !Freeze for AlertsClient
impl !RefUnwindSafe for AlertsClient
impl Send for AlertsClient
impl Sync for AlertsClient
impl Unpin for AlertsClient
impl UnsafeUnpin for AlertsClient
impl !UnwindSafe for AlertsClient
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