All Products
Search
Document Center

Data Management:GetLogicDatabase

Last Updated:Oct 21, 2024

Queries the details of a logical database.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
TidlongNo

The ID of the tenant.

Note To view the ID of the tenant, go to the Data Management (DMS) console and move the pointer over the profile picture in the upper-right corner. For more information, see View information about the current tenant.
3***
DbIdstringYes

The ID of the logical database. You can call the ListLogicDatabases or SearchDatabase operation to obtain the ID of the logical database.

1***

Response parameters

ParameterTypeDescriptionExample
object
LogicDatabaseobject

The details of the logical database.

DatabaseIdstring

The ID of the logical database.

1***
OwnerIdListarray

The IDs of the owners of the logical database.

OwnerIdsstring

The ID of the owner of the logical database.

51****
DbTypestring

The database engine. For more information about the valid values of the DbType parameter, see DbType parameter.

POLARDB
OwnerNameListarray

The names of the owners of the logical database.

OwnerNamesstring

The names of the owners of the logical database.

owner_name
Logicboolean

Indicates whether the database is a logical database. The return value is true.

true
SchemaNamestring

The name of the logical database.

test_logic_db
SearchNamestring

The name that is used to search for the logical database.

test_logic_db[test_logic_alias]
EnvTypestring

The type of the environment to which the database belongs. Valid values:

  • product: production environment
  • dev: development environment
  • pre: pre-release environment
  • test: test environment
  • sit: system integration testing (SIT) environment
  • uat: user acceptance testing (UAT) environment
  • pet: stress testing environment
  • stag: staging environment
dev
Aliasstring

The alias of the logical database.

test_logic_alias
DatabaseIdsarray

The IDs of database shards of the logical database.

DatabaseIdslong

The ID of the database shard of the logical database.

12****
RequestIdstring

The ID of the request.

90260530-565C-42B9-A6E8-893481FE6AB6
ErrorCodestring

The status code.

UnknownError
ErrorMessagestring

The error message.

UnknownError
Successboolean

Indicates whether the request was successful. Valid values:

  • true: The request was successful.
  • false: The request failed.
true

Examples

Sample success responses

JSONformat

{
  "LogicDatabase": {
    "DatabaseId": "1***",
    "OwnerIdList": {
      "OwnerIds": [
        "51****"
      ]
    },
    "DbType": "POLARDB",
    "OwnerNameList": {
      "OwnerNames": [
        "owner_name"
      ]
    },
    "Logic": true,
    "SchemaName": "test_logic_db",
    "SearchName": "test_logic_db[test_logic_alias]",
    "EnvType": "dev",
    "Alias": "test_logic_alias",
    "DatabaseIds": {
      "DatabaseIds": [
        0
      ]
    }
  },
  "RequestId": "90260530-565C-42B9-A6E8-893481FE6AB6",
  "ErrorCode": "UnknownError",
  "ErrorMessage": "UnknownError",
  "Success": true
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history