All Products
Search
Document Center

Tair (Redis® OSS-Compatible):CreateAccount

Last Updated:Aug 20, 2026

Creates an account for an ApsaraDB for Tair (Redis® OSS-Compatible) database instance.

Operation description

  • This API operation supports only instances that are compatible with Redis 4.0 or later.

  • The instance status must be Running when you call this API operation.

  • You can create up to 18 accounts for each instance.

Note

For the console operation that corresponds to this API operation, see Account management.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

kvstore:CreateAccount

create

*DBInstance

acs:kvstore:{#regionId}:{#accountId}:instance/{#instanceId}

None None

Request parameters

Parameter

Type

Required

Description

Example

InstanceId

string

Yes

The instance ID.

r-bp1zxszhcgatnx****

AccountName

string

Yes

The account name. The name must meet the following requirements:

demoaccount

AccountPrivilege

string

No

The permissions of the account. Valid values:

  • RoleReadOnly: read-only permissions.

  • RoleReadWrite: read and write permissions. This is the default value.

RoleReadOnly

AccountPassword

string

Yes

The password of the account. The password must be 8 to 32 characters in length and contain at least three of the following character types: uppercase letters, lowercase letters, special characters, and digits. The following special characters are supported: !@#$%^&*()_+-=.

uWonno21****

AccountDescription

string

No

The description of the account.

  • Must start with a Chinese character or an English letter. Cannot start with http:// or https://.

  • Can contain Chinese characters, English letters, digits, underscores (_), and hyphens (-).

  • Must be 2 to 256 characters in length.

testaccount

AccountType

string

No

The account type. Set the value to Normal (standard account).

Normal

SourceBiz

string

No

This parameter is used only for internal maintenance. You do not need to specify this parameter.

SDK

Parameters

string

No

The account parameters to modify in JSON format. The new values overwrite the original values.

Important This parameter is supported only for Tair Serverless KV instances.

{"access-db-id":"1","cu-limit":"10"}

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

ABAF95F6-35C1-4177-AF3A-70969EBD****

InstanceId

string

The instance ID.

r-bp1zxszhcgatnx****

AcountName

string

[Deprecated] This parameter is deprecated.

demoaccount

AccountName

string

The account name.

demoaccount

Examples

Success response

JSON format

{
  "RequestId": "ABAF95F6-35C1-4177-AF3A-70969EBD****",
  "InstanceId": "r-bp1zxszhcgatnx****",
  "AcountName": "demoaccount",
  "AccountName": "demoaccount"
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidAccountName.Duplicate Specified AccountName already exists in this instance. The error message returned because the account already exists.
400 InvalidAccountName.Format Specified AccountName is not valid.
400 InvalidEngineVersion.Format Current EngineVersion does not support operations. The operation is not supported while the instance runs this engine version.
400 InvalidAccountDescription.Format Specified AccountDescription is not valid.
400 InvalidAccountPassword.Format Specified AccountPassword is not valid.
400 InvalidDBInstanceAccountMode.Format Current DB instance AccountMode does not support this operation.
400 InvalidAccountName.Forbid Specified AccountName is a keyword.
400 InvalidAccountPrivilege.Malformed Specified account privilege is not valid.
403 AccountLimitExceeded Exceeding the allowed amount of account.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.