DeleteUser

Last updated: 2020-08-14 10:29:07

1. API Description

Domain name for API request: cam.tencentcloudapi.com.

This API is used to delete a sub-user.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common parameter. The value used for this API: DeleteUser.
Version Yes String Common parameter. The value used for this API: 2019-01-16.
Region No String Common parameter. This parameter is not required for this API.
Name Yes String Sub-user username
Force No Integer Whether to forcibly delete the sub-user. The default input parameter is 0. 0: do not delete the user if the user has undeleted API keys; 1: first delete the API keys then delete the user if the user has undeleted API keys. To delete API keys, you need to have cam:DeleteApiKey permission, which enables you to delete both enabled and disabled API keys. If you do not have this permission, you will not be able to delete API keys and the user.

3. Output Parameters

Parameter Name Type Description
RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

4. Example

Example1 Deleting sub-users

Input Example

https://cam.tencentcloudapi.com/?Action=DeleteUser
&Name=test124
&<common request parameters>

Output Example

{
  "Response": {
    "RequestId": "b46d2afe-6893-4529-bc96-2c82d9214957"
  }
}

5. Developer Resources

API Explorer

This tool allows online call, signature authentication, SDK code generation and quick search of APIs to greatly improve the efficiency of using TencentCloud APIs.

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
OperationDenied.HaveKeys There are undeleted API keys.
ResourceNotFound.UserNotExist User does not exist.
UnauthorizedOperation.DeleteApiKey User do not have the authorization to delete API keys.

Was this page helpful?

Was this page helpful?

  • Not at all
  • Not very helpful
  • Somewhat helpful
  • Very helpful
  • Extremely helpful
Send Feedback
Help