CreateDatabase
Creates a database.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
hologram:CreateDatabase |
list |
*All Resource
|
None | None |
Request syntax
POST /api/v1/instances/{instanceId}/createDatabase HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| instanceId |
string |
No |
The ID of the Hologres instance. |
hgpostcn-cn-aic4onkyn002 |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The request body. |
|
| databaseName |
string |
No |
The name of the database. |
my_db |
| permissionModel |
string |
No |
The permission model. For more information, see Hologres permission models. Default value: standard PostgreSQL authorization model. Valid values:
|
SPM |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The ID of the request. |
92F00FA1-CE4E-55A1-8BA9-F2C61534B518 |
| Success |
string |
Indicates whether the operation is successful. Valid values: true: Success. false: Failure. |
True |
| ErrorCode |
string |
The error code. |
null |
| ErrorMessage |
string |
The error message. |
null |
| HttpStatusCode |
string |
The HTTP status code. |
200 |
| Data |
boolean |
The database creation result. A value of true indicates that the database was created successfully, and a value of false indicates that the creation failed. |
true |
Examples
Success response
JSON format
{
"RequestId": "92F00FA1-CE4E-55A1-8BA9-F2C61534B518",
"Success": "True",
"ErrorCode": "null",
"ErrorMessage": "null",
"HttpStatusCode": "200",
"Data": true
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 403 | NoPermission | RAM user permission is insufficient, please grant AliyunHologresReadOnlyAccess permission. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.