查询sql防火墙信息
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
polardb:DescribeFirewallRules |
get |
*DBCluster
|
无 | 无 |
请求参数
名称 |
类型 |
必填 |
描述 |
示例值 |
DBClusterId |
string |
是 |
集群 ID。 |
pc-***************** |
RuleNameList |
string |
否 |
需要查询的防火墙规则名称。支持输入多个规则名称进行批量查询,多个名称间用英文逗号(,)分隔。 说明
您可以通过 DescribeFirewallRules 接口查看目标集群下所有防火墙规则的详情,包括规则名称。 |
testrule |
返回参数
名称 |
类型 |
描述 |
示例值 |
object |
Schema of Response |
||
RequestId |
string |
Id of the request |
84D7DCD2-54F7-5BD2-B055-F5DE9D2B5264 |
Message |
string |
请求返回消息。 说明
请求成功时该参数返回 Successful,请求失败时会返回请求异常信息(如错误码等)。 |
Message |
Success |
boolean |
请求结果。取值:
|
true |
Data |
object |
结果集。 |
|
RuleList |
array |
防火墙规则列表。 |
|
string |
规则对象。 |
"{"mode":"Defending","endpoint":"[{"EndpointName":"pe-**************","EndpointType":"Cluster","DBEndpointDescription":"Cluster Address"},{"EndpointName":"pe-************","EndpointType":"Custom","DBEndpointDescription":"pc-***********"},{"EndpointName":"pe-**************","EndpointType":"Custom","DBEndpointDescription":"pc-***********"}]","id":"test","sub_rules":[],"type":"BlackList","enabled":"true","users":{"applies_to":[]}}" |
|
DBClusterId |
string |
集群 ID。 |
pc-***************** |
示例
正常返回示例
JSON
格式
{
"RequestId": "84D7DCD2-54F7-5BD2-B055-F5DE9D2B5264",
"Message": "Message",
"Success": true,
"Data": {
"RuleList": [
"\"{\"mode\":\"Defending\",\"endpoint\":\"[{\"EndpointName\":\"pe-**************\",\"EndpointType\":\"Cluster\",\"DBEndpointDescription\":\"Cluster Address\"},{\"EndpointName\":\"pe-************\",\"EndpointType\":\"Custom\",\"DBEndpointDescription\":\"pc-***********\"},{\"EndpointName\":\"pe-**************\",\"EndpointType\":\"Custom\",\"DBEndpointDescription\":\"pc-***********\"}]\",\"id\":\"test\",\"sub_rules\":[],\"type\":\"BlackList\",\"enabled\":\"true\",\"users\":{\"applies_to\":[]}}\""
]
},
"DBClusterId": "pc-*****************\n"
}
错误码
HTTP status code |
错误码 |
错误信息 |
描述 |
---|---|---|---|
400 | InvalidDBClusterId.Malformed | The specified parameter DBClusterId is not valid. |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。