Queries information about a database.

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 parameters

Parameter Type Required Example Description
Action String Yes GetDatabase

The operation that you want to perform. Set the value to GetDatabase.

Name String Yes db001

The name of the database whose information you want to query.

Response parameters

Parameter Type Example Description
Code String NO_SUCH_OBJECT

The error code returned.

DatabaseModel Object

The model of the database.

Description String this is db description

The description of the database.

LocationUri String oss://data/xxx

The Object Storage Service (OSS) directory in which database data is stored.

Name String db001

The name of the database.

OwnerName String user001

The owner of the database.

Parameters Map

The properties of the database.

String key001=value001

The properties of the database.

TenantId String 123455

The ID of the Alibaba Cloud account that is used to access Data Lake Analytics (DLA).

Message String The database db001 does not exist

The error message returned.

RequestId String 9BEAC206-0795-4DE3-B1FD-964BEF432B23

The ID of the request.

Success Boolean false

Indicates whether the request was successful.

Examples

Sample requests

http(s)://[Endpoint]/?Action=GetDatabase
&Name=db001
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DatabaseModel>
    <LocationUri>oss://data/xxx</LocationUri>
    <OwnerName>user001</OwnerName>
    <TenantId>123455</TenantId>
    <Description>this is db description</Description>
    <Parameters>
        <key>key001=value001</key>
    </Parameters>
    <Name>db001</Name>
</DatabaseModel>
<Message>The database db001 does not exist</Message>
<RequestId>9BEAC206-0795-4DE3-B1FD-964BEF432B23</RequestId>
<Code>NO_SUCH_OBJECT</Code>
<Success>false</Success>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "DatabaseModel" : {
    "LocationUri" : "oss://data/xxx",
    "OwnerName" : "user001",
    "TenantId" : "123455",
    "Description" : "this is db description",
    "Parameters" : {
      "key" : "key001=value001"
    },
    "Name" : "db001"
  },
  "Message" : "The database db001 does not exist",
  "RequestId" : "9BEAC206-0795-4DE3-B1FD-964BEF432B23",
  "Code" : "NO_SUCH_OBJECT",
  "Success" : "false"
}

Error codes

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