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
- TheAuthContext
to use for authentication.region
- TheCoralogixRegion
to 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
- TheUrl
of the webhook.config
- TheConfig
of 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
- TheUrl
of the webhook.config
- TheConfig
of 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
- TheUrl
of the webhook.config
- TheConfig
of 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 !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