All Products
Search
Document Center

AnalyticDB:CreateDatabase

Last Updated:Jan 23, 2026

Creates a database.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
DBInstanceIdstringYes

The cluster ID.

Note You can call the DescribeDBInstances operation to query the information about all AnalyticDB for PostgreSQL instances within a region, including instance IDs.
gp-xxxxxxxxx
DatabaseNamestringYes

The name of the database.

  • Only contains letters, digits, and underscores (_).
  • Must start with a letter.
  • Up to 63 characters in length.
test01
CharacterSetNamestringNo

The character set.

For more information about the value range, see Document https://www.postgresql.org/docs/current/multibyte.html.

Default value: UTF-8.

UTF8
CollatestringNo

Database locale parameter (specifies string comparison/sorting rules).

Note
  • The locale must be compatible with the character set specified by the CharacterSetName parameter.

  • Valid values for the Collate field: You can execute the SELECT DISTINCT collname FROM pg_collation; statement to obtain the field value. The default value is en_US.utf8.

en_US.utf8
CtypestringNo

Database locale parameter (defines character classification/case conversion rules).

Note
  • The locale must be compatible with the character set specified by the CharacterSetName parameter.

  • You can execute the SELECT DISTINCT collctype FROM pg_collation; statement to obtain the field value. The default value is en_US.utf8.

en_US.utf8
OwnerstringYes

The owner of the table.

  • Only contains lowercase letters, digits, and underscores (_).
  • Must start with a lowercase letter and end with a lowercase letter or a digit.
  • Cannot start with gp.
  • Must be 2 to 16 characters in length.
testadb
DescriptionstringNo

The description of the database.

  • Must start with a letter.
  • Cannot start with http:// or https://.
  • Only contains letters, underscores (_), hyphens (-), and digits.
  • Must be 2 to 256 characters in length.
A user management database storing customer profiles.

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

Id of the request

ABB39CC3-4488-4857-905D-2E4A051D0521

Examples

Sample success responses

JSONformat

{
  "RequestId": "ABB39CC3-4488-4857-905D-2E4A051D0521"
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2025-11-05Add OperationView Change Details