Modifies a CNAME-based domain name.
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 the current WAF instance. |
waf_cdnsdf3**** |
| Domain |
string |
No |
The domain name to operate on. |
www.aliyundoc.com |
| DomainId |
string |
No |
The domain name ID. |
www.aliyundoc.com-waf |
| Listen |
object |
Yes |
The listening configuration. |
|
| HttpsPorts |
array |
No |
The listening ports for HTTPS. Use the [port1,port2,...] format. |
|
|
integer |
No |
The listening port for HTTPS. |
443 |
|
| HttpPorts |
array |
No |
The listening ports for HTTP. Use the [port1,port2,...] format. |
|
|
integer |
No |
The listening port for HTTP. |
80 |
|
| Http2Enabled |
boolean |
No |
Specifies whether to enable HTTP/2. This parameter is used only when HttpsPorts is not empty, which indicates that the domain name uses HTTPS. Valid values: |
true |
| CertId |
string |
No |
The ID of the certificate to add. |
123 |
| SM2Enabled |
boolean |
No |
Specifies whether to enable the China Encryption (China SM) certificate. |
true |
| SM2CertId |
string |
No |
The ID of the China SM certificate to add. This parameter is used only when SM2Enable is set to true. |
123-cn-hangzhou |
| SM2AccessOnly |
boolean |
No |
Specifies whether to allow only client access. This parameter is used only when SM2Enable is set to true. |
true |
| TLSVersion |
string |
No |
The TLS version to add. This parameter is used only when HttpsPorts is not empty (indicating that the domain name uses the HTTPS protocol). Valid values:
|
tlsv1 |
| EnableTLSv3 |
boolean |
No |
Specifies whether to support TLS 1.3. Valid values: |
true |
| CipherSuite |
integer |
No |
The type of cipher suite to add. This parameter is used only when HttpsPorts is not empty, which indicates that the domain name uses HTTPS. Valid values: |
2 |
| CustomCiphers |
array |
No |
The specific custom cipher suites to add. This parameter is used only when CipherSuite is set to 99. |
|
|
string |
No |
The custom cipher suite. |
ECDHE-ECDSA-AES256-SHA384 |
|
| FocusHttps |
boolean |
No |
Specifies whether to enable forced HTTPS redirect. This parameter takes effect only when HttpsPorts is not empty (indicating that the domain name uses the HTTPS protocol) and HttpPorts is empty (indicating that the domain name does not use the HTTP protocol). Valid values:
|
true |
| XffHeaderMode |
integer |
No |
The method that WAF uses to obtain the originating IP address of the client. Valid values:
|
2 |
| XffHeaders |
array |
No |
The list of custom header fields used to obtain the client IP address. Use the ["header1","header2",...] format. |
|
|
string |
No |
The custom header fields used to obtain the client IP address. |
Client-ip |
|
| IPv6Enabled |
boolean |
No |
Specifies whether to enable IPv6. Valid values: |
true |
| ProtectionResource |
string |
No |
The type of protection resource to use. Valid values: |
share |
| ExclusiveIp |
boolean |
No |
Specifies whether to enable the exclusive IP address feature. This parameter is available only when IPv6Enabled is set to false and ProtectionResource is set to share. Valid values:
|
true |
| HstsIncludeSubDomain |
boolean |
No |
Specifies whether HSTS includes subdomains. Valid values:
|
false |
| HstsPreload |
boolean |
No |
Specifies whether to enable HSTS preloading. This feature is disabled by default. Valid values: |
false |
| HstsMaxAge |
integer |
No |
The HSTS expiration time. Unit: seconds. |
365000 |
| Redirect |
object |
Yes |
The forwarding configuration. |
|
| Backends |
array |
No |
The IP addresses or domain names of the origin servers that correspond to the domain name. You can set only one type: origin server IP addresses or origin server domain names. When the back-to-origin address is a domain name, only IPv4 is supported. IPv6 is not supported. |
|
|
string |
No |
The IP address or domain name of the origin server. |
1.1.XX.XX |
|
| Loadbalance |
string |
Yes |
The load balancing algorithm used for back-to-origin requests. Valid values:
|
iphash |
| FocusHttpBackend |
boolean |
No |
Specifies whether to enable forced HTTP back-to-origin. This parameter is used only when HttpsPorts is not empty, which indicates that the domain name uses HTTPS. Valid values: |
true |
| SniEnabled |
boolean |
No |
Specifies whether to enable back-to-origin SNI. This parameter is used only when HttpsPorts is not empty, which indicates that the domain name uses HTTPS. Valid values: |
true |
| SniHost |
string |
No |
The value of the custom SNI extension field. If you do not set this parameter, the value of the Host field in the request header is used as the value of the SNI extension field by default. In most cases, you do not need to customize the SNI unless your business has special configuration requirements and you want WAF to use an SNI that is different from the actual request Host in back-to-origin requests (that is, the custom SNI set here). Note
This parameter is required only when SniEnalbed is set to xxx (custom back-to-origin SNI). |
www.aliyundoc.com |
| RequestHeaders |
array<object> |
No |
The traffic tag fields and values of the domain name, used to tag traffic processed by WAF. |
|
|
object |
No |
The value of this parameter is in the [{"k":"key","v":"value"}] format. key specifies the custom request header field, and value specifies the value set for the field. |
||
| Key |
string |
No |
The custom request header field. |
aaa |
| Value |
string |
No |
The value set for the custom request header field. |
bbb |
| ConnectTimeout |
integer |
No |
The connection timeout period. Unit: seconds. |
120 |
| ReadTimeout |
integer |
No |
The read timeout period. Unit: seconds. |
200 |
| WriteTimeout |
integer |
No |
The write timeout period. Unit: seconds. |
200 |
| CnameEnabled |
boolean |
No |
Specifies whether to enable public cloud disaster recovery. Valid values: |
true |
| RoutingRules |
string |
No |
The hybrid cloud forwarding rules. The value is a string that represents a JSON array. Each element in the JSON array is a struct that contains the following fields:
|
[ { "rs": [ "1.1.XX.XX" ], "backupRs": [ "2.2.XX.XX" ], "locationId": 535, "location": "test1111" } ] |
| Keepalive |
boolean |
No |
Specifies whether to enable persistent connections. Valid values: |
true |
| Retry |
boolean |
No |
Specifies whether to retry when WAF fails to forward requests to the origin server. Valid values:
|
true |
| KeepaliveRequests |
integer |
No |
The number of requests that reuse a persistent connection. Valid values: 60 to 1000. Default value: 1000. |
1000 |
| KeepaliveTimeout |
integer |
No |
The idle persistent connection timeout period. Valid values: 1 to 60. Default value: 15. Unit: seconds. |
15 |
| XffProto |
boolean |
No |
Specifies whether X-Forward-For-Proto passes the WAF protocol. Valid values: |
true |
| BackupBackends |
array |
No |
The IP addresses or domain names of the secondary origin servers that correspond to the domain name. |
|
|
string |
No |
The IP address or domain name of the secondary origin server. You can set only one type: origin server IP addresses or origin server domain names. When the back-to-origin address is a domain name, only IPv4 is supported. IPv6 is not supported. |
2.2.XX.XX |
|
| XClientIp |
boolean |
No |
Specifies whether to allow WAF to overwrite X-Client-IP. Valid values: |
true |
| XTrueIp |
boolean |
No |
Specifies whether WAF is allowed to overwrite X-True-IP. Valid values:
|
true |
| WebServerType |
boolean |
No |
Specifies whether to allow WAF to overwrite Web-Server-Type. Valid values: |
true |
| WLProxyClientIp |
boolean |
No |
Specifies 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. |
2 |
| Http2Origin |
boolean |
No |
Specifies whether to enable origin fetch over HTTP/2. Valid values:
|
true |
| Http2OriginMaxConcurrency |
integer |
No |
The maximum number of concurrent connections for HTTP/2 back-to-origin. Valid values: 1 to 512. Default value: 2. |
128 |
| ProxyProtocol |
boolean |
No |
Indicates whether the client source IP preservation feature is enabled.
|
false |
| BackendPorts |
array<object> |
No |
The custom port configuration. |
|
|
object |
No |
The custom port configuration. |
||
| ListenPort |
integer |
No |
The listening port. |
80 |
| BackendPort |
integer |
No |
The back-to-origin port. |
80 |
| Protocol |
string |
No |
The protocol of 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 parameters. |
||
| RequestId |
string |
The request ID. |
D7861F61-5B61-46CE-A47C-6B19160D**** |
| DomainInfo |
object |
The information about the added domain name. |
|
| Cname |
string |
The CNAME assigned by WAF to the domain name. |
xxxxxcvdaf.****.com |
| Domain |
string |
The domain name to be modified. |
www.aliyundoc.com |
| DomainId |
string |
The domain name 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. | 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. | The domain name and domain name ID cannot be empty at the same time. |
| 400 | Waf.Control.DomainAndDomainIdNotMatch | domain and domainId do not match. | The input parameters Domain and DomainId do not match |
| 400 | Waf.Control.DomainIdIsIllegal | The input parameter, the domainId is illegal. | Illegal entry DomainId |
| 400 | Waf.Pullin.BackupBackendConflict | The backup backend configuration conflicts. | The backup link back-to-source 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. | 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. |
| 400 | Waf.Pullin.InvalidMaxAgeWithPreload | HstsMaxAge the parameter is incorrect, when the HstsPreload is True, the HstsMaxAge must be greater than or equal to 31536000. | HstsMaxAge the parameter is incorrect, when the HstsPreload is True, the HstsMaxAge must be greater than or equal to 31536000 |
| 400 | Waf.Pullin.InvalidIncludeSubDomainWithPreload | The parameter HstsIncludeSubDomain is invalid. When the parameter HstsPreload is true, the HstsIncludeSubDomain must be true. | The parameter HstsIncludeSubDomain is invalid. When the parameter HstsPreload is true, the HstsIncludeSubDomain must be true. |
| 400 | Waf.Pullin.InvalidCustomCiphers | Invalid custom cipher suite. | Invalid custom cipher suite. |
| 400 | Waf.Pullin.InvalidHttp2OriginWithProxyProtocol | http2Origin and proxyProtocol cannot be opened at the same time. | http2Origin and proxyProtocol cannot be opened at the same time. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.