pub struct AdminAPIKeys<'c, C: Config> { /* private fields */ }Expand description
Admin API keys enable Organization Owners to programmatically manage various aspects of their organization, including users, projects, and API keys. These keys provide administrative capabilities, allowing you to automate organization management tasks.
Implementations§
Source§impl<'c, C: Config> AdminAPIKeys<'c, C>
impl<'c, C: Config> AdminAPIKeys<'c, C>
pub fn new(client: &'c Client<C>) -> Self
Sourcepub async fn list<Q>(&self, query: &Q) -> Result<ApiKeyList, OpenAIError>
pub async fn list<Q>(&self, query: &Q) -> Result<ApiKeyList, OpenAIError>
List all organization and project API keys. List all organization and project API keys.
Sourcepub async fn list_byot<T0: Serialize, R: DeserializeOwned>(
&self,
query: T0,
) -> Result<R, OpenAIError>
pub async fn list_byot<T0: Serialize, R: DeserializeOwned>( &self, query: T0, ) -> Result<R, OpenAIError>
List all organization and project API keys.
Sourcepub async fn create(
&self,
request: CreateAdminApiKeyRequest,
) -> Result<AdminApiKey, OpenAIError>
pub async fn create( &self, request: CreateAdminApiKeyRequest, ) -> Result<AdminApiKey, OpenAIError>
Create an organization admin API key.
Sourcepub async fn retrieve(&self, key_id: &str) -> Result<AdminApiKey, OpenAIError>
pub async fn retrieve(&self, key_id: &str) -> Result<AdminApiKey, OpenAIError>
Retrieve a single organization API key. Retrieve a single organization API key.
Sourcepub async fn retrieve_byot<T0: Display, R: DeserializeOwned>(
&self,
key_id: T0,
) -> Result<R, OpenAIError>
pub async fn retrieve_byot<T0: Display, R: DeserializeOwned>( &self, key_id: T0, ) -> Result<R, OpenAIError>
Retrieve a single organization API key.
Sourcepub async fn delete(
&self,
key_id: &str,
) -> Result<AdminApiKeyDeleteResponse, OpenAIError>
pub async fn delete( &self, key_id: &str, ) -> Result<AdminApiKeyDeleteResponse, OpenAIError>
Delete an organization admin API key. Delete an organization admin API key.
Sourcepub async fn delete_byot<T0: Display, R: DeserializeOwned>(
&self,
key_id: T0,
) -> Result<R, OpenAIError>
pub async fn delete_byot<T0: Display, R: DeserializeOwned>( &self, key_id: T0, ) -> Result<R, OpenAIError>
Delete an organization admin API key.
Auto Trait Implementations§
impl<'c, C> Freeze for AdminAPIKeys<'c, C>
impl<'c, C> !RefUnwindSafe for AdminAPIKeys<'c, C>
impl<'c, C> Send for AdminAPIKeys<'c, C>
impl<'c, C> Sync for AdminAPIKeys<'c, C>
impl<'c, C> Unpin for AdminAPIKeys<'c, C>
impl<'c, C> !UnwindSafe for AdminAPIKeys<'c, C>
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