Add new protection domain configuration - AddWafDomainHostInfo
Overview
Add new protection domain configuration
Definition
Public Parameters
| Parameter Name | Type | Description Information | Required |
|---|---|---|---|
| Action | string | Corresponding API command name, the current API is AddWafDomainHostInfo. | Yes |
| PublicKey | string | The user’s public key can be obtained from Console  | Yes |
| Signature | string | User signature generated based on public key and API command, see Signature Algorithm | Yes |
Request Parameters
| Parameter Name | Type | Description Information | Required |
|---|---|---|---|
| ProjectId | string | Project ID. If not filled in, the default project is used, and the sub-account must be filled in. Please refer to the GetProjectList interface. | No |
| FullDomain | string | Domain to be protected | Yes |
| WorkRegions | string | Workspace, a subset of the areas purchased by the user, separated by commas, such as: cn-bj,cn-sh | Yes |
| WorkMode | string | Working Mode, Defence: Enable Protection Rules, Alarm: Record without Blocking, Inactive: Allow; Default Alarm | No |
| SrcIP.N | string | Origin IP port information, format is: http://192.168.1.1  or http://192.168.1.1:80 ; compatible with http:192.168.1.1:80, supports CNAME | No |
| CertificateID | int | HTTPS certificate number, required when the origin prefix is https | No |
| HTTPRedirection | string | Use HTTP redirection, YES for enabled, NO for disabled. Only allowed to use in situations where HTTPS:YES, HTTP:NO and only the source station configured with https 443 port is set up. | No |
| ExclusiveIP | string | Indicates that this domain name uses a dedicated defense IP, YES for yes, NO for no; enabling will assign a dedicated defense IP to this domain name. | No |
| RealIPHeader | string | Obtain the real client address field, used when docking with other proxies such as CDN. | No |
| HTTPBack | string | Use HTTPS offloading, YES/NO | No |
| SourceIndicate | string | Traffic tagging, format as key:value | No |
| Http2 | string | Enable HTTP2? YES to enable, others to disable. | No |
| SrcLBMode | string | Origin server load balancing strategy, default is Round Robin (RR), options include: IpHash, RR | No |
Response Field
| Field Name | Type | Description Information | Required |
|---|---|---|---|
| RetCode | int | Return status code. If it is 0, it means successful return. If it is not 0, it means failure. | Yes |
| Action | string | Operation command name. | Yes |
| Message | string | Returns an error message, providing detailed description when RetCode is non-zero. | No |
| Id | int | Domain configuration ID returned after successful addition | No |
Example
Request Example
https://api.sigcalcloud.com/?Action=AddWafDomainHostInfo
&ProjectId=org-xxx
&FullDomain=www.test.com
&WorkRegions=cn-gd
&SrcIPNum=1
&SrcIP.0=http://106.75.66.11:80
&CertificateID=0
&ExclusiveIP=No
&HTTPBack=jQqKWgcf
&SourceIndicate=VyxSQeOP
&HTTP2=pUmPZWTR
&SrcLBMode=sPEOjSVlResponse Example
{
"Action": "AddWafDomainHostInfoResponse",
"Id": 9,
"RetCode": 0
}