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 obtain the tenant ID. |
Host | String | Yes | 192.168.XXX.XXX |
The endpoint of the database instance. You can call the ListInstances operation to obtain the endpoint. |
Port | Integer | Yes | 3306 |
The port number that is used to connect to the database instance. You can call the ListInstances operation to obtain the port number. |
Sid | String | No | test |
The system ID (SID) of the database instance. You can call the ListInstances operation to obtain the SID. |
RegionId | String | No | cn-hangzhou |
The ID of the region in which Data Management (DMS) is activated. For more information about the valid values of this parameter, see RegionID parameter. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 14CE151B-9FF1-5DD7-AD30-D560EFC03D5C |
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) for the database instance. |
UseDsql | Integer | 0 |
Indicates whether the cross-database query feature is enabled for the database instance. Valid values:
|
Port | Integer | 3306 |
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 | product |
The type of the environment to which the database instance belongs. Valid values:
|
Sid | String | test |
The SID of the database instance. |
OwnerIdList | Array of String | 10**** |
The IDs of the owners for the database instance. |
SafeRuleId | String | 3**** |
The ID of the security rule set for the database instance. |
OwnerNameList | Array of String | yuyang_test |
The nicknames of the owners for the database instance. |
DbaNickName | String | dbaname |
The nickname of the DBA for 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 host address 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 for the database instance. |
ExportTimeout | Integer | 86400 |
The timeout period for exporting data from the database instance. |
InstanceId | String | 168**** |
The ID of the database instance. |
InstanceType | String | mysql |
The type of the database instance. |
DatabasePassword | String | ****** |
The password that is used to log on to the database. |
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-hangzhou |
The ID of the region in which the database instance resides. |
StandardGroup | Object |
The control mode of the database instance. |
|
GroupName | String | test group name |
The name of the security rule set corresponding to the control mode. |
GroupMode | String | COMMON |
The type of the control mode. Valid values:
|
ErrorCode | String | UnknownError |
The error code that is returned. |
ErrorMessage | String | UnknownError |
The error message that is returned. |
Success | Boolean | true |
Indicates whether the request was successful. Valid values:
|
Examples
Sample request
http(s)://dms-enterprise.aliyuncs.com/?Action=GetInstance
&Tid=1
&Host=192.168.XXX.XXX
&Port=3306
&Sid=test
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<GetInstanceResponse>
<RequestId>14CE151B-9FF1-5DD7-AD30-D560EFC03D5C</RequestId>
<Instance>
<VpcId>vpc-o6wrloqsdqc9io3mg****</VpcId>
<DatabaseUser>dbuser</DatabaseUser>
<DbaId>29****</DbaId>
<UseDsql>0</UseDsql>
<Port>3306</Port>
<EcsInstanceId>i-bp124ldpklqz59y3****</EcsInstanceId>
<EnvType>product</EnvType>
<Sid>test</Sid>
<OwnerIdList>10****</OwnerIdList>
<SafeRuleId>3****</SafeRuleId>
<OwnerNameList>yuyang_test</OwnerNameList>
<DbaNickName>dbaname</DbaNickName>
<QueryTimeout>7200</QueryTimeout>
<InstanceSource>ECS_OWN</InstanceSource>
<Host>192.168.XXX.XXX</Host>
<State>NORMAL</State>
<DataLinkName>test</DataLinkName>
<ExportTimeout>86400</ExportTimeout>
<InstanceId>168****</InstanceId>
<InstanceType>mysql</InstanceType>
<DatabasePassword>******</DatabasePassword>
<InstanceAlias>test</InstanceAlias>
<DdlOnline>0</DdlOnline>
<EcsRegion>cn-hangzhou</EcsRegion>
<StandardGroup>
<GroupName>test group name</GroupName>
<GroupMode>COMMON</GroupMode>
</StandardGroup>
</Instance>
<ErrorCode>UnknownError</ErrorCode>
<ErrorMessage>UnknownError</ErrorMessage>
<Success>true</Success>
</GetInstanceResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "14CE151B-9FF1-5DD7-AD30-D560EFC03D5C",
"Instance" : {
"VpcId" : "vpc-o6wrloqsdqc9io3mg****",
"DatabaseUser" : "dbuser",
"DbaId" : "29****",
"UseDsql" : 0,
"Port" : 3306,
"EcsInstanceId" : "i-bp124ldpklqz59y3****",
"EnvType" : "product",
"Sid" : "test",
"OwnerIdList" : [ "10****" ],
"SafeRuleId" : "3****",
"OwnerNameList" : [ "yuyang_test" ],
"DbaNickName" : "dbaname",
"QueryTimeout" : 7200,
"InstanceSource" : "ECS_OWN",
"Host" : "192.168.XXX.XXX",
"State" : "NORMAL",
"DataLinkName" : "test",
"ExportTimeout" : 86400,
"InstanceId" : "168****",
"InstanceType" : "mysql",
"DatabasePassword" : "******",
"InstanceAlias" : "test",
"DdlOnline" : 0,
"EcsRegion" : "cn-hangzhou",
"StandardGroup" : {
"GroupName" : "test group name",
"GroupMode" : "COMMON"
}
},
"ErrorCode" : "UnknownError",
"ErrorMessage" : "UnknownError",
"Success" : true
}
Error codes
For a list of error codes, visit the API Error Center.