Modifies a domain name that is configured for CNAME access.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
yundun-waf:ModifyDomain |
update |
DefenseResource
DefenseResource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
The ID of the WAF instance. Note
You can call DescribeInstance to query the ID of your WAF instance. |
waf_cdnsdf3**** |
| Domain |
string |
No |
The domain name to modify. |
www.aliyundoc.com |
| DomainId |
string |
No |
The domain ID. |
www.aliyundoc.com-waf |
| Listen |
object |
Yes |
Configure listener settings. |
|
| HttpsPorts |
array |
No |
The HTTPS listener ports, in the format [port1,port2,…]. |
|
|
integer |
No |
An HTTPS listener port. |
443 |
|
| HttpPorts |
array |
No |
The HTTP listener ports, in the format [port1,port2,…]. |
|
|
integer |
No |
An HTTP listener port. |
80 |
|
| Http2Enabled |
boolean |
No |
Whether to enable HTTP/2. Use this parameter only when HttpsPorts is not empty (indicating that the domain uses HTTPS). Valid values:
|
true |
| CertId |
string |
No |
The ID of the certificate to add. |
123 |
| SM2Enabled |
boolean |
No |
Whether to enable SM certificates. |
true |
| SM2CertId |
string |
No |
The ID of the SM certificate to add. Use this parameter only when SM2Enabled is set to true. |
123-cn-hangzhou |
| SM2AccessOnly |
boolean |
No |
Whether only SM clients can access the domain. Use this parameter only when SM2Enabled is set to true. Valid values:
|
true |
| TLSVersion |
string |
No |
The TLS version to use. Use this parameter only when HttpsPorts is not empty (indicating that the domain uses HTTPS). Valid values:
|
tlsv1 |
| EnableTLSv3 |
boolean |
No |
Whether to support TLS 1.3. Use this parameter only when HttpsPorts is not empty (indicating that the domain uses HTTPS). Valid values:
|
true |
| CipherSuite |
integer |
No |
The cipher suite type to use. Use this parameter only when HttpsPorts is not empty (indicating that the domain uses HTTPS). Valid values:
|
2 |
| CustomCiphers |
array |
No |
The specific custom cipher suites to add. Use this parameter only when CipherSuite is set to 99. |
|
|
string |
No |
A custom cipher suite. |
["xxx","ffas"] |
|
| FocusHttps |
boolean |
No |
Whether to enable forced HTTPS redirection. Use this parameter only when HttpsPorts is not empty (indicating that the domain uses HTTPS) and HttpPorts is empty (indicating that the domain does not use HTTP). Valid values:
|
true |
| XffHeaderMode |
integer |
No |
How WAF retrieves the real client IP address. Valid values:
|
2 |
| XffHeaders |
array |
No |
The list of custom request header fields used to retrieve the client IP, in the format ["header1","header2",…]. Note
Set this parameter only when XffHeaderMode is set to 2 (indicating that WAF reads the client IP from a custom request header field you specify). |
|
|
string |
No |
A custom request header field used to retrieve the client IP. |
Client-ip |
|
| IPv6Enabled |
boolean |
No |
Whether to enable IPv6. Valid values:
|
true |
| ProtectionResource |
string |
No |
The protection resource type to use. Valid values:
|
share |
| ExclusiveIp |
boolean |
No |
Whether to enable an exclusive IP address. Use this parameter only when IPv6Enabled is false (indicating that IPv6 is disabled) and ProtectionResource is set to share (indicating that a shared cluster is used). Valid values:
|
true |
| Redirect |
object |
Yes |
Configure forwarding settings. |
|
| Backends |
array |
No |
The origin server IP addresses or origin domain names for the domain. You can specify either origin server IP addresses or an origin domain name, but not both. If you specify an origin domain name, only IPv4 is supported (IPv6 is not supported):
|
|
|
string |
No |
An origin server IP address or origin domain name. |
1.1.XX.XX |
|
| Loadbalance |
string |
Yes |
The load balancing algorithm used during back-to-origin requests. Valid values:
|
iphash |
| FocusHttpBackend |
boolean |
No |
Whether to force HTTP back-to-origin requests. Use this parameter only when HttpsPorts is not empty (indicating that the domain uses HTTPS). Valid values:
|
true |
| SniEnabled |
boolean |
No |
Whether to enable back-to-origin SNI. Use this parameter only when HttpsPorts is not empty (indicating that the domain uses HTTPS). Valid values:
|
true |
| SniHost |
string |
No |
The value for the custom SNI extension field. If you do not set this parameter, WAF uses the value of the Host field in the request header as the SNI extension field by default. Note
Set this parameter only when SniEnabled is set to true (indicating that custom back-to-origin SNI is enabled). |
www.aliyundoc.com |
| RequestHeaders |
array<object> |
No |
The traffic marking fields and values for the domain, used to mark traffic processed by WAF. By specifying custom request header fields and their corresponding values, WAF automatically adds these custom fields to the request headers when traffic for the domain passes through WAF. This helps your backend services track relevant information. |
|
|
object |
No |
The parameter value format is [{"k":"key","v":"value"}]. Here, key is the custom request header field, and value is the value assigned to that field. Note
If the request already contains the specified custom header field, WAF overwrites its value with the traffic marking value you set. |
||
| Key |
string |
No |
The custom request header field. |
aaa |
| Value |
string |
No |
The value assigned to the custom request header field. |
bbb |
| ConnectTimeout |
integer |
No |
The connection timeout in seconds. Valid values range from 1 to 3600. The default value is 5. |
120 |
| ReadTimeout |
integer |
No |
Specifies the read timeout period in seconds. Valid values: 1 to 3600. Default value: 120 |
200 |
| WriteTimeout |
integer |
No |
Specifies the write timeout in seconds. The value must be an integer from 1 to 3600. The default value is 120. |
200 |
| CnameEnabled |
boolean |
No |
Whether to enable public cloud disaster recovery. Valid values:
|
true |
| RoutingRules |
string |
No |
The hybrid cloud forwarding rules, represented as a JSON array string. Each element in the JSON array is a struct containing the following fields:
|
[ { "rs": [ "1.1.XX.XX" ], "backupRs": [ "2.2.XX.XX" ], "locationId": 535, "location": "test1111" } ] |
| Keepalive |
boolean |
No |
Whether to maintain persistent connections. Valid values:
|
true |
| Retry |
boolean |
No |
Whether WAF retries on back-to-origin failure. Valid values:
|
true |
| KeepaliveRequests |
integer |
No |
The number of requests to reuse per persistent connection. Valid values: 60 to 1000. Default value: 1000. Unit: requests. Note
When persistent connections are enabled, this parameter specifies how many requests each connection can handle before being reused. |
1000 |
| KeepaliveTimeout |
integer |
No |
The idle timeout for persistent connections. Valid values: 1 to 60. Default value: 15. Unit: seconds. Note
This parameter specifies how long an idle persistent connection remains open before being released. |
15 |
| XffProto |
boolean |
No |
Whether to pass the WAF protocol via X-Forwarded-Proto. Valid values:
|
true |
| BackupBackends |
array |
No |
The backup origin server IP addresses or origin domain names for the domain. |
|
|
string |
No |
The backup origin server IP addresses or origin domain names for the domain. You can specify either origin server IP addresses or an origin domain name, but not both. If you specify an origin domain name, only IPv4 is supported (IPv6 is not supported):
|
[ "1.1.XX.XX", "2.2.XX.XX" ] |
|
| XClientIp |
boolean |
No |
Whether to allow WAF to overwrite X-Client-IP. Valid values:
|
true |
| XTrueIp |
boolean |
No |
Whether to allow WAF to overwrite X-True-IP. Valid values:
|
true |
| WebServerType |
boolean |
No |
Whether to allow WAF to overwrite Web-Server-Type. Valid values:
|
true |
| WLProxyClientIp |
boolean |
No |
Whether to allow WAF to overwrite WL-Proxy-Client-IP. Valid values:
|
true |
| MaxBodySize |
integer |
No |
The maximum request body size. Valid values: 2 to 10. Default value: 2. Unit: GB. Note
Supported only in the Ultimate edition. |
2 |
| Http2Origin |
boolean |
No |
HTTP/2 back-to-origin. Valid values:
|
true |
| Http2OriginMaxConcurrency |
integer |
No |
The maximum concurrency for HTTP/2 back-to-origin requests. Valid values: 1 to 512. Default value: 2. Unit: requests. |
128 |
| BackendPorts |
array<object> |
No |
Custom port configuration. |
|
|
object |
No |
Custom port configuration. |
||
| ListenPort |
integer |
No |
The listener port. |
80 |
| BackendPort |
integer |
No |
The back-to-origin port. |
80 |
| Protocol |
string |
No |
The protocol for the listener port. Valid values:
|
http |
| RegionId |
string |
Yes |
The region where the WAF instance is deployed. Valid values:
|
cn-hangzhou |
| AccessType |
string |
No |
The access type of the WAF instance. Valid values:
|
share |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response. |
||
| RequestId |
string |
The request ID. |
D7861F61-5B61-46CE-A47C-6B19160D**** |
| DomainInfo |
object |
The information about the domain name. |
|
| Cname |
string |
The CNAME address assigned by WAF to the domain. |
xxxxxcvdaf.****.com |
| Domain |
string |
The domain to modify. |
www.aliyundoc.com |
| DomainId |
string |
The domain ID. |
www.aliyundoc.com-waf |
Examples
Success response
JSON format
{
"RequestId": "D7861F61-5B61-46CE-A47C-6B19160D****",
"DomainInfo": {
"Cname": "xxxxxcvdaf.****.com",
"Domain": "www.aliyundoc.com",
"DomainId": "www.aliyundoc.com-waf"
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | Waf.Pullin.BusinessViolation | The web services are suspected of violating regulations. If you have any questions, please submit a work order. Violating resource: %s. | |
| 400 | Waf.Control.DomainAndDomainIdBothEmpty | domain and domainId cannot be empty at the same time. | |
| 400 | Waf.Control.DomainAndDomainIdNotMatch | domain and domainId do not match. | |
| 400 | Waf.Control.DomainIdIsIllegal | The input parameter, the domainId is illegal. | |
| 400 | Waf.Pullin.BackupBackendConflict | The backup backend configuration conflicts. | |
| 400 | Waf.Pullin.BackendPortIncompatible | The back-to-source port is incompatible with the listening port, listening protocol:%s, listening port:%s, back-to-source port:%s. | |
| 400 | Waf.Pullin.Http2OriginMustOnKeepaliveEnable | When the HTTP2 origin is turned on, the keepalive must be turned on. | When the HTTP2 origin is turned on, the keepalive must be turned on. |
| 400 | Waf.Pullin.Http2OriginEnabledFocusHttpBackendForbidden | When HTTP2 origin is enabled, HTTP origin cannot be enabled. | When HTTP2 origin is enabled, HTTP origin cannot be enabled. |
| 400 | Waf.Pullin.BatchDnsScheduleCheckFailed | Batch dns scheduling is in progress, and access related operations are prohibited. | batch dns scheduling is in progress, and access-related operations are prohibited. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.