You can call this operation to modify the configuration of a specified domain name.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | Boolean | No | ModifyDomainConfig |
The operation that you want to perform. Valid values: ModifyDomainConfig. |
Domain | String | No | rstest.cdn.com |
The domain that you want to add to WAF. |
InstanceId | String | No | waf_elasticity-cn-0xldbqtm005 |
The ID of the WAF instance. Note You can callDescribePayInfo to view your WAF instance ID.
|
IsAccessProduct | Integer | Yes | 0 |
Indicates whether a layer -7 proxy, such as anti-DDoS pro or CDN, has been configured for the domain name in front of the WAF instance. Valid values:
|
Protocols | String | No | ["http"] |
The access protocol supported by the domain name. Valid values:
|
HttpPort | String | Yes | [80] |
The HTTP ports. When multiple HTTP ports are specified, separate them with commas
(,). Example value: Note This parameter is required if the Protocols parameter is set to http. Default value:
80. HttpPort and HttpsPort fill in at least one of the two request parameters.
|
HttpToUserIp | String | Optional | 0 |
Indicates whether to enable HTTP-based back-to-origin for HTTPS requests. Valid values:
Note If your website does not support HTTPS back-to-origin, enable the HTTP back-to-origin
feature (port 80 is selected by default) to enable HTTPS access through WAF.
|
HttpsPort | String | Yes | [443] |
The HTTPS ports. When multiple HTTPS ports are specified, separate them with commas
(,). Example value: Note This parameter is required if the Protocols parameter is set to https. Default value:
443. HttpPort and HttpsPort fill in at least one of the two request parameters.
|
HttpsRedirect | String | Optional | 1 |
The Https status. Set the value to:
|
LoadBalancing | String | Optional | 0 |
The load balancing method. Valid values:
|
Region | String | Yes | cn |
The ID of the region to which the WAF instance belongs. Set the value to:
|
SourceIps | String | Yes | ["1.1.1.1"] |
The origin IP address. Multiple IP addresses can be specified. Example: |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | D7861F61-5B61-46CE-A47C-6B19160D5EB0 |
The ID of the request. |
Result |
The returned result. |
||
Status | Integer | env |
Request execution status:
|
WafTaskId | String | aliyun.waf.20180712214032277.qmxI9a |
The ID of the WAF request. |
Samples
Sample request
https://wafopenapi.cn-hangzhou.aliyuncs.com/? Action=ModifyDomainConfig
&Domain=www.aliyun.com
&SourceIps=["x.x.x.x","x.x.x.x"]
&Protocols=["http","https"]
&HttpPort=[80]
&HttpsPort=[443]
&IsAccessProduct=0
&HttpsRedirect=1
&HttpToUserIp=0
&Common request parameters
Sample success responses
XML
format
<ModifyDomainConfigResponse>
<RequestId>D7861F61-5B61-46CE-A47C-6B19160D5EB0</RequestId>
<Result>
<Status>2</Status>
<WafTaskId>aliyun.waf.20180712214032277.qmxI9a</WafTaskId>
</Result>
</ModifyDomainConfigResponse>
JSON
format
{
"Result":{
"Status":2,
"WafTaskId":"aliyun.waf.20180712214032277.qmxI9a"
},
"RequestId":"D7861F61-5B61-46CE-A47C-6B19160D5EB0"
}
Error codes.
For a list of error codes, visit the API Error Center.