All Products
Search
Document Center

Data Management:GetLogicDatabase

Last Updated:Nov 28, 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

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
dms:GetLogicDatabaseget
*All Resources
*
    none
none

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