Creating a User
Function
This API is used to create a user for a Kafka instance for which SASL is enabled.
Debugging
You can use API Explorer to debug this API.
URI
POST /v2/{project_id}/instances/{instance_id}/users
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID. |
| instance_id | Yes | String | Instance ID. |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| user_name | No | String | Username. |
| user_passwd | No | String | User password. The password must be different from the username. The password must meet the following complexity requirements:
|
Response Parameters
Status code: 400
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code. |
| error_msg | String | Error description. |
Status code: 403
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code. |
| error_msg | String | Error description. |
Example Requests
Creating a User
POST https://{endpoint}/v2/{project_id}/instances/{instance_id}/users
{
"user_name" : "test",
"user_passwd" : "Cloud@123"
} Example Responses
None
Status Codes
| Status Code | Description |
|---|---|
| 204 | Creation succeeded. |
| 400 | Invalid parameters. |
| 403 | Authorization failed. |
Error Codes
See Error Codes.
Last Article: Querying the User List
Next Article: Deleting Users in Batches
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.