pub struct WebhooksClient { /* private fields */ }Expand description
The Webhooks API client. Read more at https://coralogix.com/docs/webhooks-api/
Implementations§
Source§impl WebhooksClient
impl WebhooksClient
Sourcepub fn new(auth_context: AuthContext, region: CoralogixRegion) -> Result<Self>
pub fn new(auth_context: AuthContext, region: CoralogixRegion) -> Result<Self>
Creates a new client for the Webhooks API.
§Arguments
auth_context- TheAuthContextto use for authentication.region- TheCoralogixRegionto connect to.
Sourcepub async fn create(
&self,
webhook_type: WebhookType,
name: Option<String>,
url: Url,
config: Config,
) -> Result<CreateOutgoingWebhookResponse>
pub async fn create( &self, webhook_type: WebhookType, name: Option<String>, url: Url, config: Config, ) -> Result<CreateOutgoingWebhookResponse>
Creates a new Outgoing Webhook.
§Arguments
webhook_type- TheWebhookType.name- The name of the webhook.url- TheUrlof the webhook.config- TheConfigof the webhook.
Sourcepub async fn replace(
&self,
webhook_id: String,
name: Option<String>,
webhook_type: WebhookType,
url: Url,
config: Config,
) -> Result<UpdateOutgoingWebhookResponse>
pub async fn replace( &self, webhook_id: String, name: Option<String>, webhook_type: WebhookType, url: Url, config: Config, ) -> Result<UpdateOutgoingWebhookResponse>
Update the Outgoing Webhook identified by its id.
§Arguments
webhook_id- The id of the webhook to update.webhook_type- TheWebhookType.name- The name of the webhook.url- TheUrlof the webhook.config- TheConfigof the webhook.
Sourcepub async fn delete(
&self,
webhook_id: String,
) -> Result<DeleteOutgoingWebhookResponse>
pub async fn delete( &self, webhook_id: String, ) -> Result<DeleteOutgoingWebhookResponse>
Sourcepub async fn get(
&self,
webhook_id: String,
) -> Result<GetOutgoingWebhookResponse>
pub async fn get( &self, webhook_id: String, ) -> Result<GetOutgoingWebhookResponse>
Sourcepub async fn get_outgoing_webhook_type_details(
&self,
webhook_type: WebhookType,
) -> Result<GetOutgoingWebhookTypeDetailsResponse>
pub async fn get_outgoing_webhook_type_details( &self, webhook_type: WebhookType, ) -> Result<GetOutgoingWebhookTypeDetailsResponse>
Sourcepub async fn test_webhook(
&self,
webhook_type: WebhookType,
name: Option<String>,
url: Url,
config: Config,
) -> Result<TestOutgoingWebhookResponse>
pub async fn test_webhook( &self, webhook_type: WebhookType, name: Option<String>, url: Url, config: Config, ) -> Result<TestOutgoingWebhookResponse>
Tests the provided outgoing webhook
§Arguments
webhook_type- TheWebhookType.name- The name of the webhook.url- TheUrlof the webhook.config- TheConfigof the webhook.
Sourcepub async fn test_webhook_by_id(
&self,
webhook_id: String,
) -> Result<TestOutgoingWebhookResponse>
pub async fn test_webhook_by_id( &self, webhook_id: String, ) -> Result<TestOutgoingWebhookResponse>
Sourcepub async fn get_type(
&self,
webhook_type: WebhookType,
) -> Result<ListOutgoingWebhooksResponse>
pub async fn get_type( &self, webhook_type: WebhookType, ) -> Result<ListOutgoingWebhooksResponse>
Sourcepub async fn list(&self) -> Result<ListAllOutgoingWebhooksResponse>
pub async fn list(&self) -> Result<ListAllOutgoingWebhooksResponse>
Sourcepub async fn list_webhook_types(
&self,
) -> Result<ListOutgoingWebhookTypesResponse>
pub async fn list_webhook_types( &self, ) -> Result<ListOutgoingWebhookTypesResponse>
Auto Trait Implementations§
impl !Freeze for WebhooksClient
impl !RefUnwindSafe for WebhooksClient
impl Send for WebhooksClient
impl Sync for WebhooksClient
impl Unpin for WebhooksClient
impl UnsafeUnpin for WebhooksClient
impl !UnwindSafe for WebhooksClient
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