Class RoleApi

java.lang.Object
com.okta.sdk.resource.api.RoleApi

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2024-03-29T16:47:02.065887-05:00[America/Chicago]", comments="Generator version: 7.4.0") public class RoleApi extends Object
  • Constructor Details

    • RoleApi

      public RoleApi()
    • RoleApi

      public RoleApi(ApiClient apiClient)
  • Method Details

    • getApiClient

      public ApiClient getApiClient()
    • setApiClient

      public void setApiClient(ApiClient apiClient)
    • createRole

      public IamRole createRole(CreateIamRoleRequest instance) throws ApiException
      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 ApiException
      Create 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 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)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • deleteRole

      public void deleteRole(String roleIdOrLabel) throws ApiException
      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 ApiException
      Delete 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

      public void deleteRolePermission(String roleIdOrLabel, String permissionType) throws ApiException
      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 ApiException
      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)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • getRole

      public IamRole getRole(String roleIdOrLabel) throws ApiException
      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 ApiException
      Retrieve 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 ApiException
      Retrieve 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

      public Permissions listRolePermissions(String roleIdOrLabel) throws ApiException
      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 ApiException
      List 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

      public IamRoles listRoles(String after) throws ApiException
      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) for more information. (optional)
      Returns:
      IamRoles
      Throws:
      ApiException - if fails to make API call
    • listRoles

      public IamRoles listRoles(String after, Map<String,String> additionalHeaders) throws ApiException
      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) for more information. (optional)
      additionalHeaders - additionalHeaders for this call
      Returns:
      IamRoles
      Throws:
      ApiException - if fails to make API call
    • replaceRole

      public IamRole replaceRole(String roleIdOrLabel, UpdateIamRoleRequest instance) throws ApiException
      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 ApiException
      Replace 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 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)
      additionalHeaders - additionalHeaders for this call
      Returns:
      Permission
      Throws:
      ApiException - if fails to make API call
    • getObjectMapper

      protected static com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()