cx_sdk::client::incidents

Struct IncidentsClient

Source
pub struct IncidentsClient { /* private fields */ }
Expand description

IncidentsClient is a client for the Incidents API.

Implementations§

Source§

impl IncidentsClient

Source

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

Creates a new IncidentsClient.

§Arguments
Source

pub async fn get_incident( &self, id: &str, ) -> Result<GetIncidentResponse, Box<dyn Error>>

Gets an incident by its ID.

§Arguments
  • id - The ID of the incident to get.
Source

pub async fn batch_get_incident( &self, ids: Vec<String>, ) -> Result<BatchGetIncidentResponse, Box<dyn Error>>

Batch gets incidents by their IDs.

§Arguments
  • ids - The IDs of the incidents to get.
Source

pub async fn list_incidents( &self, filter: Option<IncidentQueryFilter>, pagination: Option<PaginationRequest>, order_bys: Vec<OrderBy>, ) -> Result<ListIncidentsResponse, Box<dyn Error>>

Lists incidents.

§Arguments
Source

pub async fn list_incident_aggregations( &self, filter: Option<IncidentQueryFilter>, group_bys: Vec<GroupBy>, pagination: Option<PaginationRequest>, ) -> Result<ListIncidentAggregationsResponse, Box<dyn Error>>

Lists incident aggregations.

§Arguments
Source

pub async fn get_filter_values( &self, filter: IncidentQueryFilter, ) -> Result<GetFilterValuesResponse, Box<dyn Error>>

Gets the filter values for a given filter.

§Arguments
Source

pub async fn assign_incidents( &self, incident_ids: Vec<String>, assigned_to: Option<UserDetails>, ) -> Result<AssignIncidentsResponse, Box<dyn Error>>

Assigns incidents to a user.

§Arguments
  • incident_ids - The IDs of the incidents to assign.
  • assigned_to - The UserDetails to assign the incidents to.
Source

pub async fn unassign_incidents( &self, incident_ids: Vec<String>, ) -> Result<UnassignIncidentsResponse, Box<dyn Error>>

Unassigns incidents from a user.

§Arguments
  • incident_ids - The IDs of the incidents to unassign.
Source

pub async fn acknowledge_incidents( &self, incident_ids: Vec<String>, ) -> Result<AcknowledgeIncidentsResponse, Box<dyn Error>>

Acknowledges incidents.

§Arguments
  • incident_ids - The IDs of the incidents to acknowledge.
Source

pub async fn close_incidents( &self, incident_ids: Vec<String>, ) -> Result<CloseIncidentsResponse, Box<dyn Error>>

Closes incidents.

§Arguments
  • incident_ids - The IDs of the incidents to close.
Source

pub async fn get_incident_events( &self, incident_id: Option<String>, ) -> Result<GetIncidentEventsResponse, Box<dyn Error>>

Gets the events for an incident.

§Arguments
  • incident_id - The ID of the incident to get the events for.
Source

pub async fn resolve_incidents( &self, incident_ids: Vec<String>, ) -> Result<ResolveIncidentsResponse, Box<dyn Error>>

Resolves incidents.

§Arguments
  • incident_ids - The IDs of the incidents to resolve.
Source

pub async fn get_incident_using_correlation_key( &self, correlation_key: String, timestamp: OffsetDateTime, ) -> Result<GetIncidentUsingCorrelationKeyResponse, Box<dyn Error>>

Gets an incident by its correlation key and specific point in time.

§Arguments
  • correlation_key - The correlation key of the incident to get.
  • timestamp - The timestamp to get the incident at.
Source

pub async fn list_incident_events( &self, filter: Option<IncidentEventQueryFilter>, pagination: Option<PaginationRequest>, order_by: Option<ListIncidentEventRequestOrderBy>, ) -> Result<ListIncidentEventsResponse, Box<dyn Error>>

Lists the events for an incident.

§Arguments
  • incident_id - The ID of the incident to get the events for.
Source

pub async fn list_incident_events_total_count( &self, filter: Option<IncidentEventQueryFilter>, ) -> Result<ListIncidentEventsTotalCountResponse, Box<dyn Error>>

Lists the total count of events for an incident.

§Arguments
  • incident_id - The ID of the incident to get the total count of events for.
Source

pub async fn list_incident_events_filter_values( &self, filter: Option<IncidentEventQueryFilter>, ) -> Result<ListIncidentEventsFilterValuesResponse, Box<dyn Error>>

Lists the filter values for an incident event.

§Arguments

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