Class RoleAssignmentClientApi

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

@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 RoleAssignmentClientApi extends Object
  • Constructor Details

    • RoleAssignmentClientApi

      public RoleAssignmentClientApi()
    • RoleAssignmentClientApi

      public RoleAssignmentClientApi(ApiClient apiClient)
  • Method Details

    • getApiClient

      public ApiClient getApiClient()
    • setApiClient

      public void setApiClient(ApiClient apiClient)
    • assignRoleToClient

      public AssignRoleToClient200Response assignRoleToClient(String clientId, AssignRoleToClientRequest assignRoleToClientRequest) throws ApiException
      Assign a client role Assigns a [standard role](/openapi/okta-management/guides/roles/#standard-roles) to a client app. You can also assign a custom role to a client app, but the preferred method to assign a custom role to a client is to create a binding between the custom role, the resource set, and the client app. See [Create a role resource set binding](/openapi/okta-management/management/tag/RoleDResourceSetBinding/#tag/RoleDResourceSetBinding/operation/createResourceSetBinding). > **Notes:** > * The request payload is different for standard and custom role assignments. > * For IAM-based standard role assignments, use the request payload for standard roles. However, the response payload for IAM-based role assignments is similar to the custom role's assignment response.
      Parameters:
      clientId - `client_id` of the app (required)
      assignRoleToClientRequest - (required)
      Returns:
      AssignRoleToClient200Response
      Throws:
      ApiException - if fails to make API call
    • assignRoleToClient

      public AssignRoleToClient200Response assignRoleToClient(String clientId, AssignRoleToClientRequest assignRoleToClientRequest, Map<String,String> additionalHeaders) throws ApiException
      Assign a client role Assigns a [standard role](/openapi/okta-management/guides/roles/#standard-roles) to a client app. You can also assign a custom role to a client app, but the preferred method to assign a custom role to a client is to create a binding between the custom role, the resource set, and the client app. See [Create a role resource set binding](/openapi/okta-management/management/tag/RoleDResourceSetBinding/#tag/RoleDResourceSetBinding/operation/createResourceSetBinding). > **Notes:** > * The request payload is different for standard and custom role assignments. > * For IAM-based standard role assignments, use the request payload for standard roles. However, the response payload for IAM-based role assignments is similar to the custom role's assignment response.
      Parameters:
      clientId - `client_id` of the app (required)
      assignRoleToClientRequest - (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      AssignRoleToClient200Response
      Throws:
      ApiException - if fails to make API call
    • deleteRoleFromClient

      public void deleteRoleFromClient(String clientId, String roleAssignmentId) throws ApiException
      Unassign a client role Unassigns a role assignment (identified by `roleAssignmentId`) from a client app (identified by `clientId`)
      Parameters:
      clientId - `client_id` of the app (required)
      roleAssignmentId - The `id` of the role assignment (required)
      Throws:
      ApiException - if fails to make API call
    • deleteRoleFromClient

      public void deleteRoleFromClient(String clientId, String roleAssignmentId, Map<String,String> additionalHeaders) throws ApiException
      Unassign a client role Unassigns a role assignment (identified by `roleAssignmentId`) from a client app (identified by `clientId`)
      Parameters:
      clientId - `client_id` of the app (required)
      roleAssignmentId - The `id` of the role assignment (required)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • listRolesForClient

      public List<ListRolesForClient200ResponseInner> listRolesForClient(String clientId) throws ApiException
      List all client role assignments Lists all roles assigned to a client app identified by `clientId`
      Parameters:
      clientId - `client_id` of the app (required)
      Returns:
      List<ListRolesForClient200ResponseInner>
      Throws:
      ApiException - if fails to make API call
    • listRolesForClient

      public List<ListRolesForClient200ResponseInner> listRolesForClient(String clientId, Map<String,String> additionalHeaders) throws ApiException
      List all client role assignments Lists all roles assigned to a client app identified by `clientId`
      Parameters:
      clientId - `client_id` of the app (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      List<ListRolesForClient200ResponseInner>
      Throws:
      ApiException - if fails to make API call
    • listRolesForClientPaged

      public Iterable<ListRolesForClient200ResponseInner> listRolesForClientPaged(String clientId)
      List all client role assignments (Paginated) Lists all roles assigned to a client app identified by `clientId` 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:
      clientId - `client_id` of the app (required)
      Returns:
      Iterable<ListRolesForClient200ResponseInner> lazy iterable over all pages
    • listRolesForClientPaged

      public Iterable<ListRolesForClient200ResponseInner> listRolesForClientPaged(String clientId, Map<String,String> additionalHeaders)
      List all client role assignments (Paginated with additional headers) Lists all roles assigned to a client app identified by `clientId` This method returns a lazy, paginated iterable that automatically handles pagination. It is thread-safe and does not cause memory leaks.
      Parameters:
      clientId - `client_id` of the app (required)
      additionalHeaders - additional headers for this call
      Returns:
      Iterable<ListRolesForClient200ResponseInner> lazy iterable over all pages
    • retrieveClientRole

      public AssignRoleToClient200Response retrieveClientRole(String clientId, String roleAssignmentId) throws ApiException
      Retrieve a client role Retrieves a role assignment (identified by `roleAssignmentId`) for a client app (identified by `clientId`)
      Parameters:
      clientId - `client_id` of the app (required)
      roleAssignmentId - The `id` of the role assignment (required)
      Returns:
      AssignRoleToClient200Response
      Throws:
      ApiException - if fails to make API call
    • retrieveClientRole

      public AssignRoleToClient200Response retrieveClientRole(String clientId, String roleAssignmentId, Map<String,String> additionalHeaders) throws ApiException
      Retrieve a client role Retrieves a role assignment (identified by `roleAssignmentId`) for a client app (identified by `clientId`)
      Parameters:
      clientId - `client_id` of the app (required)
      roleAssignmentId - The `id` of the role assignment (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      AssignRoleToClient200Response
      Throws:
      ApiException - if fails to make API call
    • getObjectMapper

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