All Products
Search
Document Center

Hologres:CreateExternalDatabase

Last Updated:May 14, 2026

Creates an external database.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

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 :

    MaxCompute

  • dlf-rest :

    dlf-rest

  • dlf :

    DLF

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 (success) and 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 result of the operation. true indicates success and false indicates failure.

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.