cx_sdk::client::webhooks

Struct WebhooksClient

source
pub struct WebhooksClient { /* private fields */ }
Expand description

The Webhooks API client. Read more at https://coralogix.com/docs/webhooks-api/

Implementations§

source§

impl WebhooksClient

source

pub fn new(auth_context: AuthContext, region: CoralogixRegion) -> Result<Self>

Creates a new client for the Webhooks API.

§Arguments
source

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 - The WebhookType.
  • name - The name of the webhook.
  • url - The Url of the webhook.
  • config - The Config of the webhook.
source

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 - The WebhookType.
  • name - The name of the webhook.
  • url - The Url of the webhook.
  • config - The Config of the webhook.
source

pub async fn delete( &self, webhook_id: String, ) -> Result<DeleteOutgoingWebhookResponse>

Deletes the Outgoing Webhook.

§Arguments
  • webhook_id - The id of the webhook to delete.
source

pub async fn get( &self, webhook_id: String, ) -> Result<GetOutgoingWebhookResponse>

Retrieves the Outgoing Webhook by id.

§Arguments
  • webhook_id - The id of the webhook to get.
source

pub async fn get_outgoing_webhook_type_details( &self, webhook_type: WebhookType, ) -> Result<GetOutgoingWebhookTypeDetailsResponse>

Get outgoing WebhookType details.

§Arguments
  • webhook_type - The type of the webhook.
source

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 - The WebhookType.
  • name - The name of the webhook.
  • url - The Url of the webhook.
  • config - The Config of the webhook.
source

pub async fn test_webhook_by_id( &self, webhook_id: String, ) -> Result<TestOutgoingWebhookResponse>

Tests the existing outgoing webhook

§Arguments
  • webhook_id - The id of the webhook to test.
source

pub async fn get_type( &self, webhook_type: WebhookType, ) -> Result<ListOutgoingWebhooksResponse>

Get WebhookType details.

§Arguments
source

pub async fn list(&self) -> Result<ListAllOutgoingWebhooksResponse>

Retrieves a list of all outgoing webhooks.

§Returns

A list of all outgoing webhooks.

source

pub async fn list_webhook_types( &self, ) -> Result<ListOutgoingWebhookTypesResponse>

Retrieves a list of all WebhookTypes.

§Returns

A list of all webhook types.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoRequest<T> for T

source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<T> MaybeSendSync for T