调用DescribeDBClusterNetInfo接口查询集群的网络信息。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | DescribeDBClusterNetInfo |
系统规定参数。取值:DescribeDBClusterNetInfo。 |
DBClusterId | String | 是 | am-bp1xxxxxxxx47 |
集群ID。 |
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
ClusterNetworkType | String | VPC |
集群网络类型。 |
RequestId | String | 1AD222E9-E606-4A42-BF6D-8A4442913CEF |
请求ID。 |
Items | Array of Address |
集群列表。 |
|
Address | |||
VSwitchId | String | vsw-xxxxxx |
交换机ID。 说明 当NetType取值为Public时,交换机ID返回为空。
|
ConnectionString | String | am-bpxxxxxxxx.ads.aliyuncs.com |
集群连接地址。 |
NetType | String | VPC |
网络类型。取值说明:
|
Port | String | 3306 |
集群连接端口。 |
VPCId | String | vpc-xxxxxxxxx |
VPC ID。 说明 当NetType取值为Public时,VPC ID返回为空。
|
IPAddress | String | 192.168.x.x |
IP地址。 |
ConnectionStringPrefix | String | am-bpxxxxxxxx89k51380 |
集群连接地址前缀。 |
示例
请求示例
http(s)://[Endpoint]/?Action=DescribeDBClusterNetInfo
&DBClusterId=am-bp1xxxxxxxx47
&公共请求参数
正常返回示例
XML
格式
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeDBClusterNetInfoResponse>
<ClusterNetworkType>VPC</ClusterNetworkType>
<RequestId>1AD222E9-E606-4A42-BF6D-8A4442913CEF</RequestId>
<Items>
<VSwitchId>vsw-xxxxxx</VSwitchId>
<ConnectionString>am-bpxxxxxxxx.ads.aliyuncs.com</ConnectionString>
<NetType>VPC</NetType>
<Port>3306</Port>
<VPCId>vpc-xxxxxxxxx</VPCId>
<IPAddress>192.168.x.x</IPAddress>
<ConnectionStringPrefix>am-bpxxxxxxxx89k51380</ConnectionStringPrefix>
</Items>
</DescribeDBClusterNetInfoResponse>
JSON
格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"ClusterNetworkType" : "VPC",
"RequestId" : "1AD222E9-E606-4A42-BF6D-8A4442913CEF",
"Items" : [ {
"VSwitchId" : "vsw-xxxxxx",
"ConnectionString" : "am-bpxxxxxxxx.ads.aliyuncs.com",
"NetType" : "VPC",
"Port" : "3306",
"VPCId" : "vpc-xxxxxxxxx",
"IPAddress" : "192.168.x.x",
"ConnectionStringPrefix" : "am-bpxxxxxxxx89k51380"
} ]
}
错误码
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
404 | InvalidDBCluster.NotFound | The DBClusterId provided does not exist in our records. | 您指定的 DBClusterId 不存在,请确认 DBClusterId 值是否正确。 |
访问错误中心查看更多错误码。