Unlink User from Role

Last Updated on : 2023-10-09 08:05:41download

Unlink a user from a role based on the role ID and user ID.

API address

DELETE: /v2.0/cloud/iam/role/{role_id}/user/{user_id}

Request parameter

Parameter nameTypeINRequiredDescription
role_idLonguritrueThe ID of the specified role.
user_idStringuritrueThe user ID.

Return parameter

Parameter nameTypeDescription
successBooleanIndicates whether the request is successful. Valid values:
  • true: The operation succeeded.
  • false: The operation failed.
error_codeStringFor more information, see the error codes.
error_msgStringThe message that is returned if the request fails. It is empty if the request is successful.
resultObjectThe returned result. Valid values:
  • true: The API call succeeded.
  • false: The API call failed.

Request example

DELETE: /v2.0/cloud/iam/role/1/user/uid1

Return example

{
    "tid": "44b298320b2a11eeae100efb7ec85579",
    "result": true,
    "t": 1686798666453,
    "success": true
}

Error code

For more information, see error code.