Modifies the forwarding rule of a website. You can modify the information of origin servers and protocols, associated Anti-DDoS Pro or Anti-DDoS Premium instances, and advanced HTTPS settings in a forwarding rule.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ModifyWebRule |
The operation that you want to perform. Set the value to ModifyWebRule. |
RegionId | String | No | cn-hangzhou |
The region ID of the instance. Valid values:
|
ResourceGroupId | String | No | rg-acfm2pz25js**** |
The ID of the resource group to which the instance belongs in Resource Management. This parameter is empty by default, which indicates that the instance belongs to the default resource group. For more information about resource groups, see Create a resource group. |
Domain | String | Yes | www.aliyun.com |
The domain name of the website. Note A forwarding rule must be configured for the domain name. You can call the DescribeDomains operation to query the domain names for which forwarding rules are configured.
|
ProxyTypes | String | Yes | [{"ProxyType":"https","ProxyPorts":[443]}] |
The protocol of the forwarding rule. The value is a string that consists of JSON arrays. Each element in a JSON array is a JSON struct that contains the following fields:
|
RsType | Integer | Yes | 0 |
The address type of the origin server. Valid values:
|
HttpsExt | String | No | {"Http2":1,"Http2https":1,"Https2http":1} |
The advanced HTTPS settings. This parameter takes effect only when the value of ProxyType includes https. The value is a string that consists of a JSON struct. The JSON struct contains the following fields:
|
RealServers.N | String | Yes | 192.XX.XX.2 |
The address of the origin server. |
InstanceIds.N | String | No | ddoscoo-cn-i7m27nf3**** |
The ID of instance N that you want to associate. Note You can call the DescribeInstanceIds operation to query the IDs of all instances.
|
All Alibaba Cloud API operations must include common request parameters. For more information about common request parameters, see Common parameters.
For more information about sample requests, see the "Examples" section of this topic.
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | CB3261D2-7D1B-4ADA-9E98-A200B2CDA2DC |
The ID of the request. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=ModifyWebRule
&Domain=www.aliyun.com
&ProxyTypes=[{"ProxyType":"https","ProxyPorts":[443]}]
&RsType=0
&HttpsExt={"Http2":1,"Http2https":1,"Https2http":1}
&RealServers=["192.XX.XX.2"]
&InstanceIds=["ddoscoo-cn-i7m27nf3****"]
&Common request parameters
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<ModifyWebRuleResponse>
<RequestId>CB3261D2-7D1B-4ADA-9E98-A200B2CDA2DC</RequestId>
</ModifyWebRuleResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "CB3261D2-7D1B-4ADA-9E98-A200B2CDA2DC"
}
Error codes
For a list of error codes, visit the API Error Center.