Domain name for API request: redis.intl.tencentcloudapi.com.
This API is used to customize the account for accessing instances.
A maximum of 20 requests can be initiated per second for this API.
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 Params. The value used for this API: CreateInstanceAccount. |
| Version | Yes | String | Common Params. The value used for this API: 2018-04-12. |
| Region | Yes | String | Common Params. For more information, please see the list of regions supported by the product. |
| InstanceId | Yes | String | Instance ID. Log in to the Redis console and copy the instance ID from the instance list. |
| AccountName | Yes | String | Custom account name for accessing the database.
|
| AccountPassword | Yes | String | Set a password for the customized account. The password complexity requirements are as follows:
|
| ReadonlyPolicy.N | Yes | Array of String | Read requests for the designated account are routed to the primary node or replica node. Read-only replica is not enabled, and selection of replica nodes is not supported.
|
| Privilege | Yes | String | Account read/write permission supports selecting read-only or read-write permission.
|
| Remark | No | String | Description information about account remarks, with a length of [0, 64] bytes. |
| EncryptPassword | No | Boolean | Whether to enable password encryption for transmission.
|
| Parameter Name | Type | Description |
|---|---|---|
| TaskId | Integer | Task ID. |
| RequestId | String | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
POST / HTTP/1.1
Host: redis.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateInstanceAccount
<Common request parameters>
{
"InstanceId": "crs-n24q0sh7",
"AccountName": "********test",
"AccountPassword": "***********",
"ReadonlyPolicy": [
"master"
],
"Privilege": "rw"
}
{
"Response": {
"TaskId": 2031374330,
"RequestId": "1b18b553-002f-4e71-95b8-2a7293286acf"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
| Error Code | Description |
|---|---|
| FailedOperation.SystemError | Internal system error, which is irrelevant to the business. |
| FailedOperation.UnSupportError | The instance does not support this API. |
| InternalError.InternalError | Internal error. |
| InvalidParameter.PermissionDenied | The API has no CAM permissions. |
| UnauthorizedOperation.NoCAMAuthed | No CAM permissions. |
| UnauthorizedOperation.UserNotInWhiteList | The user is not in the allowlist. |
Apakah halaman ini membantu?
Anda juga dapat Menghubungi Penjualan atau Mengirimkan Tiket untuk meminta bantuan.
masukan