You can call the DescribeDTCSecurityIpHostsForSQLServer operation to query the distributed transaction whitelists of an ApsaraDB RDS instance.
For more information, see Configure a distributed transaction whitelist.
This operation is applicable to instances that run one of the following SQL Server versions on RDS High-Availability Edition: SQL Server 2012 SE, SQL Server 2012 EE, SQL Server 2014 SE, SQL Server 2016 SE, SQL Server 2016 EE, and SQL Server 2017 SE.
Debugging
Request parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| Action | String | Yes | DescribeDTCSecurityIpHostsForSQLServer |
The operation that you want to perform. Set the value to DescribeDTCSecurityIpHostsForSQLServer. |
| DBInstanceId | String | Yes | rm-uf6wjk5xxxxxxx |
The ID of the instance. |
| RegionId | String | Yes | cn-hangzhou |
The ID of the region in which the instances reside. You can call the DescribeRegions operation to query the most recent region list. |
| ResourceGroupId | String | No | rg-acfmy***** |
The ID of the resource group. |
Response parameters
| Parameter | Type | Example | Description |
|---|---|---|---|
| DBInstanceId | String | rm-uf6wjk5xxxxxxx |
The ID of the instance. |
| RequestId | String | 2CA62A70-2203-45C6-8E90-8971D5ACC0C2 |
The ID of the request. |
| IpHostPairNum | String | 1 |
The number of distributed transaction whitelists. |
| Items | Array of WhiteListGroups |
Details of distributed transaction whitelists. |
|
| WhiteListGroups | |||
| SecurityIpHosts | String | 192.168.1.100,k3ecstest |
The IP address of the ECS instance and the hostname of the Windows computer. Format: IP address,Hostname. Multiple values are separated with semicolons (;). |
| WhitelistGroupName | String | test1 |
The name of the distributed transaction whitelist. |
Examples
Sample requests
http(s)://rds.aliyuncs.com/?Action=DescribeDTCSecurityIpHostsForSQLServer
&DBInstanceId=rm-uf6wjk5xxxxxxx
&RegionId=cn-hangzhou
&<Common request parameters>
Sample success responses
XML format
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeDTCSecurityIpHostsForSQLServerResponse>
<Items>
<WhiteListGroups>
<WhitelistGroupName>test1</WhitelistGroupName>
<SecurityIpHosts>192.168.1.100,k3ecstest</SecurityIpHosts>
</WhiteListGroups>
</Items>
<IpHostPairNum>1</IpHostPairNum>
<RequestId>2CA62A70-2203-45C6-8E90-8971D5ACC0C2</RequestId>
</DescribeDTCSecurityIpHostsForSQLServerResponse>
JSON format
HTTP/1.1 200 OK
Content-Type:application/json
{
"Items" : {
"WhiteListGroups" : [ {
"WhitelistGroupName" : "test1",
"SecurityIpHosts" : "192.168.1.100,k3ecstest"
} ]
},
"IpHostPairNum" : 1,
"RequestId" : "2CA62A70-2203-45C6-8E90-8971D5ACC0C2"
}
Error codes
For a list of error codes, visit the API Error Center.