pub struct Groups {
pub client: Client,
}
Fields
client: Client
Implementations
sourceimpl Groups
impl Groups
sourcepub async fn list(
&self,
q: &str,
search: &str,
after: &str,
limit: i64,
expand: &str
) -> Result<Vec<Group>>
pub async fn list(
&self,
q: &str,
search: &str,
after: &str,
limit: i64,
expand: &str
) -> Result<Vec<Group>>
List Groups.
This function performs a GET
to the /api/v1/groups
endpoint.
Enumerates groups in your organization with pagination. A subset of groups can be returned that match a supported filter expression or query.
Parameters:
q: &str
– Searches the name property of groups for matching value.search: &str
– Filter expression for groups.after: &str
– Specifies the pagination cursor for the next page of groups.limit: i64
– Specifies the number of group results in a page.expand: &str
– If specified, it causes additional metadata to be included in the response.
sourcepub async fn list_all(
&self,
q: &str,
search: &str,
expand: &str
) -> Result<Vec<Group>>
pub async fn list_all(
&self,
q: &str,
search: &str,
expand: &str
) -> Result<Vec<Group>>
List Groups.
This function performs a GET
to the /api/v1/groups
endpoint.
As opposed to list
, this function returns all the pages of the request at once.
Enumerates groups in your organization with pagination. A subset of groups can be returned that match a supported filter expression or query.
sourcepub async fn create(&self, body: &Group) -> Result<Group>
pub async fn create(&self, body: &Group) -> Result<Group>
Add Group.
This function performs a POST
to the /api/v1/groups
endpoint.
Adds a new group with OKTA_GROUP
type to your organization.
sourcepub async fn list_rules(
&self,
limit: i64,
after: &str,
search: &str,
expand: &str
) -> Result<Vec<GroupRule>>
pub async fn list_rules(
&self,
limit: i64,
after: &str,
search: &str,
expand: &str
) -> Result<Vec<GroupRule>>
List Group Rules.
This function performs a GET
to the /api/v1/groups/rules
endpoint.
Lists all group rules for your organization.
Parameters:
limit: i64
– Specifies the number of rule results in a page.after: &str
– Specifies the pagination cursor for the next page of rules.search: &str
– Specifies the keyword to search fules for.expand: &str
– If specified asgroupIdToGroupNameMap
, then show group names.
sourcepub async fn list_all_rules(
&self,
search: &str,
expand: &str
) -> Result<Vec<GroupRule>>
pub async fn list_all_rules(
&self,
search: &str,
expand: &str
) -> Result<Vec<GroupRule>>
List Group Rules.
This function performs a GET
to the /api/v1/groups/rules
endpoint.
As opposed to list_rules
, this function returns all the pages of the request at once.
Lists all group rules for your organization.
sourcepub async fn create_rule(&self, body: &GroupRule) -> Result<GroupRule>
pub async fn create_rule(&self, body: &GroupRule) -> Result<GroupRule>
Create Group Rule.
This function performs a POST
to the /api/v1/groups/rules
endpoint.
Creates a group rule to dynamically add users to the specified group if they match the condition
sourcepub async fn get_rule(&self, rule_id: &str, expand: &str) -> Result<GroupRule>
pub async fn get_rule(&self, rule_id: &str, expand: &str) -> Result<GroupRule>
Get Group Rule.
This function performs a GET
to the /api/v1/groups/rules/{ruleId}
endpoint.
Fetches a specific group rule by id from your organization
Parameters:
rule_id: &str
expand: &str
sourcepub async fn update_rule(
&self,
rule_id: &str,
body: &GroupRule
) -> Result<GroupRule>
pub async fn update_rule(
&self,
rule_id: &str,
body: &GroupRule
) -> Result<GroupRule>
This function performs a PUT
to the /api/v1/groups/rules/{ruleId}
endpoint.
Updates a group rule. Only INACTIVE
rules can be updated.
Parameters:
rule_id: &str
sourcepub async fn delete_rule(&self, rule_id: &str, remove_users: bool) -> Result<()>
pub async fn delete_rule(&self, rule_id: &str, remove_users: bool) -> Result<()>
Delete a group Rule.
This function performs a DELETE
to the /api/v1/groups/rules/{ruleId}
endpoint.
Removes a specific group rule by id from your organization
Parameters:
rule_id: &str
remove_users: bool
– Indicates whether to keep or remove users from groups assigned by this rule.
sourcepub async fn activate_rule(&self, rule_id: &str) -> Result<()>
pub async fn activate_rule(&self, rule_id: &str) -> Result<()>
Activate a group Rule.
This function performs a POST
to the /api/v1/groups/rules/{ruleId}/lifecycle/activate
endpoint.
Activates a specific group rule by id from your organization
Parameters:
rule_id: &str
sourcepub async fn deactivate_rule(&self, rule_id: &str) -> Result<()>
pub async fn deactivate_rule(&self, rule_id: &str) -> Result<()>
Deactivate a group Rule.
This function performs a POST
to the /api/v1/groups/rules/{ruleId}/lifecycle/deactivate
endpoint.
Deactivates a specific group rule by id from your organization
Parameters:
rule_id: &str
sourcepub async fn get(&self, group_id: &str) -> Result<Group>
pub async fn get(&self, group_id: &str) -> Result<Group>
List Group Rules.
This function performs a GET
to the /api/v1/groups/{groupId}
endpoint.
Lists all group rules for your organization.
Parameters:
group_id: &str
sourcepub async fn update(&self, group_id: &str, body: &Group) -> Result<Group>
pub async fn update(&self, group_id: &str, body: &Group) -> Result<Group>
Update Group.
This function performs a PUT
to the /api/v1/groups/{groupId}
endpoint.
Updates the profile for a group with OKTA_GROUP
type from your organization.
Parameters:
group_id: &str
sourcepub async fn delete(&self, group_id: &str) -> Result<()>
pub async fn delete(&self, group_id: &str) -> Result<()>
Remove Group.
This function performs a DELETE
to the /api/v1/groups/{groupId}
endpoint.
Removes a group with OKTA_GROUP
type from your organization.
Parameters:
group_id: &str
sourcepub async fn list_assigned_applications_fors(
&self,
group_id: &str,
after: &str,
limit: i64
) -> Result<Vec<Application>>
pub async fn list_assigned_applications_fors(
&self,
group_id: &str,
after: &str,
limit: i64
) -> Result<Vec<Application>>
List Assigned Applications.
This function performs a GET
to the /api/v1/groups/{groupId}/apps
endpoint.
Enumerates all applications that are assigned to a group.
Parameters:
group_id: &str
after: &str
– Specifies the pagination cursor for the next page of apps.limit: i64
– Specifies the number of app results for a page.
sourcepub async fn list_all_assigned_applications_fors(
&self,
group_id: &str
) -> Result<Vec<Application>>
pub async fn list_all_assigned_applications_fors(
&self,
group_id: &str
) -> Result<Vec<Application>>
List Assigned Applications.
This function performs a GET
to the /api/v1/groups/{groupId}/apps
endpoint.
As opposed to list_assigned_applications_for
, this function returns all the pages of the request at once.
Enumerates all applications that are assigned to a group.
sourcepub async fn list_assigned_roles(
&self,
group_id: &str,
expand: &str
) -> Result<Vec<Role>>
pub async fn list_assigned_roles(
&self,
group_id: &str,
expand: &str
) -> Result<Vec<Role>>
This function performs a GET
to the /api/v1/groups/{groupId}/roles
endpoint.
Success
Parameters:
group_id: &str
expand: &str
sourcepub async fn list_all_assigned_roles(
&self,
group_id: &str,
expand: &str
) -> Result<Vec<Role>>
pub async fn list_all_assigned_roles(
&self,
group_id: &str,
expand: &str
) -> Result<Vec<Role>>
This function performs a GET
to the /api/v1/groups/{groupId}/roles
endpoint.
As opposed to list_assigned_roles
, this function returns all the pages of the request at once.
Success
sourcepub async fn assign_role(
&self,
group_id: &str,
disable_notifications: &str,
body: &AssignRoleRequest
) -> Result<Role>
pub async fn assign_role(
&self,
group_id: &str,
disable_notifications: &str,
body: &AssignRoleRequest
) -> Result<Role>
This function performs a POST
to the /api/v1/groups/{groupId}/roles
endpoint.
Assigns a Role to a Group
Parameters:
group_id: &str
disable_notifications: &str
sourcepub async fn get_role(&self, group_id: &str, role_id: &str) -> Result<Role>
pub async fn get_role(&self, group_id: &str, role_id: &str) -> Result<Role>
This function performs a GET
to the /api/v1/groups/{groupId}/roles/{roleId}
endpoint.
Success
Parameters:
group_id: &str
role_id: &str
sourcepub async fn remove_role_from(
&self,
group_id: &str,
role_id: &str
) -> Result<()>
pub async fn remove_role_from(
&self,
group_id: &str,
role_id: &str
) -> Result<()>
This function performs a DELETE
to the /api/v1/groups/{groupId}/roles/{roleId}
endpoint.
Unassigns a Role from a Group
Parameters:
group_id: &str
role_id: &str
sourcepub async fn list_application_targets_for_administrator_roles(
&self,
group_id: &str,
role_id: &str,
after: &str,
limit: i64
) -> Result<Vec<CatalogApplication>>
pub async fn list_application_targets_for_administrator_roles(
&self,
group_id: &str,
role_id: &str,
after: &str,
limit: i64
) -> Result<Vec<CatalogApplication>>
This function performs a GET
to the /api/v1/groups/{groupId}/roles/{roleId}/targets/catalog/apps
endpoint.
Lists all App targets for an APP_ADMIN
Role assigned to a Group. 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:
group_id: &str
role_id: &str
after: &str
limit: i64
sourcepub async fn list_all_application_targets_for_administrator_roles(
&self,
group_id: &str,
role_id: &str
) -> Result<Vec<CatalogApplication>>
pub async fn list_all_application_targets_for_administrator_roles(
&self,
group_id: &str,
role_id: &str
) -> Result<Vec<CatalogApplication>>
This function performs a GET
to the /api/v1/groups/{groupId}/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 Group. 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_application_target_admin_role_given(
&self,
group_id: &str,
role_id: &str,
app_name: &str
) -> Result<()>
pub async fn add_application_target_admin_role_given(
&self,
group_id: &str,
role_id: &str,
app_name: &str
) -> Result<()>
This function performs a PUT
to the /api/v1/groups/{groupId}/roles/{roleId}/targets/catalog/apps/{appName}
endpoint.
Success
Parameters:
group_id: &str
role_id: &str
app_name: &str
sourcepub async fn remove_application_target_from_administrator_role_given(
&self,
group_id: &str,
role_id: &str,
app_name: &str
) -> Result<()>
pub async fn remove_application_target_from_administrator_role_given(
&self,
group_id: &str,
role_id: &str,
app_name: &str
) -> Result<()>
This function performs a DELETE
to the /api/v1/groups/{groupId}/roles/{roleId}/targets/catalog/apps/{appName}
endpoint.
Success
Parameters:
group_id: &str
role_id: &str
app_name: &str
sourcepub async fn add_application_instance_target_app_admin_role_given(
&self,
group_id: &str,
role_id: &str,
app_name: &str,
application_id: &str
) -> Result<()>
pub async fn add_application_instance_target_app_admin_role_given(
&self,
group_id: &str,
role_id: &str,
app_name: &str,
application_id: &str
) -> Result<()>
Add App Instance Target to App Administrator Role given to a Group.
This function performs a PUT
to the /api/v1/groups/{groupId}/roles/{roleId}/targets/catalog/apps/{appName}/{applicationId}
endpoint.
Add App Instance Target to App Administrator Role given to a Group
Parameters:
group_id: &str
role_id: &str
app_name: &str
application_id: &str
sourcepub async fn remove_application_target_from_administrator_role_given_groups(
&self,
group_id: &str,
role_id: &str,
app_name: &str,
application_id: &str
) -> Result<()>
pub async fn remove_application_target_from_administrator_role_given_groups(
&self,
group_id: &str,
role_id: &str,
app_name: &str,
application_id: &str
) -> Result<()>
Remove App Instance Target to App Administrator Role given to a Group.
This function performs a DELETE
to the /api/v1/groups/{groupId}/roles/{roleId}/targets/catalog/apps/{appName}/{applicationId}
endpoint.
Remove App Instance Target to App Administrator Role given to a Group
Parameters:
group_id: &str
role_id: &str
app_name: &str
application_id: &str
sourcepub async fn list_targets_for_roles(
&self,
group_id: &str,
role_id: &str,
after: &str,
limit: i64
) -> Result<Vec<Group>>
pub async fn list_targets_for_roles(
&self,
group_id: &str,
role_id: &str,
after: &str,
limit: i64
) -> Result<Vec<Group>>
This function performs a GET
to the /api/v1/groups/{groupId}/roles/{roleId}/targets/groups
endpoint.
Success
Parameters:
group_id: &str
role_id: &str
after: &str
limit: i64
sourcepub async fn list_all_targets_for_roles(
&self,
group_id: &str,
role_id: &str
) -> Result<Vec<Group>>
pub async fn list_all_targets_for_roles(
&self,
group_id: &str,
role_id: &str
) -> Result<Vec<Group>>
This function performs a GET
to the /api/v1/groups/{groupId}/roles/{roleId}/targets/groups
endpoint.
As opposed to list_targets_for_role
, this function returns all the pages of the request at once.
Success
sourcepub async fn add_target_administrator_role_for(
&self,
group_id: &str,
role_id: &str,
target_group_id: &str
) -> Result<()>
pub async fn add_target_administrator_role_for(
&self,
group_id: &str,
role_id: &str,
target_group_id: &str
) -> Result<()>
This function performs a PUT
to the /api/v1/groups/{groupId}/roles/{roleId}/targets/groups/{targetGroupId}
endpoint.
Parameters:
group_id: &str
role_id: &str
target_group_id: &str
sourcepub async fn remove_target_from_administrator_role_given(
&self,
group_id: &str,
role_id: &str,
target_group_id: &str
) -> Result<()>
pub async fn remove_target_from_administrator_role_given(
&self,
group_id: &str,
role_id: &str,
target_group_id: &str
) -> Result<()>
This function performs a DELETE
to the /api/v1/groups/{groupId}/roles/{roleId}/targets/groups/{targetGroupId}
endpoint.
Parameters:
group_id: &str
role_id: &str
target_group_id: &str
sourcepub async fn list_users(
&self,
group_id: &str,
after: &str,
limit: i64
) -> Result<Vec<User>>
pub async fn list_users(
&self,
group_id: &str,
after: &str,
limit: i64
) -> Result<Vec<User>>
List Group Members.
This function performs a GET
to the /api/v1/groups/{groupId}/users
endpoint.
Enumerates all users that are a member of a group.
Parameters:
group_id: &str
after: &str
– Specifies the pagination cursor for the next page of users.limit: i64
– Specifies the number of user results in a page.
sourcepub async fn list_all_users(&self, group_id: &str) -> Result<Vec<User>>
pub async fn list_all_users(&self, group_id: &str) -> Result<Vec<User>>
List Group Members.
This function performs a GET
to the /api/v1/groups/{groupId}/users
endpoint.
As opposed to list_users
, this function returns all the pages of the request at once.
Enumerates all users that are a member of a group.
Auto Trait Implementations
impl !RefUnwindSafe for Groups
impl Send for Groups
impl Sync for Groups
impl Unpin for Groups
impl !UnwindSafe for Groups
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