修改IPS规则为默认
接口说明
将用户自定义的入侵防御规则恢复为系统默认(实现为删除用户覆盖记录,恢复后规则跟随规则库默认值)。同一接口按 FirewallType 区分作用域和入参约束:\n- InternetFirewall / VpcFirewall:作用域为整个账号,RuleType 必填,Rules 与 AttackApp 至少传一个。\n- NatFirewall:作用域为 ProxyId 指定的单个 NAT 防火墙实例,RuleType 可选,Rules 与 AttackApp 均可选。\n 两条分支对 Rules 空数组的处理不同:互联网/VPC 边界传 [] 等价于按 RuleType 全量恢复;NAT 边界传 [] 返回 400 ErrorParameters,全量恢复请不传 Rules。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
yundun-cloudfirewall:ModifyIpsRulesToDefault |
get |
*全部资源
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| SourceIp |
string |
否 |
访问者源 IP 地址。 |
140.205.118.XXX |
| Lang |
string |
否 |
语言类型。取值:
|
zh |
| RuleType |
string |
否 |
规则类型。 取值:
|
customize |
| Rules |
string |
否 |
规则列表。存在条件必填依赖:当 RuleType 为 customize 时,本参数与 AttackApp 至少须提供一个;仅传 RuleType 而不传 Rules 或 AttackApp 时,API 返回 ErrorParameters。 |
[ "uuid_1", "uuid_2" ] |
| AttackApp |
string |
否 |
攻击应用。 |
PHP |
| FirewallType |
string |
否 |
云防火墙类型。取值:
|
InternetFirewall |
| ProxyId |
string |
否 |
NAT 防火墙实例 ID。仅当 FirewallType 取值为 NatFirewall 时必填,此时作用域为该实例下的规则;互联网/VPC 边界分支会忽略本参数。您可以通过调用 ListNatFirewallIpsConfigs 接口查询。 |
proxy-nat53f4bbc233234271a1d7 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| RequestId |
string |
结果的请求 ID。 |
B713361D-62E2-5FF0-9D29-BBFAAF40**** |
示例
正常返回示例
JSON格式
{
"RequestId": "B713361D-62E2-5FF0-9D29-BBFAAF40****"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | ErrorParametersUid | invalid aliUid. | 无效的Aliuid。 |
| 400 | ErrorDBSelect | An error occurred while querying database. | 内部错误:数据库查询错误 |
| 400 | ErrorMarshalJSON | internal error: marshal json. | 请求错误,请稍后重试。 |
| 400 | ErrorParameters | Parameters error. | 参数错误。 |
| 400 | ErrorDBInsert | An error occurred while performing an insert operation in the database. | 内部错误:数据库插入错误 |
| 400 | ErrorRecordLog | update operation log error. | 更新操作日志错误 |
| 400 | InvalidRuleType | Specified parameter RuleType is not valid. | |
| 400 | NatFirewallIpsConfig.NotSupported | The specified NAT firewall instance does not support intrusion prevention. | 指定的NAT防火墙实例不支持入侵防御。 |
| 500 | NatFirewallIpsConfig.ConfigAbnormal | The intrusion prevention configuration of the specified NAT firewall instance is abnormal. | 指定的NAT防火墙实例的入侵防御配置异常。 |
| 403 | Forbidden | You are not authorized to operate on the specified resource. | 您无权操作指定的资源。 |
| 404 | InvalidNatFirewallIpsConfig.NotFound | The specified NAT firewall instance does not exist. | 指定的NAT防火墙实例不存在。 |
| 404 | NatFirewallIpsConfig.NotInitialized | The intrusion prevention configuration of the specified NAT firewall instance is not initialized. | 指定的NAT防火墙实例的入侵防御配置未初始化。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。