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. Returns a list of service accounts in the project.
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>
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. Creates a new service account in the project. This also returns an unredacted API key for the service account.
Sourcepub async fn create_byot<T0: Serialize, R: DeserializeOwned>(
&self,
request: T0,
) -> Result<R, OpenAIError>
pub async fn create_byot<T0: Serialize, R: DeserializeOwned>( &self, request: T0, ) -> Result<R, 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. Retrieves a service account in the project.
Sourcepub async fn retrieve_byot<T0: Display, R: DeserializeOwned>(
&self,
service_account_id: T0,
) -> Result<R, OpenAIError>
pub async fn retrieve_byot<T0: Display, R: DeserializeOwned>( &self, service_account_id: T0, ) -> Result<R, 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. Deletes a service account from the project.
Sourcepub async fn delete_byot<T0: Display, R: DeserializeOwned>(
&self,
service_account_id: T0,
) -> Result<R, OpenAIError>
pub async fn delete_byot<T0: Display, R: DeserializeOwned>( &self, service_account_id: T0, ) -> Result<R, OpenAIError>
Deletes a service account from the project.