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
|
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
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
action |
Yes |
String |
Catalog operation. The options are:
|
|
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. |
|
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. lakeformation: Metadata of the LakeFormation type is used. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
message |
String |
System prompt. If the execution succeeds, this parameter may be left blank. |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code |
|
error_msg |
String |
Error message |
Status code: 500
|
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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot