pub struct Users {
pub client: Client,
}
Fields
client: Client
Implementations
sourceimpl Users
impl Users
sourcepub async fn list(
&self,
q: &str,
after: &str,
limit: i64,
filter: &str,
search: &str,
sort_by: &str,
sort_order: &str
) -> Result<Vec<User>>
pub async fn list(
&self,
q: &str,
after: &str,
limit: i64,
filter: &str,
search: &str,
sort_by: &str,
sort_order: &str
) -> Result<Vec<User>>
List Users.
This function performs a GET
to the /api/v1/users
endpoint.
Lists users in your organization with pagination in most cases. A subset of users can be returned that match a supported filter expression or search criteria.
Parameters:
q: &str
– Finds a user that matches firstName, lastName, and email properties.after: &str
– Specifies the pagination cursor for the next page of users.limit: i64
– Specifies the number of results returned.filter: &str
– Filters users with a supported expression for a subset of properties.search: &str
– Searches for users with a supported filtering expression for most properties.sort_by: &str
sort_order: &str
sourcepub async fn list_all(
&self,
q: &str,
filter: &str,
search: &str,
sort_by: &str,
sort_order: &str
) -> Result<Vec<User>>
pub async fn list_all(
&self,
q: &str,
filter: &str,
search: &str,
sort_by: &str,
sort_order: &str
) -> Result<Vec<User>>
List Users.
This function performs a GET
to the /api/v1/users
endpoint.
As opposed to list
, this function returns all the pages of the request at once.
Lists users in your organization with pagination in most cases. A subset of users can be returned that match a supported filter expression or search criteria.
sourcepub async fn create(
&self,
activate: bool,
provider: bool,
next_login: &str,
body: &CreateUserRequest
) -> Result<User>
pub async fn create(
&self,
activate: bool,
provider: bool,
next_login: &str,
body: &CreateUserRequest
) -> Result<User>
Create User.
This function performs a POST
to the /api/v1/users
endpoint.
Creates a new user in your Okta organization with or without credentials.
Parameters:
activate: bool
– Executes activation lifecycle operation when creating the user.provider: bool
– Indicates whether to create a user with a specified authentication provider.next_login: &str
– With activate=true, set nextLogin to “changePassword” to have the password be EXPIRED, so user must change it the next time they log in.
sourcepub async fn set_linked_object_for(
&self,
associated_user_id: &str,
primary_relationship_name: &str,
primary_user_id: &str
) -> Result<()>
pub async fn set_linked_object_for(
&self,
associated_user_id: &str,
primary_relationship_name: &str,
primary_user_id: &str
) -> Result<()>
This function performs a PUT
to the /api/v1/users/{associatedUserId}/linkedObjects/{primaryRelationshipName}/{primaryUserId}
endpoint.
Parameters:
associated_user_id: &str
primary_relationship_name: &str
primary_user_id: &str
sourcepub async fn get(&self, user_id: &str) -> Result<User>
pub async fn get(&self, user_id: &str) -> Result<User>
Get User.
This function performs a GET
to the /api/v1/users/{userId}
endpoint.
Fetches a user from your Okta organization.
Parameters:
user_id: &str
sourcepub async fn update(
&self,
user_id: &str,
strict: bool,
body: &User
) -> Result<User>
pub async fn update(
&self,
user_id: &str,
strict: bool,
body: &User
) -> Result<User>
Update User.
This function performs a PUT
to the /api/v1/users/{userId}
endpoint.
Update a user’s profile and/or credentials using strict-update semantics.
Parameters:
user_id: &str
strict: bool
sourcepub async fn partial_update(
&self,
user_id: &str,
strict: bool,
body: &User
) -> Result<User>
pub async fn partial_update(
&self,
user_id: &str,
strict: bool,
body: &User
) -> Result<User>
This function performs a POST
to the /api/v1/users/{userId}
endpoint.
Fetch a user by id
, login
, or login shortname
if the short name is unambiguous.
Parameters:
user_id: &str
strict: bool
sourcepub async fn deactivate_or_delete(
&self,
user_id: &str,
send_email: bool
) -> Result<()>
pub async fn deactivate_or_delete(
&self,
user_id: &str,
send_email: bool
) -> Result<()>
Delete User.
This function performs a DELETE
to the /api/v1/users/{userId}
endpoint.
Deletes a user permanently. This operation can only be performed on users that have a DEPROVISIONED
status. This action cannot be recovered!
Parameters:
user_id: &str
send_email: bool
sourcepub async fn list_app_links(&self, user_id: &str) -> Result<Vec<AppLink>>
pub async fn list_app_links(&self, user_id: &str) -> Result<Vec<AppLink>>
Get Assigned App Links.
This function performs a GET
to the /api/v1/users/{userId}/appLinks
endpoint.
Fetches appLinks for all direct or indirect (via group membership) assigned applications.
Parameters:
user_id: &str
sourcepub async fn list_all_app_links(&self, user_id: &str) -> Result<Vec<AppLink>>
pub async fn list_all_app_links(&self, user_id: &str) -> Result<Vec<AppLink>>
Get Assigned App Links.
This function performs a GET
to the /api/v1/users/{userId}/appLinks
endpoint.
As opposed to list_app_links
, this function returns all the pages of the request at once.
Fetches appLinks for all direct or indirect (via group membership) assigned applications.
sourcepub async fn list_clients(&self, user_id: &str) -> Result<Vec<OAuth2Client>>
pub async fn list_clients(&self, user_id: &str) -> Result<Vec<OAuth2Client>>
This function performs a GET
to the /api/v1/users/{userId}/clients
endpoint.
Lists all client resources for which the specified user has grants or tokens.
Parameters:
user_id: &str
sourcepub async fn list_all_clients(&self, user_id: &str) -> Result<Vec<OAuth2Client>>
pub async fn list_all_clients(&self, user_id: &str) -> Result<Vec<OAuth2Client>>
This function performs a GET
to the /api/v1/users/{userId}/clients
endpoint.
As opposed to list_clients
, this function returns all the pages of the request at once.
Lists all client resources for which the specified user has grants or tokens.
sourcepub async fn list_grants_for_and_clients(
&self,
user_id: &str,
client_id: &str,
expand: &str,
after: &str,
limit: i64
) -> Result<Vec<OAuth2ScopeConsentGrant>>
pub async fn list_grants_for_and_clients(
&self,
user_id: &str,
client_id: &str,
expand: &str,
after: &str,
limit: i64
) -> Result<Vec<OAuth2ScopeConsentGrant>>
This function performs a GET
to the /api/v1/users/{userId}/clients/{clientId}/grants
endpoint.
Lists all grants for a specified user and client
Parameters:
user_id: &str
client_id: &str
expand: &str
after: &str
limit: i64
sourcepub async fn list_all_grants_for_and_clients(
&self,
user_id: &str,
client_id: &str,
expand: &str
) -> Result<Vec<OAuth2ScopeConsentGrant>>
pub async fn list_all_grants_for_and_clients(
&self,
user_id: &str,
client_id: &str,
expand: &str
) -> Result<Vec<OAuth2ScopeConsentGrant>>
This function performs a GET
to the /api/v1/users/{userId}/clients/{clientId}/grants
endpoint.
As opposed to list_grants_for_and_client
, this function returns all the pages of the request at once.
Lists all grants for a specified user and client
sourcepub async fn revoke_grants_for_and_client(
&self,
user_id: &str,
client_id: &str
) -> Result<()>
pub async fn revoke_grants_for_and_client(
&self,
user_id: &str,
client_id: &str
) -> Result<()>
This function performs a DELETE
to the /api/v1/users/{userId}/clients/{clientId}/grants
endpoint.
Revokes all grants for the specified user and client
Parameters:
user_id: &str
client_id: &str
sourcepub async fn list_refresh_tokens_for_and_clients(
&self,
user_id: &str,
client_id: &str,
expand: &str,
after: &str,
limit: i64
) -> Result<Vec<OAuth2RefreshToken>>
pub async fn list_refresh_tokens_for_and_clients(
&self,
user_id: &str,
client_id: &str,
expand: &str,
after: &str,
limit: i64
) -> Result<Vec<OAuth2RefreshToken>>
This function performs a GET
to the /api/v1/users/{userId}/clients/{clientId}/tokens
endpoint.
Lists all refresh tokens issued for the specified User and Client.
Parameters:
user_id: &str
client_id: &str
expand: &str
after: &str
limit: i64
sourcepub async fn list_all_refresh_tokens_for_and_clients(
&self,
user_id: &str,
client_id: &str,
expand: &str
) -> Result<Vec<OAuth2RefreshToken>>
pub async fn list_all_refresh_tokens_for_and_clients(
&self,
user_id: &str,
client_id: &str,
expand: &str
) -> Result<Vec<OAuth2RefreshToken>>
This function performs a GET
to the /api/v1/users/{userId}/clients/{clientId}/tokens
endpoint.
As opposed to list_refresh_tokens_for_and_client
, this function returns all the pages of the request at once.
Lists all refresh tokens issued for the specified User and Client.
sourcepub async fn revoke_tokens_for_and_client(
&self,
user_id: &str,
client_id: &str
) -> Result<()>
pub async fn revoke_tokens_for_and_client(
&self,
user_id: &str,
client_id: &str
) -> Result<()>
This function performs a DELETE
to the /api/v1/users/{userId}/clients/{clientId}/tokens
endpoint.
Revokes all refresh tokens issued for the specified User and Client.
Parameters:
user_id: &str
client_id: &str
sourcepub async fn get_refresh_token_for_and_client(
&self,
user_id: &str,
client_id: &str,
token_id: &str,
expand: &str,
limit: i64,
after: &str
) -> Result<OAuth2RefreshToken>
pub async fn get_refresh_token_for_and_client(
&self,
user_id: &str,
client_id: &str,
token_id: &str,
expand: &str,
limit: i64,
after: &str
) -> Result<OAuth2RefreshToken>
This function performs a GET
to the /api/v1/users/{userId}/clients/{clientId}/tokens/{tokenId}
endpoint.
Gets a refresh token issued for the specified User and Client.
Parameters:
user_id: &str
client_id: &str
token_id: &str
expand: &str
limit: i64
after: &str
sourcepub async fn revoke_token_for_and_client(
&self,
user_id: &str,
client_id: &str,
token_id: &str
) -> Result<()>
pub async fn revoke_token_for_and_client(
&self,
user_id: &str,
client_id: &str,
token_id: &str
) -> Result<()>
This function performs a DELETE
to the /api/v1/users/{userId}/clients/{clientId}/tokens/{tokenId}
endpoint.
Revokes the specified refresh token.
Parameters:
user_id: &str
client_id: &str
token_id: &str
sourcepub async fn change_password(
&self,
user_id: &str,
strict: bool,
body: &ChangePasswordRequest
) -> Result<UserCredentials>
pub async fn change_password(
&self,
user_id: &str,
strict: bool,
body: &ChangePasswordRequest
) -> Result<UserCredentials>
Change Password.
This function performs a POST
to the /api/v1/users/{userId}/credentials/change_password
endpoint.
Changes a user’s password by validating the user’s current password. This operation can only be performed on users in STAGED
, ACTIVE
, PASSWORD_EXPIRED
, or RECOVERY
status that have a valid password credential
Parameters:
user_id: &str
strict: bool
sourcepub async fn change_recovery_question(
&self,
user_id: &str,
body: &UserCredentials
) -> Result<UserCredentials>
pub async fn change_recovery_question(
&self,
user_id: &str,
body: &UserCredentials
) -> Result<UserCredentials>
Change Recovery Question.
This function performs a POST
to the /api/v1/users/{userId}/credentials/change_recovery_question
endpoint.
Changes a user’s recovery question & answer credential by validating the user’s current password. This operation can only be performed on users in STAGED, ACTIVE or RECOVERY status
that have a valid password credential
Parameters:
user_id: &str
sourcepub async fn post_credentials_forgot_password(
&self,
user_id: &str
) -> Result<ResetPasswordToken>
pub async fn post_credentials_forgot_password(
&self,
user_id: &str
) -> Result<ResetPasswordToken>
Forgot Password.
This function performs a POST
to the /api/v1/users/{userId}/credentials/forgot_password
endpoint.
Parameters:
user_id: &str
sourcepub async fn list_grants(
&self,
user_id: &str,
scope_id: &str,
expand: &str,
after: &str,
limit: i64
) -> Result<Vec<OAuth2ScopeConsentGrant>>
pub async fn list_grants(
&self,
user_id: &str,
scope_id: &str,
expand: &str,
after: &str,
limit: i64
) -> Result<Vec<OAuth2ScopeConsentGrant>>
This function performs a GET
to the /api/v1/users/{userId}/grants
endpoint.
Lists all grants for the specified user
Parameters:
user_id: &str
scope_id: &str
expand: &str
after: &str
limit: i64
sourcepub async fn list_all_grants(
&self,
user_id: &str,
scope_id: &str,
expand: &str
) -> Result<Vec<OAuth2ScopeConsentGrant>>
pub async fn list_all_grants(
&self,
user_id: &str,
scope_id: &str,
expand: &str
) -> Result<Vec<OAuth2ScopeConsentGrant>>
This function performs a GET
to the /api/v1/users/{userId}/grants
endpoint.
As opposed to list_grants
, this function returns all the pages of the request at once.
Lists all grants for the specified user
sourcepub async fn revoke_grants(&self, user_id: &str) -> Result<()>
pub async fn revoke_grants(&self, user_id: &str) -> Result<()>
This function performs a DELETE
to the /api/v1/users/{userId}/grants
endpoint.
Revokes all grants for a specified user
Parameters:
user_id: &str
sourcepub async fn get_grant(
&self,
user_id: &str,
grant_id: &str,
expand: &str
) -> Result<OAuth2ScopeConsentGrant>
pub async fn get_grant(
&self,
user_id: &str,
grant_id: &str,
expand: &str
) -> Result<OAuth2ScopeConsentGrant>
This function performs a GET
to the /api/v1/users/{userId}/grants/{grantId}
endpoint.
Gets a grant for the specified user
Parameters:
user_id: &str
grant_id: &str
expand: &str
sourcepub async fn revoke_grant(&self, user_id: &str, grant_id: &str) -> Result<()>
pub async fn revoke_grant(&self, user_id: &str, grant_id: &str) -> Result<()>
This function performs a DELETE
to the /api/v1/users/{userId}/grants/{grantId}
endpoint.
Revokes one grant for a specified user
Parameters:
user_id: &str
grant_id: &str
sourcepub async fn list_groups(&self, user_id: &str) -> Result<Vec<Group>>
pub async fn list_groups(&self, user_id: &str) -> Result<Vec<Group>>
Get Member Groups.
This function performs a GET
to the /api/v1/users/{userId}/groups
endpoint.
Fetches the groups of which the user is a member.
Parameters:
user_id: &str
sourcepub async fn list_all_groups(&self, user_id: &str) -> Result<Vec<Group>>
pub async fn list_all_groups(&self, user_id: &str) -> Result<Vec<Group>>
Get Member Groups.
This function performs a GET
to the /api/v1/users/{userId}/groups
endpoint.
As opposed to list_groups
, this function returns all the pages of the request at once.
Fetches the groups of which the user is a member.
sourcepub async fn list_identity_providers(
&self,
user_id: &str
) -> Result<Vec<IdentityProvider>>
pub async fn list_identity_providers(
&self,
user_id: &str
) -> Result<Vec<IdentityProvider>>
Listing IdPs associated with a user.
This function performs a GET
to the /api/v1/users/{userId}/idps
endpoint.
Lists the IdPs associated with the user.
Parameters:
user_id: &str
sourcepub async fn list_all_identity_providers(
&self,
user_id: &str
) -> Result<Vec<IdentityProvider>>
pub async fn list_all_identity_providers(
&self,
user_id: &str
) -> Result<Vec<IdentityProvider>>
Listing IdPs associated with a user.
This function performs a GET
to the /api/v1/users/{userId}/idps
endpoint.
As opposed to list_identity_providers
, this function returns all the pages of the request at once.
Lists the IdPs associated with the user.
sourcepub async fn activate(
&self,
user_id: &str,
send_email: bool
) -> Result<UserActivationToken>
pub async fn activate(
&self,
user_id: &str,
send_email: bool
) -> Result<UserActivationToken>
Activate User.
This function performs a POST
to the /api/v1/users/{userId}/lifecycle/activate
endpoint.
Activates a user. This operation can only be performed on users with a STAGED
status. Activation of a user is an asynchronous operation. The user will have the transitioningToStatus
property with a value of ACTIVE
during activation to indicate that the user hasn’t completed the asynchronous operation. The user will have a status of ACTIVE
when the activation process is complete.
Parameters:
user_id: &str
send_email: bool
– Sends an activation email to the user if true.
sourcepub async fn deactivate(&self, user_id: &str, send_email: bool) -> Result<()>
pub async fn deactivate(&self, user_id: &str, send_email: bool) -> Result<()>
Deactivate User.
This function performs a POST
to the /api/v1/users/{userId}/lifecycle/deactivate
endpoint.
Deactivates a user. This operation can only be performed on users that do not have a DEPROVISIONED
status. Deactivation of a user is an asynchronous operation. The user will have the transitioningToStatus
property with a value of DEPROVISIONED
during deactivation to indicate that the user hasn’t completed the asynchronous operation. The user will have a status of DEPROVISIONED
when the deactivation process is complete.
Parameters:
user_id: &str
send_email: bool
sourcepub async fn expire_password(&self, user_id: &str) -> Result<User>
pub async fn expire_password(&self, user_id: &str) -> Result<User>
Expire Password.
This function performs a POST
to the /api/v1/users/{userId}/lifecycle/expire_password?tempPassword=false
endpoint.
This operation transitions the user to the status of PASSWORD_EXPIRED
so that the user is required to change their password at their next login.
Parameters:
user_id: &str
sourcepub async fn expire_password_and_get_temporary(
&self,
user_id: &str
) -> Result<TempPassword>
pub async fn expire_password_and_get_temporary(
&self,
user_id: &str
) -> Result<TempPassword>
Expire Password.
This function performs a POST
to the /api/v1/users/{userId}/lifecycle/expire_password?tempPassword=true
endpoint.
This operation transitions the user to the status of PASSWORD_EXPIRED
and the user’s password is reset to a temporary password that is returned.
Parameters:
user_id: &str
sourcepub async fn reactivate(
&self,
user_id: &str,
send_email: bool
) -> Result<UserActivationToken>
pub async fn reactivate(
&self,
user_id: &str,
send_email: bool
) -> Result<UserActivationToken>
Reactivate User.
This function performs a POST
to the /api/v1/users/{userId}/lifecycle/reactivate
endpoint.
Reactivates a user. This operation can only be performed on users with a PROVISIONED
status. This operation restarts the activation workflow if for some reason the user activation was not completed when using the activationToken from Activate User.
Parameters:
user_id: &str
send_email: bool
– Sends an activation email to the user if true.
sourcepub async fn reset_factors(&self, user_id: &str) -> Result<()>
pub async fn reset_factors(&self, user_id: &str) -> Result<()>
Reset Factors.
This function performs a POST
to the /api/v1/users/{userId}/lifecycle/reset_factors
endpoint.
This operation resets all factors for the specified user. All MFA factor enrollments returned to the unenrolled state. The user’s status remains ACTIVE. This link is present only if the user is currently enrolled in one or more MFA factors.
Parameters:
user_id: &str
sourcepub async fn reset_password(
&self,
user_id: &str,
send_email: bool
) -> Result<ResetPasswordToken>
pub async fn reset_password(
&self,
user_id: &str,
send_email: bool
) -> Result<ResetPasswordToken>
Reset Password.
This function performs a POST
to the /api/v1/users/{userId}/lifecycle/reset_password
endpoint.
Generates a one-time token (OTT) that can be used to reset a user’s password. The OTT link can be automatically emailed to the user or returned to the API caller and distributed using a custom flow.
Parameters:
user_id: &str
send_email: bool
sourcepub async fn suspend(&self, user_id: &str) -> Result<()>
pub async fn suspend(&self, user_id: &str) -> Result<()>
Suspend User.
This function performs a POST
to the /api/v1/users/{userId}/lifecycle/suspend
endpoint.
Suspends a user. This operation can only be performed on users with an ACTIVE
status. The user will have a status of SUSPENDED
when the process is complete.
Parameters:
user_id: &str
sourcepub async fn unlock(&self, user_id: &str) -> Result<()>
pub async fn unlock(&self, user_id: &str) -> Result<()>
Unlock User.
This function performs a POST
to the /api/v1/users/{userId}/lifecycle/unlock
endpoint.
Unlocks a user with a LOCKED_OUT
status and returns them to ACTIVE
status. Users will be able to login with their current password.
Parameters:
user_id: &str
sourcepub async fn unsuspend(&self, user_id: &str) -> Result<()>
pub async fn unsuspend(&self, user_id: &str) -> Result<()>
Unsuspend User.
This function performs a POST
to the /api/v1/users/{userId}/lifecycle/unsuspend
endpoint.
Unsuspends a user and returns them to the ACTIVE
state. This operation can only be performed on users that have a SUSPENDED
status.
Parameters:
user_id: &str
sourcepub async fn get_linked_objects_fors(
&self,
user_id: &str,
relationship_name: &str,
after: &str,
limit: i64
) -> Result<Vec<Links>>
pub async fn get_linked_objects_fors(
&self,
user_id: &str,
relationship_name: &str,
after: &str,
limit: i64
) -> Result<Vec<Links>>
This function performs a GET
to the /api/v1/users/{userId}/linkedObjects/{relationshipName}
endpoint.
Get linked objects for a user, relationshipName can be a primary or associated relationship name
Parameters:
user_id: &str
relationship_name: &str
after: &str
limit: i64
sourcepub async fn get_all_linked_objects_fors(
&self,
user_id: &str,
relationship_name: &str
) -> Result<Vec<Links>>
pub async fn get_all_linked_objects_fors(
&self,
user_id: &str,
relationship_name: &str
) -> Result<Vec<Links>>
This function performs a GET
to the /api/v1/users/{userId}/linkedObjects/{relationshipName}
endpoint.
As opposed to get_linked_objects_for
, this function returns all the pages of the request at once.
Get linked objects for a user, relationshipName can be a primary or associated relationship name
sourcepub async fn remove_linked_object_for(
&self,
user_id: &str,
relationship_name: &str
) -> Result<()>
pub async fn remove_linked_object_for(
&self,
user_id: &str,
relationship_name: &str
) -> Result<()>
This function performs a DELETE
to the /api/v1/users/{userId}/linkedObjects/{relationshipName}
endpoint.
Delete linked objects for a user, relationshipName can be ONLY a primary relationship name
Parameters:
user_id: &str
relationship_name: &str
sourcepub async fn list_assigned_roles_fors(
&self,
user_id: &str,
expand: &str
) -> Result<Vec<Role>>
pub async fn list_assigned_roles_fors(
&self,
user_id: &str,
expand: &str
) -> Result<Vec<Role>>
This function performs a GET
to the /api/v1/users/{userId}/roles
endpoint.
Lists all roles assigned to a user.
Parameters:
user_id: &str
expand: &str
sourcepub async fn list_all_assigned_roles_fors(
&self,
user_id: &str,
expand: &str
) -> Result<Vec<Role>>
pub async fn list_all_assigned_roles_fors(
&self,
user_id: &str,
expand: &str
) -> Result<Vec<Role>>
This function performs a GET
to the /api/v1/users/{userId}/roles
endpoint.
As opposed to list_assigned_roles_for
, this function returns all the pages of the request at once.
Lists all roles assigned to a user.
sourcepub async fn assign_role(
&self,
user_id: &str,
disable_notifications: &str,
body: &AssignRoleRequest
) -> Result<Role>
pub async fn assign_role(
&self,
user_id: &str,
disable_notifications: &str,
body: &AssignRoleRequest
) -> Result<Role>
This function performs a POST
to the /api/v1/users/{userId}/roles
endpoint.
Assigns a role to a user.
Parameters:
user_id: &str
disable_notifications: &str
sourcepub async fn remove_role_from(&self, user_id: &str, role_id: &str) -> Result<()>
pub async fn remove_role_from(&self, user_id: &str, role_id: &str) -> Result<()>
This function performs a DELETE
to the /api/v1/users/{userId}/roles/{roleId}
endpoint.
Unassigns a role from a user.
Parameters:
user_id: &str
role_id: &str
sourcepub async fn list_application_targets_for_administrator_roles(
&self,
user_id: &str,
role_id: &str,
after: &str,
limit: i64
) -> Result<Vec<CatalogApplication>>
pub async fn list_application_targets_for_administrator_roles(
&self,
user_id: &str,
role_id: &str,
after: &str,
limit: i64
) -> Result<Vec<CatalogApplication>>
This function performs a GET
to the /api/v1/users/{userId}/roles/{roleId}/targets/catalog/apps
endpoint.
Lists all App targets for an APP_ADMIN
Role assigned to a User. This methods return list may include full Applications or Instances. The response for an instance will have an ID
value, while Application will not have an ID.
Parameters:
user_id: &str
role_id: &str
after: &str
limit: i64
sourcepub async fn list_all_application_targets_for_administrator_roles(
&self,
user_id: &str,
role_id: &str
) -> Result<Vec<CatalogApplication>>
pub async fn list_all_application_targets_for_administrator_roles(
&self,
user_id: &str,
role_id: &str
) -> Result<Vec<CatalogApplication>>
This function performs a GET
to the /api/v1/users/{userId}/roles/{roleId}/targets/catalog/apps
endpoint.
As opposed to list_application_targets_for_administrator_role
, this function returns all the pages of the request at once.
Lists all App targets for an APP_ADMIN
Role assigned to a User. This methods return list may include full Applications or Instances. The response for an instance will have an ID
value, while Application will not have an ID.
sourcepub async fn add_all_apps_as_target_role(
&self,
user_id: &str,
role_id: &str
) -> Result<()>
pub async fn add_all_apps_as_target_role(
&self,
user_id: &str,
role_id: &str
) -> Result<()>
This function performs a PUT
to the /api/v1/users/{userId}/roles/{roleId}/targets/catalog/apps
endpoint.
Success
Parameters:
user_id: &str
role_id: &str
sourcepub async fn add_application_target_admin_role_for(
&self,
user_id: &str,
role_id: &str,
app_name: &str
) -> Result<()>
pub async fn add_application_target_admin_role_for(
&self,
user_id: &str,
role_id: &str,
app_name: &str
) -> Result<()>
This function performs a PUT
to the /api/v1/users/{userId}/roles/{roleId}/targets/catalog/apps/{appName}
endpoint.
Success
Parameters:
user_id: &str
role_id: &str
app_name: &str
sourcepub async fn remove_application_target_from_administrator_role_for(
&self,
user_id: &str,
role_id: &str,
app_name: &str
) -> Result<()>
pub async fn remove_application_target_from_administrator_role_for(
&self,
user_id: &str,
role_id: &str,
app_name: &str
) -> Result<()>
This function performs a DELETE
to the /api/v1/users/{userId}/roles/{roleId}/targets/catalog/apps/{appName}
endpoint.
Success
Parameters:
user_id: &str
role_id: &str
app_name: &str
sourcepub async fn add_application_target_app_admin_role_for(
&self,
user_id: &str,
role_id: &str,
app_name: &str,
application_id: &str
) -> Result<()>
pub async fn add_application_target_app_admin_role_for(
&self,
user_id: &str,
role_id: &str,
app_name: &str,
application_id: &str
) -> Result<()>
Add App Instance Target to App Administrator Role given to a User.
This function performs a PUT
to the /api/v1/users/{userId}/roles/{roleId}/targets/catalog/apps/{appName}/{applicationId}
endpoint.
Add App Instance Target to App Administrator Role given to a User
Parameters:
user_id: &str
role_id: &str
app_name: &str
application_id: &str
sourcepub async fn remove_application_target_from_administrator_role_for_users(
&self,
user_id: &str,
role_id: &str,
app_name: &str,
application_id: &str
) -> Result<()>
pub async fn remove_application_target_from_administrator_role_for_users(
&self,
user_id: &str,
role_id: &str,
app_name: &str,
application_id: &str
) -> Result<()>
Remove App Instance Target to App Administrator Role given to a User.
This function performs a DELETE
to the /api/v1/users/{userId}/roles/{roleId}/targets/catalog/apps/{appName}/{applicationId}
endpoint.
Remove App Instance Target to App Administrator Role given to a User
Parameters:
user_id: &str
role_id: &str
app_name: &str
application_id: &str
sourcepub async fn list_group_targets_for_roles(
&self,
user_id: &str,
role_id: &str,
after: &str,
limit: i64
) -> Result<Vec<Group>>
pub async fn list_group_targets_for_roles(
&self,
user_id: &str,
role_id: &str,
after: &str,
limit: i64
) -> Result<Vec<Group>>
This function performs a GET
to the /api/v1/users/{userId}/roles/{roleId}/targets/groups
endpoint.
Success
Parameters:
user_id: &str
role_id: &str
after: &str
limit: i64
sourcepub async fn list_all_group_targets_for_roles(
&self,
user_id: &str,
role_id: &str
) -> Result<Vec<Group>>
pub async fn list_all_group_targets_for_roles(
&self,
user_id: &str,
role_id: &str
) -> Result<Vec<Group>>
This function performs a GET
to the /api/v1/users/{userId}/roles/{roleId}/targets/groups
endpoint.
As opposed to list_group_targets_for_role
, this function returns all the pages of the request at once.
Success
sourcepub async fn add_group_target_role(
&self,
user_id: &str,
role_id: &str,
group_id: &str
) -> Result<()>
pub async fn add_group_target_role(
&self,
user_id: &str,
role_id: &str,
group_id: &str
) -> Result<()>
This function performs a PUT
to the /api/v1/users/{userId}/roles/{roleId}/targets/groups/{groupId}
endpoint.
Success
Parameters:
user_id: &str
role_id: &str
group_id: &str
sourcepub async fn remove_group_target_from_role(
&self,
user_id: &str,
role_id: &str,
group_id: &str
) -> Result<()>
pub async fn remove_group_target_from_role(
&self,
user_id: &str,
role_id: &str,
group_id: &str
) -> Result<()>
This function performs a DELETE
to the /api/v1/users/{userId}/roles/{roleId}/targets/groups/{groupId}
endpoint.
Success
Parameters:
user_id: &str
role_id: &str
group_id: &str
sourcepub async fn clear_sessions(
&self,
user_id: &str,
oauth_tokens: bool
) -> Result<()>
pub async fn clear_sessions(
&self,
user_id: &str,
oauth_tokens: bool
) -> Result<()>
This function performs a DELETE
to the /api/v1/users/{userId}/sessions
endpoint.
Removes all active identity provider sessions. This forces the user to authenticate on the next operation. Optionally revokes OpenID Connect and OAuth refresh and access tokens issued to the user.
Parameters:
user_id: &str
oauth_tokens: bool
– Revoke issued OpenID Connect and OAuth refresh and access tokens.
Auto Trait Implementations
impl !RefUnwindSafe for Users
impl Send for Users
impl Sync for Users
impl Unpin for Users
impl !UnwindSafe for Users
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> FutureExt for T
impl<T> FutureExt for T
fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more