Package com.okta.sdk.resource.api
Class RoleApi
java.lang.Object
com.okta.sdk.resource.api.RoleApi
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
date="2024-08-09T14:19:33.269913-05:00[America/Chicago]",
comments="Generator version: 7.7.0")
public class RoleApi
extends Object
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateRole
(CreateIamRoleRequest instance) Create a Role Creates a new rolecreateRole
(CreateIamRoleRequest instance, Map<String, String> additionalHeaders) Create a Role Creates a new rolevoid
createRolePermission
(String roleIdOrLabel, String permissionType, CreateUpdateIamRolePermissionRequest instance) Create a Permission Creates a permission specified by `permissionType` to the rolevoid
createRolePermission
(String roleIdOrLabel, String permissionType, CreateUpdateIamRolePermissionRequest instance, Map<String, String> additionalHeaders) Create a Permission Creates a permission specified by `permissionType` to the rolevoid
deleteRole
(String roleIdOrLabel) Delete a Role Deletes a role by `roleIdOrLabel`void
deleteRole
(String roleIdOrLabel, Map<String, String> additionalHeaders) Delete a Role Deletes a role by `roleIdOrLabel`void
deleteRolePermission
(String roleIdOrLabel, String permissionType) Delete a Permission Deletes a permission from a role by `permissionType`void
deleteRolePermission
(String roleIdOrLabel, String permissionType, Map<String, String> additionalHeaders) Delete a Permission Deletes a permission from a role by `permissionType`protected static com.fasterxml.jackson.databind.ObjectMapper
Retrieve a Role Retrieves a role by `roleIdOrLabel`Retrieve a Role Retrieves a role by `roleIdOrLabel`getRolePermission
(String roleIdOrLabel, String permissionType) Retrieve a Permission Retrieves a permission by `permissionType`getRolePermission
(String roleIdOrLabel, String permissionType, Map<String, String> additionalHeaders) Retrieve a Permission Retrieves a permission by `permissionType`listRolePermissions
(String roleIdOrLabel) List all Permissions Lists all permissions of the role by `roleIdOrLabel`listRolePermissions
(String roleIdOrLabel, Map<String, String> additionalHeaders) List all Permissions Lists all permissions of the role by `roleIdOrLabel`List all Roles Lists all roles with pagination supportList all Roles Lists all roles with pagination supportreplaceRole
(String roleIdOrLabel, UpdateIamRoleRequest instance) Replace a Role Replaces a role by `roleIdOrLabel`replaceRole
(String roleIdOrLabel, UpdateIamRoleRequest instance, Map<String, String> additionalHeaders) Replace a Role Replaces a role by `roleIdOrLabel`replaceRolePermission
(String roleIdOrLabel, String permissionType, CreateUpdateIamRolePermissionRequest instance) Replace a Permission Replaces a permission specified by `permissionType` in the rolereplaceRolePermission
(String roleIdOrLabel, String permissionType, CreateUpdateIamRolePermissionRequest instance, Map<String, String> additionalHeaders) Replace a Permission Replaces a permission specified by `permissionType` in the rolevoid
setApiClient
(ApiClient apiClient)
-
Constructor Details
-
RoleApi
public RoleApi() -
RoleApi
-
-
Method Details
-
getApiClient
-
setApiClient
-
createRole
Create a Role Creates a new role- Parameters:
instance
- (required)- Returns:
- IamRole
- Throws:
ApiException
- if fails to make API call
-
createRole
public IamRole createRole(CreateIamRoleRequest instance, Map<String, String> additionalHeaders) throws ApiExceptionCreate a Role Creates a new role- Parameters:
instance
- (required)additionalHeaders
- additionalHeaders for this call- Returns:
- IamRole
- Throws:
ApiException
- if fails to make API call
-
createRolePermission
public void createRolePermission(String roleIdOrLabel, String permissionType, CreateUpdateIamRolePermissionRequest instance) throws ApiException Create a Permission Creates a permission specified by `permissionType` to the role- Parameters:
roleIdOrLabel
- `id` or `label` of the role (required)permissionType
- An okta permission type (required)instance
- (optional)- Throws:
ApiException
- if fails to make API call
-
createRolePermission
public void createRolePermission(String roleIdOrLabel, String permissionType, CreateUpdateIamRolePermissionRequest instance, Map<String, String> additionalHeaders) throws ApiExceptionCreate a Permission Creates a permission specified by `permissionType` to the role- Parameters:
roleIdOrLabel
- `id` or `label` of the role (required)permissionType
- An okta permission type (required)instance
- (optional)additionalHeaders
- additionalHeaders for this call- Throws:
ApiException
- if fails to make API call
-
deleteRole
Delete a Role Deletes a role by `roleIdOrLabel`- Parameters:
roleIdOrLabel
- `id` or `label` of the role (required)- Throws:
ApiException
- if fails to make API call
-
deleteRole
public void deleteRole(String roleIdOrLabel, Map<String, String> additionalHeaders) throws ApiExceptionDelete a Role Deletes a role by `roleIdOrLabel`- Parameters:
roleIdOrLabel
- `id` or `label` of the role (required)additionalHeaders
- additionalHeaders for this call- Throws:
ApiException
- if fails to make API call
-
deleteRolePermission
Delete a Permission Deletes a permission from a role by `permissionType`- Parameters:
roleIdOrLabel
- `id` or `label` of the role (required)permissionType
- An okta permission type (required)- Throws:
ApiException
- if fails to make API call
-
deleteRolePermission
public void deleteRolePermission(String roleIdOrLabel, String permissionType, Map<String, String> additionalHeaders) throws ApiExceptionDelete a Permission Deletes a permission from a role by `permissionType`- Parameters:
roleIdOrLabel
- `id` or `label` of the role (required)permissionType
- An okta permission type (required)additionalHeaders
- additionalHeaders for this call- Throws:
ApiException
- if fails to make API call
-
getRole
Retrieve a Role Retrieves a role by `roleIdOrLabel`- Parameters:
roleIdOrLabel
- `id` or `label` of the role (required)- Returns:
- IamRole
- Throws:
ApiException
- if fails to make API call
-
getRole
public IamRole getRole(String roleIdOrLabel, Map<String, String> additionalHeaders) throws ApiExceptionRetrieve a Role Retrieves a role by `roleIdOrLabel`- Parameters:
roleIdOrLabel
- `id` or `label` of the role (required)additionalHeaders
- additionalHeaders for this call- Returns:
- IamRole
- Throws:
ApiException
- if fails to make API call
-
getRolePermission
public Permission getRolePermission(String roleIdOrLabel, String permissionType) throws ApiException Retrieve a Permission Retrieves a permission by `permissionType`- Parameters:
roleIdOrLabel
- `id` or `label` of the role (required)permissionType
- An okta permission type (required)- Returns:
- Permission
- Throws:
ApiException
- if fails to make API call
-
getRolePermission
public Permission getRolePermission(String roleIdOrLabel, String permissionType, Map<String, String> additionalHeaders) throws ApiExceptionRetrieve a Permission Retrieves a permission by `permissionType`- Parameters:
roleIdOrLabel
- `id` or `label` of the role (required)permissionType
- An okta permission type (required)additionalHeaders
- additionalHeaders for this call- Returns:
- Permission
- Throws:
ApiException
- if fails to make API call
-
listRolePermissions
List all Permissions Lists all permissions of the role by `roleIdOrLabel`- Parameters:
roleIdOrLabel
- `id` or `label` of the role (required)- Returns:
- Permissions
- Throws:
ApiException
- if fails to make API call
-
listRolePermissions
public Permissions listRolePermissions(String roleIdOrLabel, Map<String, String> additionalHeaders) throws ApiExceptionList all Permissions Lists all permissions of the role by `roleIdOrLabel`- Parameters:
roleIdOrLabel
- `id` or `label` of the role (required)additionalHeaders
- additionalHeaders for this call- Returns:
- Permissions
- Throws:
ApiException
- if fails to make API call
-
listRoles
List all Roles Lists all roles with pagination support- Parameters:
after
- The cursor to use for pagination. It is an opaque string that specifies your current location in the list and is obtained from the `Link` response header. See [Pagination](/#pagination). (optional)- Returns:
- IamRoles
- Throws:
ApiException
- if fails to make API call
-
listRoles
List all Roles Lists all roles with pagination support- Parameters:
after
- The cursor to use for pagination. It is an opaque string that specifies your current location in the list and is obtained from the `Link` response header. See [Pagination](/#pagination). (optional)additionalHeaders
- additionalHeaders for this call- Returns:
- IamRoles
- Throws:
ApiException
- if fails to make API call
-
replaceRole
Replace a Role Replaces a role by `roleIdOrLabel`- Parameters:
roleIdOrLabel
- `id` or `label` of the role (required)instance
- (required)- Returns:
- IamRole
- Throws:
ApiException
- if fails to make API call
-
replaceRole
public IamRole replaceRole(String roleIdOrLabel, UpdateIamRoleRequest instance, Map<String, String> additionalHeaders) throws ApiExceptionReplace a Role Replaces a role by `roleIdOrLabel`- Parameters:
roleIdOrLabel
- `id` or `label` of the role (required)instance
- (required)additionalHeaders
- additionalHeaders for this call- Returns:
- IamRole
- Throws:
ApiException
- if fails to make API call
-
replaceRolePermission
public Permission replaceRolePermission(String roleIdOrLabel, String permissionType, CreateUpdateIamRolePermissionRequest instance) throws ApiException Replace a Permission Replaces a permission specified by `permissionType` in the role- Parameters:
roleIdOrLabel
- `id` or `label` of the role (required)permissionType
- An okta permission type (required)instance
- (optional)- Returns:
- Permission
- Throws:
ApiException
- if fails to make API call
-
replaceRolePermission
public Permission replaceRolePermission(String roleIdOrLabel, String permissionType, CreateUpdateIamRolePermissionRequest instance, Map<String, String> additionalHeaders) throws ApiExceptionReplace a Permission Replaces a permission specified by `permissionType` in the role- Parameters:
roleIdOrLabel
- `id` or `label` of the role (required)permissionType
- An okta permission type (required)instance
- (optional)additionalHeaders
- additionalHeaders for this call- Returns:
- Permission
- Throws:
ApiException
- if fails to make API call
-
getObjectMapper
protected static com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
-