Package com.okta.sdk.resource.api
Class GroupRuleApi
java.lang.Object
com.okta.sdk.resource.api.GroupRuleApi
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
date="2026-03-13T17:36:05.533634+05:30[Asia/Kolkata]",
comments="Generator version: 7.15.0")
public class GroupRuleApi
extends Object
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivateGroupRule(String groupRuleId) Activate a group rule Activates a specific group rule by ID from your orgvoidactivateGroupRule(String groupRuleId, Map<String, String> additionalHeaders) Activate a group rule Activates a specific group rule by ID from your orgcreateGroupRule(CreateGroupRuleRequest groupRule) Create a group rule Creates a group rule to dynamically add users to the specified group if they match the condition.createGroupRule(CreateGroupRuleRequest groupRule, Map<String, String> additionalHeaders) Create a group rule Creates a group rule to dynamically add users to the specified group if they match the condition.voiddeactivateGroupRule(String groupRuleId) Deactivate a group rule Deactivates a specific group rule by ID from your orgvoiddeactivateGroupRule(String groupRuleId, Map<String, String> additionalHeaders) Deactivate a group rule Deactivates a specific group rule by ID from your orgvoiddeleteGroupRule(String groupRuleId, Boolean removeUsers) Delete a group rule Deletes a specific group rule by `groupRuleId`voidDelete a group rule Deletes a specific group rule by `groupRuleId`getGroupRule(String groupRuleId, String expand) Retrieve a group rule Retrieves a specific group rule by ID from your orgRetrieve a group rule Retrieves a specific group rule by ID from your orgprotected static com.fasterxml.jackson.databind.ObjectMapperlistGroupRules(Integer limit, String after, String search, String expand) List all group rules Lists all group rules for your orglistGroupRules(Integer limit, String after, String search, String expand, Map<String, String> additionalHeaders) List all group rules Lists all group rules for your orglistGroupRulesPaged(Integer limit, String after, String search, String expand) List all group rules (Paginated) Lists all group rules for your org This method returns a lazy, paginated iterable that automatically handles pagination.listGroupRulesPaged(Integer limit, String after, String search, String expand, Map<String, String> additionalHeaders) List all group rules (Paginated with additional headers) Lists all group rules for your org This method returns a lazy, paginated iterable that automatically handles pagination.replaceGroupRule(String groupRuleId, GroupRule groupRule) Replace a group rule Replaces a group rule > **Notes:** You can only update rules with a group whose status is set to `INACTIVE`.Replace a group rule Replaces a group rule > **Notes:** You can only update rules with a group whose status is set to `INACTIVE`.voidsetApiClient(ApiClient apiClient)
-
Constructor Details
-
GroupRuleApi
public GroupRuleApi() -
GroupRuleApi
-
-
Method Details
-
getApiClient
-
setApiClient
-
activateGroupRule
Activate a group rule Activates a specific group rule by ID from your org- Parameters:
groupRuleId- The `id` of the group rule (required)- Throws:
ApiException- if fails to make API call
-
activateGroupRule
public void activateGroupRule(String groupRuleId, Map<String, String> additionalHeaders) throws ApiExceptionActivate a group rule Activates a specific group rule by ID from your org- Parameters:
groupRuleId- The `id` of the group rule (required)additionalHeaders- additionalHeaders for this call- Throws:
ApiException- if fails to make API call
-
createGroupRule
Create a group rule Creates a group rule to dynamically add users to the specified group if they match the condition. > **Note:** Group rules are created with the status set to `'INACTIVE'`.- Parameters:
groupRule- (required)- Returns:
- GroupRule
- Throws:
ApiException- if fails to make API call
-
createGroupRule
public GroupRule createGroupRule(CreateGroupRuleRequest groupRule, Map<String, String> additionalHeaders) throws ApiExceptionCreate a group rule Creates a group rule to dynamically add users to the specified group if they match the condition. > **Note:** Group rules are created with the status set to `'INACTIVE'`.- Parameters:
groupRule- (required)additionalHeaders- additionalHeaders for this call- Returns:
- GroupRule
- Throws:
ApiException- if fails to make API call
-
deactivateGroupRule
Deactivate a group rule Deactivates a specific group rule by ID from your org- Parameters:
groupRuleId- The `id` of the group rule (required)- Throws:
ApiException- if fails to make API call
-
deactivateGroupRule
public void deactivateGroupRule(String groupRuleId, Map<String, String> additionalHeaders) throws ApiExceptionDeactivate a group rule Deactivates a specific group rule by ID from your org- Parameters:
groupRuleId- The `id` of the group rule (required)additionalHeaders- additionalHeaders for this call- Throws:
ApiException- if fails to make API call
-
deleteGroupRule
Delete a group rule Deletes a specific group rule by `groupRuleId`- Parameters:
groupRuleId- The `id` of the group rule (required)removeUsers- If set to `true`, removes users from groups assigned by this rule (optional, default to false)- Throws:
ApiException- if fails to make API call
-
deleteGroupRule
public void deleteGroupRule(String groupRuleId, Boolean removeUsers, Map<String, String> additionalHeaders) throws ApiExceptionDelete a group rule Deletes a specific group rule by `groupRuleId`- Parameters:
groupRuleId- The `id` of the group rule (required)removeUsers- If set to `true`, removes users from groups assigned by this rule (optional, default to false)additionalHeaders- additionalHeaders for this call- Throws:
ApiException- if fails to make API call
-
getGroupRule
Retrieve a group rule Retrieves a specific group rule by ID from your org- Parameters:
groupRuleId- The `id` of the group rule (required)expand- If specified as `groupIdToGroupNameMap`, then show group names (optional)- Returns:
- GroupRule
- Throws:
ApiException- if fails to make API call
-
getGroupRule
public GroupRule getGroupRule(String groupRuleId, String expand, Map<String, String> additionalHeaders) throws ApiExceptionRetrieve a group rule Retrieves a specific group rule by ID from your org- Parameters:
groupRuleId- The `id` of the group rule (required)expand- If specified as `groupIdToGroupNameMap`, then show group names (optional)additionalHeaders- additionalHeaders for this call- Returns:
- GroupRule
- Throws:
ApiException- if fails to make API call
-
listGroupRules
public List<GroupRule> listGroupRules(Integer limit, String after, String search, String expand) throws ApiException List all group rules Lists all group rules for your org- Parameters:
limit- Specifies the number of rule results in a page (optional, default to 50)after- Specifies the pagination cursor for the next page of rules (optional)search- Specifies the keyword to search rules for (optional)expand- If specified as `groupIdToGroupNameMap`, then displays group names (optional)- Returns:
- List<GroupRule>
- Throws:
ApiException- if fails to make API call
-
listGroupRules
public List<GroupRule> listGroupRules(Integer limit, String after, String search, String expand, Map<String, String> additionalHeaders) throws ApiExceptionList all group rules Lists all group rules for your org- Parameters:
limit- Specifies the number of rule results in a page (optional, default to 50)after- Specifies the pagination cursor for the next page of rules (optional)search- Specifies the keyword to search rules for (optional)expand- If specified as `groupIdToGroupNameMap`, then displays group names (optional)additionalHeaders- additionalHeaders for this call- Returns:
- List<GroupRule>
- Throws:
ApiException- if fails to make API call
-
listGroupRulesPaged
public Iterable<GroupRule> listGroupRulesPaged(Integer limit, String after, String search, String expand) List all group rules (Paginated) Lists all group rules for your org This method returns a lazy, paginated iterable that automatically handles pagination. It is thread-safe and does not cause memory leaks. Use this method in a for-each loop to automatically fetch all pages without manual cursor management.- Parameters:
limit- Specifies the number of rule results in a page (optional, default to 50)after- Specifies the pagination cursor for the next page of rules (optional)search- Specifies the keyword to search rules for (optional)expand- If specified as `groupIdToGroupNameMap`, then displays group names (optional)- Returns:
- Iterable<GroupRule> lazy iterable over all pages
-
listGroupRulesPaged
public Iterable<GroupRule> listGroupRulesPaged(Integer limit, String after, String search, String expand, Map<String, String> additionalHeaders) List all group rules (Paginated with additional headers) Lists all group rules for your org This method returns a lazy, paginated iterable that automatically handles pagination. It is thread-safe and does not cause memory leaks.- Parameters:
limit- Specifies the number of rule results in a page (optional, default to 50)after- Specifies the pagination cursor for the next page of rules (optional)search- Specifies the keyword to search rules for (optional)expand- If specified as `groupIdToGroupNameMap`, then displays group names (optional)additionalHeaders- additional headers for this call- Returns:
- Iterable<GroupRule> lazy iterable over all pages
-
replaceGroupRule
Replace a group rule Replaces a group rule > **Notes:** You can only update rules with a group whose status is set to `INACTIVE`. > > You currently can't update the `actions` section.- Parameters:
groupRuleId- The `id` of the group rule (required)groupRule- (required)- Returns:
- GroupRule
- Throws:
ApiException- if fails to make API call
-
replaceGroupRule
public GroupRule replaceGroupRule(String groupRuleId, GroupRule groupRule, Map<String, String> additionalHeaders) throws ApiExceptionReplace a group rule Replaces a group rule > **Notes:** You can only update rules with a group whose status is set to `INACTIVE`. > > You currently can't update the `actions` section.- Parameters:
groupRuleId- The `id` of the group rule (required)groupRule- (required)additionalHeaders- additionalHeaders for this call- Returns:
- GroupRule
- Throws:
ApiException- if fails to make API call
-
getObjectMapper
protected static com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
-