ModifyDefenseRuleStatus

更新时间:
复制 MD 格式

Enables or disables a protection rule.

Try it now

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

InstanceId

string

Yes

The ID of the WAF instance.

Note

Call DescribeInstance to query the ID of the WAF instance.

waf_cdnsdf3****

TemplateId

integer

No

The ID of the protection template.

7239

RuleId

integer

Yes

The ID of the protection rule to modify.

20002615

RuleStatus

integer

Yes

The new status of the protection rule. Valid values:

  • 0: disabled

  • 1: enabled

1

RegionId

string

No

The region of the WAF instance. Valid values:

  • cn-hangzhou: the Chinese mainland.

  • ap-southeast-1: outside the Chinese mainland.

cn-hangzhou

ResourceManagerResourceGroupId

string

No

The ID of the resource group.

rg-acfm***q

DefenseType

string

No

The type of the protection rule. Valid values:

  • template (default): a template protection rule.

  • resource: a rule that is configured for a protected object.

Valid values:

  • template :

    template

  • resource :

    resource

template

Response elements

Element

Type

Description

Example

object

The response.

RequestId

string

The request ID.

BB305BF3-3C71-57A9-9704-E22F567689B0

Examples

Success response

JSON format

{
  "RequestId": "BB305BF3-3C71-57A9-9704-E22F567689B0"
}

Error codes

See Error Codes for a complete list.

Release notes

See 变更详情 for a complete list.