pub struct IdentityApi<'a> { /* private fields */ }Expand description
Identity API operations
Implementations§
Source§impl<'a> IdentityApi<'a>
impl<'a> IdentityApi<'a>
Sourcepub fn new(client: &'a VeracodeClient) -> Self
pub fn new(client: &'a VeracodeClient) -> Self
Create a new IdentityApi instance
Sourcepub async fn list_users(
&self,
query: Option<UserQuery>,
) -> Result<Vec<User>, IdentityError>
pub async fn list_users( &self, query: Option<UserQuery>, ) -> Result<Vec<User>, IdentityError>
Sourcepub async fn create_user(
&self,
request: CreateUserRequest,
) -> Result<User, IdentityError>
pub async fn create_user( &self, request: CreateUserRequest, ) -> Result<User, IdentityError>
Sourcepub async fn update_user(
&self,
user_id: &str,
request: UpdateUserRequest,
) -> Result<User, IdentityError>
pub async fn update_user( &self, user_id: &str, request: UpdateUserRequest, ) -> Result<User, IdentityError>
Sourcepub async fn delete_user(&self, user_id: &str) -> Result<(), IdentityError>
pub async fn delete_user(&self, user_id: &str) -> Result<(), IdentityError>
Sourcepub async fn list_roles(&self) -> Result<Vec<Role>, IdentityError>
pub async fn list_roles(&self) -> Result<Vec<Role>, IdentityError>
Sourcepub async fn list_teams(&self) -> Result<Vec<Team>, IdentityError>
pub async fn list_teams(&self) -> Result<Vec<Team>, IdentityError>
List all teams with pagination support
§Returns
A Result containing a list of all teams across all pages or an error
Sourcepub async fn create_team(
&self,
request: CreateTeamRequest,
) -> Result<Team, IdentityError>
pub async fn create_team( &self, request: CreateTeamRequest, ) -> Result<Team, IdentityError>
Sourcepub async fn delete_team(&self, team_id: &str) -> Result<(), IdentityError>
pub async fn delete_team(&self, team_id: &str) -> Result<(), IdentityError>
Sourcepub async fn create_api_credentials(
&self,
request: CreateApiCredentialRequest,
) -> Result<ApiCredential, IdentityError>
pub async fn create_api_credentials( &self, request: CreateApiCredentialRequest, ) -> Result<ApiCredential, IdentityError>
Sourcepub async fn revoke_api_credentials(
&self,
api_creds_id: &str,
) -> Result<(), IdentityError>
pub async fn revoke_api_credentials( &self, api_creds_id: &str, ) -> Result<(), IdentityError>
Source§impl<'a> IdentityApi<'a>
Convenience methods for common operations
impl<'a> IdentityApi<'a>
Convenience methods for common operations
Sourcepub async fn find_user_by_email(
&self,
email: &str,
) -> Result<Option<User>, IdentityError>
pub async fn find_user_by_email( &self, email: &str, ) -> Result<Option<User>, IdentityError>
Sourcepub async fn find_user_by_username(
&self,
username: &str,
) -> Result<Option<User>, IdentityError>
pub async fn find_user_by_username( &self, username: &str, ) -> Result<Option<User>, IdentityError>
Sourcepub async fn create_simple_user(
&self,
email: &str,
username: &str,
first_name: &str,
last_name: &str,
team_ids: Vec<String>,
) -> Result<User, IdentityError>
pub async fn create_simple_user( &self, email: &str, username: &str, first_name: &str, last_name: &str, team_ids: Vec<String>, ) -> Result<User, IdentityError>
Sourcepub async fn create_api_service_account(
&self,
email: &str,
username: &str,
first_name: &str,
last_name: &str,
role_ids: Vec<String>,
team_ids: Option<Vec<String>>,
) -> Result<User, IdentityError>
pub async fn create_api_service_account( &self, email: &str, username: &str, first_name: &str, last_name: &str, role_ids: Vec<String>, team_ids: Option<Vec<String>>, ) -> Result<User, IdentityError>
Create an API service account
§Arguments
email- Service account email addressusername- Service account usernamefirst_name- Service account first namelast_name- Service account last namerole_ids- List of role IDs to assignteam_ids- Optional list of team IDs to assign
§Returns
A Result containing the created user or an error
Auto Trait Implementations§
impl<'a> Freeze for IdentityApi<'a>
impl<'a> !RefUnwindSafe for IdentityApi<'a>
impl<'a> Send for IdentityApi<'a>
impl<'a> Sync for IdentityApi<'a>
impl<'a> Unpin for IdentityApi<'a>
impl<'a> !UnwindSafe for IdentityApi<'a>
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