All Products
Search
Document Center

Data Management:GetPhysicalDatabase

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

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:GetPhysicalDatabaseget
*All Resources
*
    none
none

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