All Products
Search
Document Center

Data Management:GetPhysicalDatabase

Last Updated:Oct 21, 2024

Queries the details of a physical 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
DbIdlongYes

The ID of the physical database. You can call the SearchDatabase operation to obtain the ID.

43153
TidlongNo

The ID of the tenant. You can call the GetUserActiveTenant operation to query the ID of the tenant.

1

Response parameters

ParameterTypeDescriptionExample
object

The data returned.

RequestIdstring

The ID of the request.

7FAD400F-7A5C-4193-8F9A-39D86C4F0231
Databaseobject

The information about the physical database.

DatabaseIdstring

The ID of the physical database.

43125312
Hoststring

The endpoint that is used to connect to the database.

rm-xxxab3r272.mysql.rds.aliyuncs.com
CatalogNamestring

The name of the catalog to which the database belongs.

Note : If the database is a PostgreSQL database, the name of the database is displayed.
def
DbaNamestring

The nickname of the database administrator (DBA) in the destination database.

dmstest
Statestring

The state of the database. Valid values:

  • NORMAL: The database is normal.
  • DISABLE: The database is disabled.
  • OFFLINE: The database is unpublished.
  • NOT_EXIST: The database does not exist.
NORMAL
DbaIdstring

The user ID of the DBA in the destination database.

43253
SchemaNamestring

The name of the database.

Note : If the database is a PostgreSQL database, the name of the mode is displayed.
dmstest
InstanceIdstring

The instance ID of the destination database.

43215325
Portinteger

The port that is used to connect to the database.

3306
EnvTypestring

The type of the environment to which the database belongs. For more information, see Change the environment type of an instance.

product
Sidstring

The system ID (SID) of the database.

Note : The value of the parameter is returned only for Oracle databases.
def
OwnerIdListarray

The user IDs of the database owners.

OwnerIdsstring

The user ID of the database owner.

43215325
Encodingstring

The encoding format of the database.

utf8mb4
DbTypestring

The type of the database engine.

mysql
OwnerNameListarray

The nicknames of the database owners.

OwnerNamesstring

The nickname of the database owner.

dmstest
SearchNamestring

The name that is used for searching the database.

dmstest@rm-xxxab3r272.mysql.rds.aliyuncs.com:3306
InstanceAliasstring

The alias of the database instance.

test
ErrorCodestring

The error code returned if the request failed.

UnknownError
ErrorMessagestring

The error message returned if the request failed.

UnknownError
Successboolean

Indicates whether the request is successful.

true

Examples

Sample success responses

JSONformat

{
  "RequestId": "7FAD400F-7A5C-4193-8F9A-39D86C4F0231",
  "Database": {
    "DatabaseId": "43125312",
    "Host": "rm-xxxab3r272.mysql.rds.aliyuncs.com",
    "CatalogName": "def",
    "DbaName": "dmstest",
    "State": "NORMAL",
    "DbaId": "43253",
    "SchemaName": "dmstest",
    "InstanceId": "43215325",
    "Port": 3306,
    "EnvType": "product",
    "Sid": "def",
    "OwnerIdList": {
      "OwnerIds": [
        "43215325"
      ]
    },
    "Encoding": "utf8mb4",
    "DbType": "mysql",
    "OwnerNameList": {
      "OwnerNames": [
        "dmstest"
      ]
    },
    "SearchName": "dmstest@rm-xxxab3r272.mysql.rds.aliyuncs.com:3306",
    "InstanceAlias": "test"
  },
  "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
2023-05-18The response structure of the API has changedView Change Details