Queries the details of a database instance.
Debugging
Request parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| Action | String | Yes | GetInstance | The operation that you want to perform. Set the value to GetInstance. |
| Tid | Long | Yes | 2*** | The ID of the tenant. You can call the GetUserActiveTenant operation to query the tenant ID. |
| Host | String | Yes | 172.17.XXX.XXX | The endpoint of the database instance. You can call the ListInstances operation to query the endpoint. |
| Port | Integer | Yes | 5432 | The port number that is used to connect to the database instance. You can call the ListInstances operation to query the port number. |
| Sid | String | No | test | The system ID (SID) of the database instance. You can call the ListInstances operation to query the SID. |
Response parameters
| Parameter | Type | Example | Description |
|---|---|---|---|
| RequestId | String | F6C80B69-3203-56AC-8021-18BA72A6F4E1 | The ID of the request. |
| Instance | Object | The details of the database instance. |
|
| VpcId | String | vpc-o6wrloqsdqc9io3mg**** | The ID of the virtual private cloud (VPC) to which the database instance belongs. |
| DatabaseUser | String | dbuser | The account that is used to log on to the database instance. |
| DbaId | String | 29**** | The ID of the database administrator (DBA) of the database instance. |
| UseDsql | Integer | 0 | Indicates whether the cross-database query feature is enabled for the database instance. Valid values:
|
| Port | Integer | 5432 | The port number that is used to connect to the database instance. |
| EcsInstanceId | String | i-bp124ldpklqz59y3**** | The ID of the Elastic Compute Service (ECS) instance on which the database instance is deployed. |
| EnvType | String | test | The type of the environment where the database instance is deployed. Valid values:
|
| Sid | String | test | The SID of the database instance. |
| OwnerIdList | Array of String | 10**** | The IDs of the owners of the database instance. |
| SafeRuleId | String | 3**** | The ID of the security rule set of the database instance. |
| OwnerNameList | Array of String | yang_test | The nicknames of the owners of the database instance. |
| DbaNickName | String | dbaname | The nickname of the DBA of the database instance. |
| QueryTimeout | Integer | 7200 | The timeout period for querying data in the database instance. |
| InstanceSource | String | ECS_OWN | The source of the database instance. |
| Host | String | 192.168.XXX.XXX | The endpoint that is used to connect to the database instance. |
| State | String | NORMAL | The status of the database instance. Valid values:
|
| DataLinkName | String | test | The name of the database link of the database instance. |
| ExportTimeout | Integer | 86400 | The timeout period for exporting data from the database instance. |
| InstanceId | String | 188**** | The ID of the instance. |
| InstanceType | String | postgresql | The type of the database instance. |
| DatabasePassword | String | ****** | The password that is used to log on to the database instance. |
| InstanceAlias | String | Test | The alias of the database instance. |
| DdlOnline | Integer | 0 | Indicates whether the lock-free schema change feature is enabled for the database instance. |
| EcsRegion | String | cn-beijing | The ID of the region in which the database instance resides. |
| StandardGroup | Object | The control mode of the database instance. |
|
| GroupName | String | Flexible Management | The name of the security rule corresponding to the control mode. |
| GroupMode | String | NONE_CONTROL | The type of the control mode. Valid values:
|
| SellSitd | String | false | Indicates whether the sensitive data protection feature is enabled. Valid values:
|
| ErrorCode | String | UnknownError | The error code returned if the request failed. |
| ErrorMessage | String | UnknownError | The error message returned if the request failed. |
| Success | Boolean | true | Indicates whether the request was successful. Valid values:
|
Examples
Sample requests
http(s)://dms-enterprise.aliyuncs.com/?Action=GetInstance
&Tid=1
&Host=172.17.XXX.XXX
&Port=5432
&Sid=test
&Common request parameters
Sample success responses
XML format
HTTP/1.1 200 OK
Content-Type:application/xml
<GetInstanceResponse>
<RequestId>F6C80B69-3203-56AC-8021-18BA72A6F4E1</RequestId>
<Instance>
<Port>5432</Port>
<DatabasePassword>******</DatabasePassword>
<ExportTimeout>86400</ExportTimeout>
<EnvType>test</EnvType>
<DbaId>12****</DbaId>
<InstanceAlias>Test</InstanceAlias>
<EcsRegion>cn-beijing</EcsRegion>
<InstanceType>postgresql</InstanceType>
<QueryTimeout>7200</QueryTimeout>
<DataLinkName>dbl_postgresql_2</DataLinkName>
<SafeRuleId>3****</SafeRuleId>
<SellSitd>false</SellSitd>
<InstanceSource>ECS_OWN</InstanceSource>
<StandardGroup>
<GroupName>Flexible Management</GroupName>
<GroupMode>NONE_CONTROL</GroupMode>
</StandardGroup>
<InstanceId>188****</InstanceId>
<Host>172.17.XXX.XXX</Host>
<DdlOnline>0</DdlOnline>
<UseDsql>0</UseDsql>
<EcsInstanceId>i-bp124ldpklqz59y3****</EcsInstanceId>
<State>NORMAL</State>
<DatabaseUser>postgres</DatabaseUser>
<OwnerNameList>
<OwnerNames>yang_test</OwnerNames>
</OwnerNameList>
<DbaNickName>dbaname</DbaNickName>
<OwnerIdList>
<OwnerIds>10****</OwnerIds>
</OwnerIdList>
</Instance>
<Success>true</Success>
</GetInstanceResponse>
JSON format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "F6C80B69-3203-56AC-8021-18BA72A6F4E1",
"Instance" : {
"Port" : 5432,
"DatabasePassword" : "******",
"ExportTimeout" : 86400,
"EnvType" : "test",
"DbaId" : "12****",
"InstanceAlias" : "Test",
"EcsRegion" : "cn-beijing",
"InstanceType" : "postgresql",
"QueryTimeout" : 7200,
"DataLinkName" : "dbl_postgresql_2",
"SafeRuleId" : "3****",
"SellSitd" : false,
"InstanceSource" : "ECS_OWN",
"StandardGroup" : {
"GroupName" : "Flexible Management",
"GroupMode" : "NONE_CONTROL"
},
"InstanceId" : "188****",
"Host" : "172.17.XXX.XXX",
"DdlOnline" : 0,
"UseDsql" : "0",
"EcsInstanceId" : "i-bp124ldpklqz59y3****",
"State" : "NORMAL",
"DatabaseUser" : "postgres",
"OwnerNameList" : {
"OwnerNames" : [ "yang_test" ]
},
"DbaNickName" : "dbaname",
"OwnerIdList" : {
"OwnerIds" : [ "10****" ]
}
},
"Success" : true
}
Error codes
For a list of error codes, see Service error codes.