Creates a database account for a specified PolarDB cluster.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | No | CreateAccount |
The operation that you want to perform. Set the value to CreateAccount. |
AccountName | String | Yes | testacc |
The name of the account. The account name must meet the following requirements:
|
AccountPassword | String | Yes | Test1111 |
The password of the account. The password must meet the following requirements:
|
DBClusterId | String | Yes | pc-************** |
The ID of the cluster. |
AccountType | String | No | Normal |
The account type. Valid values:
Note
|
AccountDescription | String | No | testdes |
The description of the account. The description must meet the following requirements:
|
DBName | String | No | testdb |
The names of databases that can be accessed by the account. Separate multiple names with commas (,). Note This parameter is applicable to only standard accounts of PolarDB for MySQL clusters.
|
AccountPrivilege | String | No | ReadWrite |
The account permission. Valid values:
Note
|
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | CED079B7-A408-41A1-BFF1-EC608E****** |
The ID of the request. |
Examples
Sample request
http(s)://polardb.aliyuncs.com/? Action=CreateAccount
&AccountName=testacc
&AccountPassword=Test1111
&DBClusterId=pc-**************
&<Common request parameters>
Sample success responses
XML
format
<CreateAccountResponse>
<RequestId>CED079B7-A408-41A1-BFF1-EC608E******</RequestId>
</CreateAccountResponse>
JSON
format
{
"RequestId": "CED079B7-A408-41A1-BFF1-EC608E******"
}
Error codes
For a list of error codes, visit the API Error Center.