Help Center/ Data Lake Insight/ API Reference/ Data Catalog-related APIs/ Binding or Unbinding a Catalog Mapping
Updated on 2025-08-06 GMT+08:00

Binding or Unbinding a Catalog Mapping

Function

This API is used to create metadata catalogs for binding/unbinding DLI to services such as LakeFormation. Currently, only LakeFormation is supported.

URI

POST /v3/{project_id}/catalogs/action

Table 1 URI parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID, which is used for resource isolation. For how to obtain a project ID, see Obtaining a Project ID.

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

action

Yes

String

Catalog operation. The options are:

  • bind
  • unbind

name

Yes

String

Catalog mapping name on DLI.

Minimum length: 1 character

Maximum length: 128 characters

description

No

String

Description of the catalog.

parameters

Yes

Map<String,String>

Catalog structure information. For details, see Table 3.

Table 3 parameters structure parameter descriptions

Parameter

Type

Description

external_catalog_name

String

Name of an external catalog.

When type is set to lakeformation, enter the name of the catalog to be bound to LakeFormation.

type

String

Catalog type. Currently, the value can only be lakeformation.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

message

String

System prompt. If the execution succeeds, this parameter may be left blank.

Status code: 400

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 500

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Failure cause.

Example Request

{
 "action": "bind",
 "name": "dli_catalog_test1",
 "parameters": {
  "external_catalog_name": "catalog_test1",
  "type": "lakeformation"
 }
}

Example Response

Status code: 403

Forbidden

{
  "error_code" : "DLI.0003",
  "error_msg" : "Forbidden"
}

Status code: 404

Not Found

{
  "error_code" : "DLI.0002",
  "error_msg" : "Not Found"
}

Status code: 500

Internal Server Error

{
  "error_code" : "DLI.0999",
  "error_msg" : "Internal Server Error"
}

Status Codes

Status Code

Description

200

The request is successful.

400

Request error.

403

Access to the requested page is forbidden.

404

The server cannot find the requested page.

500

Internal server error.

Error Codes

See Error Codes.