调用DescribeDTCSecurityIpHostsForSQLServer接口查询RDS实例的分布式事务白名单信息。
关于分布式事务白名单请参见设置分布式事务白名单。
仅适用于RDS SQL Server高可用系列(2012标准版、2012企业版、2014标准版、2016标准版、2016企业版、2017标准版)。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
| 名称 | 类型 | 是否必选 | 示例值 | 描述 |
|---|---|---|---|---|
| Action | String | 是 | DescribeDTCSecurityIpHostsForSQLServer |
系统规定参数。取值:DescribeDTCSecurityIpHostsForSQLServer。 |
| DBInstanceId | String | 是 | rm-uf6wjk5xxxxxxx |
实例ID。 |
| RegionId | String | 是 | cn-hangzhou |
地域ID,可以通过接口DescribeRegions查看。 |
| ResourceGroupId | String | 否 | rg-acfmy***** |
资源组ID。 |
返回数据
| 名称 | 类型 | 示例值 | 描述 |
|---|---|---|---|
| DBInstanceId | String | rm-uf6wjk5xxxxxxx |
实例ID。 |
| RequestId | String | 2CA62A70-2203-45C6-8E90-8971D5ACC0C2 |
请求ID。 |
| IpHostPairNum | String | 1 |
分布式事务白名单条目数。 |
| Items | Array of WhiteListGroups |
分布式事务白名单分组列表。 |
|
| WhiteListGroups | |||
| SecurityIpHosts | String | 192.168.1.100,k3ecstest |
ECS实例的IP地址和Windows系统的计算机名。格式:ip,hostname。多个实例之间以英文分号(;)隔开。 |
| WhitelistGroupName | String | test1 |
分布式事务白名单分组名称。 |
示例
请求示例
http(s)://rds.aliyuncs.com/?Action=DescribeDTCSecurityIpHostsForSQLServer
&DBInstanceId=rm-uf6wjk5xxxxxxx
&RegionId=cn-hangzhou
&<公共请求参数>
正常返回示例
XML格式
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格式
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"
}
错误码
访问错误中心查看更多错误码。