Package com.okta.sdk.resource.api
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionassignRoleToClient(String clientId, AssignRoleToClientRequest assignRoleToClientRequest) Assign a client role Assigns a [standard role](/openapi/okta-management/guides/roles/#standard-roles) to a client app.assignRoleToClient(String clientId, AssignRoleToClientRequest assignRoleToClientRequest, Map<String, String> additionalHeaders) Assign a client role Assigns a [standard role](/openapi/okta-management/guides/roles/#standard-roles) to a client app.voiddeleteRoleFromClient(String clientId, String roleAssignmentId) Unassign a client role Unassigns a role assignment (identified by `roleAssignmentId`) from a client app (identified by `clientId`)voiddeleteRoleFromClient(String clientId, String roleAssignmentId, Map<String, String> additionalHeaders) Unassign a client role Unassigns a role assignment (identified by `roleAssignmentId`) from a client app (identified by `clientId`)protected static com.fasterxml.jackson.databind.ObjectMapperlistRolesForClient(String clientId) List all client role assignments Lists all roles assigned to a client app identified by `clientId`listRolesForClient(String clientId, Map<String, String> additionalHeaders) List all client role assignments Lists all roles assigned to a client app identified by `clientId`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.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.retrieveClientRole(String clientId, String roleAssignmentId) Retrieve a client role Retrieves a role assignment (identified by `roleAssignmentId`) for a client app (identified by `clientId`)Retrieve a client role Retrieves a role assignment (identified by `roleAssignmentId`) for a client app (identified by `clientId`)voidsetApiClient(ApiClient apiClient)
-
Constructor Details
-
RoleAssignmentClientApi
public RoleAssignmentClientApi() -
RoleAssignmentClientApi
-
-
Method Details
-
getApiClient
-
setApiClient
-
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 ApiExceptionAssign 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
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 ApiExceptionUnassign 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 ApiExceptionList 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
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 ApiExceptionRetrieve 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()
-