pub struct ProjectServiceAccounts<'c, C: Config> {
pub project_id: String,
/* private fields */
}
Expand description
Manage service accounts within a project. A service account is a bot user that is not associated with a user. If a user leaves an organization, their keys and membership in projects will no longer work. Service accounts do not have this limitation. However, service accounts can also be deleted from a project.
Fields§
§project_id: String
Implementations§
Source§impl<'c, C: Config> ProjectServiceAccounts<'c, C>
impl<'c, C: Config> ProjectServiceAccounts<'c, C>
pub fn new(client: &'c Client<C>, project_id: &str) -> Self
Sourcepub async fn list<Q>(
&self,
query: &Q,
) -> Result<ProjectServiceAccountListResponse, OpenAIError>
pub async fn list<Q>( &self, query: &Q, ) -> Result<ProjectServiceAccountListResponse, OpenAIError>
Returns a list of service accounts in the project.
Sourcepub async fn create(
&self,
request: ProjectServiceAccountCreateRequest,
) -> Result<ProjectServiceAccountCreateResponse, OpenAIError>
pub async fn create( &self, request: ProjectServiceAccountCreateRequest, ) -> Result<ProjectServiceAccountCreateResponse, OpenAIError>
Creates a new service account in the project. This also returns an unredacted API key for the service account.
Sourcepub async fn retrieve(
&self,
service_account_id: &str,
) -> Result<ProjectServiceAccount, OpenAIError>
pub async fn retrieve( &self, service_account_id: &str, ) -> Result<ProjectServiceAccount, OpenAIError>
Retrieves a service account in the project.
Sourcepub async fn delete(
&self,
service_account_id: &str,
) -> Result<ProjectServiceAccountDeleteResponse, OpenAIError>
pub async fn delete( &self, service_account_id: &str, ) -> Result<ProjectServiceAccountDeleteResponse, OpenAIError>
Deletes a service account from the project.
Auto Trait Implementations§
impl<'c, C> Freeze for ProjectServiceAccounts<'c, C>
impl<'c, C> !RefUnwindSafe for ProjectServiceAccounts<'c, C>
impl<'c, C> Send for ProjectServiceAccounts<'c, C>where
C: Sync,
impl<'c, C> Sync for ProjectServiceAccounts<'c, C>where
C: Sync,
impl<'c, C> Unpin for ProjectServiceAccounts<'c, C>
impl<'c, C> !UnwindSafe for ProjectServiceAccounts<'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