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

授权信息
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
polardb:AddFirewallRules |
create |
*DBCluster
|
无 | 无 |
请求参数
名称 |
类型 |
必填 |
描述 |
示例值 |
DBClusterId |
string |
是 |
集群 ID。 |
pc-***************** |
RuleName |
string |
否 |
防火墙规则名称。一次仅支持输入一个规则名称。 说明
|
testrule |
RuleConfig |
string |
否 |
需要添加的防火墙规则的配置参数及其值的 JSON 串,参数的值都是字符串类型,例如:
|
{"id":"test","enabled":"true","mode":"Collecting","users":{"applies_to":[]},"endpoint":"[{"EndpointName":"pe-************","EndpointType":"Cluster","DBEndpointDescription":"Cluster Address"},{"EndpointName":"pe-************","EndpointType":"Custom","DBEndpointDescription":"pc-************"},{"EndpointName":"pe-************","EndpointType":"Custom","DBEndpointDescription":"pc-************K"}]","type":"WhiteList"} |
ResourceGroupId |
string |
否 |
资源组 id。 |
rg-************ |
返回参数
名称 |
类型 |
描述 |
示例值 |
object |
Schema of Response |
||
RequestId |
string |
Id of the request |
2921D843-433A-5FB3-A03B-4EC093B219F8 |
Message |
string |
返回信息。 |
Successful |
Success |
boolean |
请求结果。取值:
|
True |
示例
正常返回示例
JSON
格式
{
"RequestId": "2921D843-433A-5FB3-A03B-4EC093B219F8",
"Message": "Successful",
"Success": true
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。