Creates a privileged account for an AnalyticDB for PostgreSQL instance.

You can also create privileged accounts in the console. For more information, see Create a database account.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes CreateAccount

The operation that you want to perform. Set the value to CreateAccount.

DBInstanceId String Yes gp-xxxxxxxx

The ID of the instance.

Note You can call the DescribeDBInstances operation to query details of all AnalyticDB for PostgreSQL instances in a specific region, including instance IDs.
DatabaseName String No test01

The name of the database.

AccountName String Yes testacc02

The name of the privileged account.

  • The name can contain lowercase letters, digits, and underscores (_).
  • The name must start with a lowercase letter and end with a lowercase letter or a digit.
  • The name cannot start with gp.
  • The name must be 2 to 16 characters in length.
AccountPassword String Yes Pw123456

The password of the privileged account.

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

The description of the privileged account.

Response parameters

Parameter Type Example Description
RequestId String D4D4BE8A-DD46-440A-BFCD-EE31DA81C9DD

The ID of the request.


Sample requests

&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK


JSON format

HTTP/1.1 200 OK

  "RequestId" : "D4D4BE8A-DD46-440A-BFCD-EE31DA81C9DD"

Error codes

For a list of error codes, visit the API Error Center.