Creates an external database.
Try it now
Test
RAM authorization
Request syntax
POST /api/v1/instances/{instanceId}/createExternalDatabase HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| instanceId |
string |
No |
The instance ID. |
hgprecn-cn-i7m2vxxxx |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The request body. |
|
| databaseName |
string |
No |
The database name. |
my_db |
| comment |
string |
No |
The comment. |
for log stat |
| defaultUserMapping |
string |
No |
Specifies whether to use the default user mapping. |
true |
| metastoreType |
string |
No |
The metastore type. Valid values:
|
maxcompute |
| externalConfig |
array<object> |
No |
The configuration parameters. For more information, see CREATE EXTERNAL DATABASE. |
|
|
object |
No |
|||
| key |
string |
No |
The configuration key. |
mc_project |
| value |
string |
No |
The configuration value. |
log_sum |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
2A8DEF6E-067E-5DB0-BAE1-2894266E6C6A |
| Success |
string |
Indicates whether the request was successful. Valid values are |
true |
| ErrorCode |
string |
The error code. |
null |
| ErrorMessage |
string |
The error message. |
null |
| HttpStatusCode |
string |
The HTTP status code. |
200 |
| Data |
boolean |
The result of the operation. |
true |
Examples
Success response
JSON format
{
"RequestId": "2A8DEF6E-067E-5DB0-BAE1-2894266E6C6A\n",
"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.