Creates a database.

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 Yes CreateDatabase

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

Name String Yes db001

The name of the database.

Description String Yes this is db description

The description of the database.

LocationUri String Yes oss://data/xxx

The Object Storage Service (OSS) location uniform resource identifier (URI) of the database.

Parameters Map No

The properties of the database.

String No key001=value001

The properties of the database.

Response parameters

Parameter Type Example Description
Code String ALREADY_EXISTS

The error code returned.

Data Long 6666

The ID of the database that is created.

Message String Database db001 already exists

The error message returned.

RequestId String 9BEAC206-0795-4DE3-B1FD-964BEF432B23

The ID of the request.

Success Boolean false

Indicates whether the request was successful.

Examples

Sample requests

http(s)://[Endpoint]/?Action=CreateDatabase
&Name=db001
&Description=this is db description
&LocationUri=oss://data/xxx
&Parameters={"key":"key001=value001"}
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<Message>Database db001 already exists</Message>
<RequestId>9BEAC206-0795-4DE3-B1FD-964BEF432B23</RequestId>
<Data>6666</Data>
<Code>ALREADY_EXISTS</Code>
<Success>false</Success>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "Message" : "Database db001 already exists",
  "RequestId" : "9BEAC206-0795-4DE3-B1FD-964BEF432B23",
  "Data" : "6666",
  "Code" : "ALREADY_EXISTS",
  "Success" : "false"
}

Error codes

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