Creates a Simple Authentication and Security Layer (SASL) user.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
alikafka:CreateSaslUser | Write |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The region ID. | cn-hangzhou |
InstanceId | string | Yes | The instance ID. | alikafka_pre-cn-v0h1cng0**** |
Username | string | Yes | The name of the SASL user. | test*** |
Password | string | Yes | The password of the SASL user. | 12*** |
Type | string | No | The SASL mechanism. Valid values:
Default value: plain. | plain |
Mechanism | string | No | The encryption method. Valid values:
Note
| SCRAM-SHA-256 |
Response parameters
Examples
Sample success responses
JSON
format
{
"Code": 200,
"Message": "operation success.",
"RequestId": "C5CA600C-7D5A-45B5-B6DB-44FAC2C****",
"Success": true
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | Acl.AddSasl.Error | Failed to add a user. Please refer to the document and try again. If in doubt, submit a work order. | Failed to add a user. Please refer to the document and try again. If in doubt, submit a work order. |
400 | BIZ_SASL_USER_NOT_EXIST | %s. Please check and try again later. | - |
400 | BIZ_SASL_USER_NUM_EXCEED | %s. Please check and try again later. | - |
400 | MissingParameter | The %s parameter is required. | - |
400 | InvalidParameter | The %s parameter is invalid. | - |
400 | Instance.StatusNotRunning | The instance is not running and cannot operate this function. Please try again later. | The instance is not running and cannot operate this function. Please try again later. |
400 | Acl.Disable.Error | The Acl function is disabled. Enable it by referring to the documentation and try again. | The Acl function is disabled. Enable it by referring to the documentation and try again. |
400 | Acl.DuplicatedAuth.Error | The authorization has already been granted, please do not repeat the authorization. | The authorization has already been granted, please do not repeat the authorization. |
400 | BIZ_ACL_NOT_ENABLED | %s. Please check and try again later. | - |
400 | BIZ_CAN_NOT_ENABLE_ACL | %s. Please check and try again later. | - |
400 | BIZ_UPDATE_ACL_FAILED | %s. Please check and try again later. | - |
400 | Instance.CaclulateChange.time | Example Failed to obtain the expected change time. Please try again later. | Example Failed to obtain the expected change time. Please try again later. |
400 | Acl.DelSasl.Error | Failed to delete the user. Check the request parameters and try again. | Failed to delete the user. Check the request parameters and try again. |
404 | Instance.NotFound | No instance found for the %s parameter. | - |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
2024-04-02 | The Error code has changed. The request parameters of the API has changed | see changesets | ||||||||||
|