All Products
Search
Document Center

Data Management:GetInstance

Last Updated:Apr 26, 2024

Queries the details of a database instance.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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

Request parameters

ParameterTypeRequiredDescriptionExample
TidlongNo

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

2***
HoststringYes

The endpoint of the database instance. You can call the ListInstances operation to obtain the endpoint.

172.17.XXX.XXX
PortintegerYes

The port number that is used to connect to the database instance. You can call the ListInstances operation to obtain the port number.

5432
SidstringNo

The system ID (SID) of the database instance. You can call the ListInstances operation to obtain the SID.

test

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

F6C80B69-3203-56AC-8021-18BA72A6F4E1
Instanceobject

The details of the database instance.

VpcIdstring

The ID of the virtual private cloud (VPC) to which the database instance belongs.

vpc-o6wrloqsdqc9io3mg****
DatabaseUserstring

The account that is used to log on to the database instance.

dbuser
DbaIdstring

The ID of the database administrator (DBA) for the database instance.

29****
UseDsqlinteger

Indicates whether the cross-database query feature is enabled for the database instance. Valid values:

  • 0: disabled
  • 1: enabled
0
Portinteger

The port number that is used to connect to the database instance.

5432
EcsInstanceIdstring

The ID of the Elastic Compute Service (ECS) instance on which the database instance is deployed.

i-bp124ldpklqz59y3****
EnvTypestring

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

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

The SID of the database instance.

test
OwnerIdListarray

The IDs of the owners for the database instance.

string

The ID of the instance Owner.

10****
SafeRuleIdstring

The ID of the security rule set for the database instance.

3****
OwnerNameListarray

The nicknames of the owners for the database instance.

string

The nickname of the instance Owner.

yang_test
DbaNickNamestring

The nickname of the DBA for the database instance.

dbaname
QueryTimeoutinteger

The timeout period for querying data in the database instance.

7200
InstanceSourcestring

The source of the database instance.

ECS_OWN
Hoststring

The host address that is used to connect to the database instance.

192.168.XXX.XXX
Statestring

The status of the database instance. Valid values:

  • NORMAL: normal
  • DISABLE: disabled
NORMAL
DataLinkNamestring

The name of the database link for the database instance.

test
ExportTimeoutinteger

The timeout period for exporting data from the database instance.

86400
InstanceIdstring

The ID of the database instance.

188****
InstanceTypestring

The type of the database instance.

postgresql
DatabasePasswordstring

The password that is used to log on to the database.

******
InstanceAliasstring

The alias of the database instance.

test
DdlOnlineinteger

Indicates whether the lock-free schema change feature is enabled for the database instance.

0
EcsRegionstring

The ID of the region in which the database instance resides.

cn-beijing
StandardGroupobject

The control mode of the database instance.

GroupNamestring

The name of the security rule set corresponding to the control mode.

test group name
GroupModestring

The type of the control mode. Valid values:

  • COMMON: Security Collaboration
  • NONE_CONTROL: Flexible Management
  • STABLE: Stable Change
NONE_CONTROL
SellSitdstring

Whether sensitive data protection is enabled. Valid values:

  • true: Enable.

  • false: Close.

false
ErrorCodestring

The error code that is returned.

UnknownError
ErrorMessagestring

The error message that is returned.

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

{
  "RequestId": "F6C80B69-3203-56AC-8021-18BA72A6F4E1",
  "Instance": {
    "VpcId": "vpc-o6wrloqsdqc9io3mg****",
    "DatabaseUser": "dbuser",
    "DbaId": "29****",
    "UseDsql": 0,
    "Port": 5432,
    "EcsInstanceId": "i-bp124ldpklqz59y3****",
    "EnvType": "test",
    "Sid": "test",
    "OwnerIdList": {
      "OwnerIds": [
        "10****"
      ]
    },
    "SafeRuleId": "3****",
    "OwnerNameList": {
      "OwnerNames": [
        "yang_test"
      ]
    },
    "DbaNickName": "dbaname",
    "QueryTimeout": 7200,
    "InstanceSource": "ECS_OWN",
    "Host": "192.168.XXX.XXX",
    "State": "NORMAL",
    "DataLinkName": "test",
    "ExportTimeout": 86400,
    "InstanceId": "188****",
    "InstanceType": "postgresql",
    "DatabasePassword": "******",
    "InstanceAlias": "test",
    "DdlOnline": 0,
    "EcsRegion": "cn-beijing",
    "StandardGroup": {
      "GroupName": "test group name",
      "GroupMode": "NONE_CONTROL"
    },
    "SellSitd": "false"
  },
  "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