Deleting Authorization
Function
This API is used to delete the authorization of a specified user or all users.
This API applies to the following scenarios: When the access permission of a specified user needs to be revoked or the authorization of all users needs to be cleared during system maintenance, the administrator can use this API to do so. Before using this API, the administrator must have the permission to delete the authorization and specify the user whose authorization is to be deleted or delete the authorization of all users. After the deletion is complete, the authorization of the specified user will be removed, or the authorization of all users will be cleared. Users cannot access related functions. If the user does not exist, the administrator does not have the operation permission, or the system detects that there is no administrator permission during authorization deletion of all users, the API will return an error message.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer. Obtain its CLI example hcloud ModelArts DeleteAuthorizations.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, no identity policy-based permission required for calling this API.
URI
DELETE /v2/{project_id}/authorizations
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Definition: Project ID. For details, see Obtaining a Project ID and Name. Constraints: N/A Range: N/A Default Value: N/A |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
user_id |
No |
String |
Definition: User ID. If this parameter is set to all, the authorization of all IAM users will be deleted. Constraints: N/A Range: N/A Default Value: N/A |
Request Parameters
None
Response Parameters
Status code: 200
OK
None
Example Requests
Delete the authorization of a specified user.
DELETE https://{endpoint}/v2/{project_id}/authorizations?user_id=****d80fb058844ae8b82aa66d9fe****
Example Responses
Status code: 200
OK
{
"result" : "true"
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
OK |
|
400 |
Bad request |
|
401 |
Unauthorized |
|
403 |
Forbidden |
|
404 |
Not found |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot