pub struct ApiKeysClient { /* private fields */ }Expand description
The API Keys API client. Read more at https://coralogix.com/docs/api-keys/
Implementations§
Source§impl ApiKeysClient
impl ApiKeysClient
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 APIKeys API.
§Arguments
auth_context- TheAuthContextto use for authentication.region- TheCoralogixRegionto connect to.
Sourcepub async fn create(
&self,
name: String,
owner: Option<Owner>,
presets: Vec<String>,
permissions: Vec<String>,
hashed: bool,
) -> Result<CreateApiKeyResponse>
pub async fn create( &self, name: String, owner: Option<Owner>, presets: Vec<String>, permissions: Vec<String>, hashed: bool, ) -> Result<CreateApiKeyResponse>
Creates a new API Key
§Arguments
name- The name of the API key.owner- TheOwnerof the API key.presets- The presets of the API key.permissions- The permissions of the API key.hashed- Whether the API key should be encrypted.
Note that when the API key is hashed, it will not be possible to retrieve it later.
Sourcepub async fn update(
&self,
key_id: String,
is_active: Option<bool>,
new_name: Option<String>,
presets: Option<Vec<String>>,
permissions: Option<Vec<String>>,
) -> Result<UpdateApiKeyResponse>
pub async fn update( &self, key_id: String, is_active: Option<bool>, new_name: Option<String>, presets: Option<Vec<String>>, permissions: Option<Vec<String>>, ) -> Result<UpdateApiKeyResponse>
Updates an API key.
§Arguments
key_id- The ID of the API key to update.is_active- Whether the API key should be active.new_name- The new name of the API key.presets- The new presets of the API key.permissions- The new permissions of the API key.
Sourcepub async fn delete(&self, key_id: String) -> Result<DeleteApiKeyResponse>
pub async fn delete(&self, key_id: String) -> Result<DeleteApiKeyResponse>
Auto Trait Implementations§
impl !Freeze for ApiKeysClient
impl !RefUnwindSafe for ApiKeysClient
impl Send for ApiKeysClient
impl Sync for ApiKeysClient
impl Unpin for ApiKeysClient
impl UnsafeUnpin for ApiKeysClient
impl !UnwindSafe for ApiKeysClient
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