pub struct DatasetClient { /* private fields */ }
Expand description
The Custom Enrichments API client. Read more at https://coralogix.com/docs/custom-enrichment-api/
Implementations§
source§impl DatasetClient
impl DatasetClient
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 Custom Enrichments API.
§Arguments
auth_context
- TheAuthContext
to use for authentication.region
- TheCoralogixRegion
to connect to.
sourcepub async fn create(
&self,
name: String,
description: Option<String>,
data: Vec<u8>,
) -> Result<CreateCustomEnrichmentResponse>
pub async fn create( &self, name: String, description: Option<String>, data: Vec<u8>, ) -> Result<CreateCustomEnrichmentResponse>
Creates a new dataset.
§Arguments
name
- The name of the Custom Enrichment.description
- The description of the Custom Enrichment.data
- The data of the Custom Enrichment.
sourcepub async fn replace(
&self,
id: u32,
name: String,
description: Option<String>,
data: Vec<u8>,
) -> Result<UpdateCustomEnrichmentResponse>
pub async fn replace( &self, id: u32, name: String, description: Option<String>, data: Vec<u8>, ) -> Result<UpdateCustomEnrichmentResponse>
Replaces the existing dataset identified by its id.
§Arguments
id
- The id of the Custom Enrichment.name
- The name of the Custom Enrichment.description
- The description of the Custom Enrichment.data
- The data of the Custom Enrichment.
Note that the existing dataset will be replaced with a new version of the data.
sourcepub async fn delete(
&self,
custom_enrichment_id: u32,
) -> Result<DeleteCustomEnrichmentResponse>
pub async fn delete( &self, custom_enrichment_id: u32, ) -> Result<DeleteCustomEnrichmentResponse>
Deletes the dataset identified by its id.
§Arguments
custom_enrichment_id
- The id of the Custom Enrichment.
sourcepub async fn get(&self, id: u32) -> Result<GetCustomEnrichmentResponse>
pub async fn get(&self, id: u32) -> Result<GetCustomEnrichmentResponse>
sourcepub async fn list(&self) -> Result<GetCustomEnrichmentsResponse>
pub async fn list(&self) -> Result<GetCustomEnrichmentsResponse>
Auto Trait Implementations§
impl !Freeze for DatasetClient
impl !RefUnwindSafe for DatasetClient
impl Send for DatasetClient
impl Sync for DatasetClient
impl Unpin for DatasetClient
impl !UnwindSafe for DatasetClient
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