Class RoleAssignmentAUserApi

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

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2024-09-23T08:35:59.300824-05:00[America/Chicago]", comments="Generator version: 7.8.0") public class RoleAssignmentAUserApi extends Object
  • Constructor Details

    • RoleAssignmentAUserApi

      public RoleAssignmentAUserApi()
    • RoleAssignmentAUserApi

      public RoleAssignmentAUserApi(ApiClient apiClient)
  • Method Details

    • getApiClient

      public ApiClient getApiClient()
    • setApiClient

      public void setApiClient(ApiClient apiClient)
    • assignRoleToUser

      public AssignRoleToUser201Response assignRoleToUser(String userId, AssignRoleToUserRequest assignRoleRequest, Boolean disableNotifications) throws ApiException
      Assign a User Role Assigns a [standard role](/openapi/okta-management/guides/roles/#standard-roles) to a User. You can also assign a custom role to a User, but the preferred method to assign a custom role to a User is to create a binding between the Custom Role, the Resource Set, and the User. 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:
      userId - ID of an existing Okta user (required)
      assignRoleRequest - (required)
      disableNotifications - Setting this to `true` grants the User third-party admin status (optional, default to false)
      Returns:
      AssignRoleToUser201Response
      Throws:
      ApiException - if fails to make API call
    • assignRoleToUser

      public AssignRoleToUser201Response assignRoleToUser(String userId, AssignRoleToUserRequest assignRoleRequest, Boolean disableNotifications, Map<String,String> additionalHeaders) throws ApiException
      Assign a User Role Assigns a [standard role](/openapi/okta-management/guides/roles/#standard-roles) to a User. You can also assign a custom role to a User, but the preferred method to assign a custom role to a User is to create a binding between the Custom Role, the Resource Set, and the User. 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:
      userId - ID of an existing Okta user (required)
      assignRoleRequest - (required)
      disableNotifications - Setting this to `true` grants the User third-party admin status (optional, default to false)
      additionalHeaders - additionalHeaders for this call
      Returns:
      AssignRoleToUser201Response
      Throws:
      ApiException - if fails to make API call
    • getUserAssignedRole

      public ListGroupAssignedRoles200ResponseInner getUserAssignedRole(String userId, String roleAssignmentId) throws ApiException
      Retrieve a User Role Assignment Retrieves a Role assigned to a User (identified by `userId`). The `roleAssignmentId` parameter is the unique identifier for either a standard Role Assignment object or a custom role Resource Set Binding object.
      Parameters:
      userId - ID of an existing Okta user (required)
      roleAssignmentId - The `id` of the Role Assignment (required)
      Returns:
      ListGroupAssignedRoles200ResponseInner
      Throws:
      ApiException - if fails to make API call
    • getUserAssignedRole

      public ListGroupAssignedRoles200ResponseInner getUserAssignedRole(String userId, String roleAssignmentId, Map<String,String> additionalHeaders) throws ApiException
      Retrieve a User Role Assignment Retrieves a Role assigned to a User (identified by `userId`). The `roleAssignmentId` parameter is the unique identifier for either a standard Role Assignment object or a custom role Resource Set Binding object.
      Parameters:
      userId - ID of an existing Okta user (required)
      roleAssignmentId - The `id` of the Role Assignment (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      ListGroupAssignedRoles200ResponseInner
      Throws:
      ApiException - if fails to make API call
    • listAssignedRolesForUser

      public List<ListGroupAssignedRoles200ResponseInner> listAssignedRolesForUser(String userId, String expand) throws ApiException
      List all User Role Assignments Lists all roles assigned to a User (identified by `userId`)
      Parameters:
      userId - ID of an existing Okta user (required)
      expand - An optional parameter used to return targets configured for the standard Role Assignment in the `embedded` property. Supported values: `targets/groups` or `targets/catalog/apps` (optional)
      Returns:
      List<ListGroupAssignedRoles200ResponseInner>
      Throws:
      ApiException - if fails to make API call
    • listAssignedRolesForUser

      public List<ListGroupAssignedRoles200ResponseInner> listAssignedRolesForUser(String userId, String expand, Map<String,String> additionalHeaders) throws ApiException
      List all User Role Assignments Lists all roles assigned to a User (identified by `userId`)
      Parameters:
      userId - ID of an existing Okta user (required)
      expand - An optional parameter used to return targets configured for the standard Role Assignment in the `embedded` property. Supported values: `targets/groups` or `targets/catalog/apps` (optional)
      additionalHeaders - additionalHeaders for this call
      Returns:
      List<ListGroupAssignedRoles200ResponseInner>
      Throws:
      ApiException - if fails to make API call
    • listUsersWithRoleAssignments

      public RoleAssignedUsers listUsersWithRoleAssignments(String after, Integer limit) throws ApiException
      List all Users with Role Assignments Lists all users with Role Assignments
      Parameters:
      after - Specifies the pagination cursor for the next page of targets (optional)
      limit - Specifies the number of results returned. Defaults to `100`. (optional, default to 100)
      Returns:
      RoleAssignedUsers
      Throws:
      ApiException - if fails to make API call
    • listUsersWithRoleAssignments

      public RoleAssignedUsers listUsersWithRoleAssignments(String after, Integer limit, Map<String,String> additionalHeaders) throws ApiException
      List all Users with Role Assignments Lists all users with Role Assignments
      Parameters:
      after - Specifies the pagination cursor for the next page of targets (optional)
      limit - Specifies the number of results returned. Defaults to `100`. (optional, default to 100)
      additionalHeaders - additionalHeaders for this call
      Returns:
      RoleAssignedUsers
      Throws:
      ApiException - if fails to make API call
    • unassignRoleFromUser

      public void unassignRoleFromUser(String userId, String roleAssignmentId) throws ApiException
      Unassign a User Role Unassigns a Role Assignment (identified by `roleAssignmentId`) from a User (identified by `userId`)
      Parameters:
      userId - ID of an existing Okta user (required)
      roleAssignmentId - The `id` of the Role Assignment (required)
      Throws:
      ApiException - if fails to make API call
    • unassignRoleFromUser

      public void unassignRoleFromUser(String userId, String roleAssignmentId, Map<String,String> additionalHeaders) throws ApiException
      Unassign a User Role Unassigns a Role Assignment (identified by `roleAssignmentId`) from a User (identified by `userId`)
      Parameters:
      userId - ID of an existing Okta user (required)
      roleAssignmentId - The `id` of the Role Assignment (required)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • getObjectMapper

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