All Products
Search
Document Center

Hologres:CreateExternalDatabase

Last Updated:Jun 10, 2026

Membuat database eksternal.

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tidak ada otorisasi untuk operasi ini. Jika Anda mengalami masalah saat menjalankan operasi ini, hubungi dukungan teknis.

Sintaks permintaan

POST /api/v1/instances/{instanceId}/createExternalDatabase HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

instanceId

string

No

ID instans.

hgprecn-cn-i7m2vxxxx

Parameter permintaan

Parameter

Type

Required

Description

Example

body

object

No

Badan permintaan.

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

Elemen respons

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

Contoh

Respons sukses

JSONformat

{
  "RequestId": "2A8DEF6E-067E-5DB0-BAE1-2894266E6C6A\n",
  "Success": "true",
  "ErrorCode": "null",
  "ErrorMessage": "null",
  "HttpStatusCode": "200",
  "Data": true
}

Kode kesalahan

HTTP status code

Error code

Error message

Description

403 NoPermission RAM user permission is insufficient, please grant AliyunHologresReadOnlyAccess permission.

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.