Deletes a Data Lake Formation (DLF) metadatabase by name.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request headers

This operation uses only common request headers. For more information, see Common request parameters.

Request syntax

DELETE /api/metastore/catalogs/databases 

Request parameters

Parameter Type Position Required Example Description
CatalogId String Query No 1344371

The catalog ID of the metadatabase. Default value: the user ID of your Alibaba Cloud account.

Name String Query No database_test

The name of the metadatabase.

Cascade Boolean Query No false

Specifies whether to perform cascade deletion.

RegionId String Host No cn-hangzhou

The ID of the region where DLF is activated.

Response parameters

Parameter Type Example Description
Code String OK

The description of the status code.

Message String .

The error message that is returned.

RequestId String 73201200-4C1A-4FEF-BD6B-C0DA7994FFA2

The ID of the request.

Success Boolean true

Indicates whether the call was successful.

Error codes

NoSuchObject: The specified metadatabase does not exist.

InvalidOperation: The metadatabase cannot be deleted because it contains tables or functions.

InternalError: An internal error has occurred. Troubleshoot the error based on the error message that is returned.

Examples

Sample requests

DELETE /api/metastore/catalogs/databases HTTP/1.1 
 {
    "RegionId":"cn-hangzhou",
    "CatalogId":"1344371",
    "Cascade":"false",
    "Name":"database_test"
}

Sample success responses

JSON format

{
  "Code": "OK",
  "HttpStatusCode": 200,
  "Message": "",
  "RequestId": "73201200-4C1A-4FEF-BD6B-C0DA7994FFA2",
  "Success": true
}

Error codes

For a list of error codes, visit the API Error Center.