Checks whether a database name is valid or unique in the cluster.

Debugging

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 No CheckDBName

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

DBClusterId String Yes pc-****************

The ID of the cluster.

Note You can call the DescribeDBClusters operation to query information about all clusters that are deployed in a specified region, such as the cluster ID.
DBName String Yes test_db

The name of the database.

Response parameters

Parameter Type Example Description
RequestId String CDB3258F-B5DE-43C4-8935-CBA0CA******

The ID of the request.

  • If the database name that you enter is invalid, the error message Specified DB name is not valid is returned.
  • If the database name that you enter exists in the cluster, the error message Specified DB name already exists is returned.

Examples

Sample requests

http(s)://polardb.aliyuncs.com/? Action=CheckDBName
&DBClusterId=pc-****************
&DBName=test_db
&<Common request parameters>

Sample success responses

XML format

<CheckDBNameResponse>
  <RequestId>CDB3258F-B5DE-43C4-8935-CBA0CA******</RequestId>
</CheckDBNameResponse>

JSON format

{
  "RequestId": "CDB3258F-B5DE-43C4-8935-CBA0CA******"
}

Error codes

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