All Products
Search
Document Center

Anti-DDoS:ModifyWebRule

Last Updated:Nov 05, 2025

Modifies an existing website forwarding rule.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

yundun-ddoscoo:ModifyWebRule

update

*All Resource

*

None

None

Request parameters

Parameter

Type

Required

Description

Example

ResourceGroupId

string

No

The resource group ID of the Anti-DDoS Proxy instance in Resource Management. Default value: empty, which indicates that the instance belongs to the default resource group.

For more information, see Create a resource group.

rg-acfm2pz25js****

Domain

string

Yes

The domain name of the website business to operate.

Note

The domain name must have a website forwarding rule configured. You can call DescribeDomains to query all domain names that have website forwarding rules configured.

www.aliyun.com

ProxyTypes

string

Yes

The protocol information of the website forwarding rule. This parameter is a string converted from a JSON array. Each element in the JSON array is a JSON struct that contains the following fields:

  • ProxyType: String type | Required | The website protocol type. Valid values: http | https | websocket | websockets.

  • ProxyPorts: array type | Required | The port numbers corresponding to the protocol.

[{"ProxyType":"https","ProxyPorts":[443]}]

RsType

integer

Yes

The address type of the origin server. Valid values:

  • 0: indicates the IP address of the origin server.

  • 1: indicates the domain name of the origin server. This is typically applicable to scenarios where other proxy services (such as WAF) are deployed between the origin server and Anti-DDoS Proxy, specifically referring to the redirect address of the proxy service (such as the WAF CNAME address).

0

HttpsExt

string

No

The HTTPS advanced settings, which take effect only when the website protocol type supports HTTPS (ProxyType includes https). This parameter is a string converted from a JSON struct that contains the following fields:

  • Http2https: Integer type | Optional | Specifies whether to enable the HTTPS force redirect feature. Valid values: 0 (disabled) | 1 (enabled). Default value: 0 (disabled).

    This is applicable when your website supports both HTTP and HTTPS protocols. After this setting is enabled, all HTTP requests will be forcibly converted to HTTPS requests and redirected to port 443 by default.

  • Https2http: Integer type | Optional | Specifies whether to enable the HTTP back-to-origin feature. Valid values: 0 (disabled) | 1 (enabled). Default value: 0 (disabled).

    This is applicable when your website does not support HTTPS back-to-origin. After this setting is enabled, all HTTPS protocol requests will be forwarded to the origin through HTTP (Websockets protocol requests will be forwarded through Websocket), and the default back-to-origin port is 80.

  • Http2: Integer type | Optional | Specifies whether to enable the HTTP2.0 protocol type. Valid values: 0 (disabled) | 1 (enabled). Default value: 0 (disabled).

    After this setting is enabled, the protocol version is HTTP2.0.

{"Http2":1,"Http2https":1,"Https2http":1}

RealServers

array

Yes

The list of origin server addresses.

1.xxx.xxx.1

string

No

The origin server address.

192.XX.XX.2

InstanceIds

array

No

The list of Anti-DDoS Proxy instance IDs to associate. You can associate up to 100 instances.

ddoscoo-cn-mp91j1ao****

string

No

The ID of the Anti-DDoS Proxy instance to associate.

Note

You can call DescribeInstanceIds to query the IDs of all Anti-DDoS Proxy instances.

ddoscoo-cn-i7m27nf3****

Response elements

Parameter

Type

Description

Example

object

RequestId

string

The ID of this request.

CB3261D2-7D1B-4ADA-9E98-A200B2CDA2DC

Examples

Success response

JSON format

{
  "RequestId": "CB3261D2-7D1B-4ADA-9E98-A200B2CDA2DC"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.