Connecting a Domain Name to a Dedicated WAF Instance
Function
This API is used to connect a domain name to a dedicated WAF instance.
Debugging
You can use API Explorer to debug this API.
URI
POST /v1/{project_id}/premium-waf/host
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| enterprise_project_id | No | String | Enterprise project ID |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | User token. It can be obtained by calling the IAM API (value of X-Subject-Token in the response header). |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| certificateid | No | String | Certificate ID |
| certificatename | No | String | Certificate name |
| hostname | Yes | String | Domain name or IP address (or IP address with port) |
| proxy | No | Boolean | Whether a proxy is used |
| policyid | No | String | ID of the policy initially applied to the protected domain name |
| server | No | Array of PremiumWafServer objects | Configuration of retrieval server in dedicated mode |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| front_protocol | Yes | String | Client protocol |
| back_protocol | Yes | String | Server protocol |
| address | Yes | String | Server address |
| port | Yes | Integer | Server port |
| type | No | String | Origin server IP address format. The options are IPv 4 and IPv6. Default: ipv4 |
| vpc_id | No | String | ID of the VPC where the dedicated WAF engine resides. The origin server and the dedicated WAF engine must be in the same subnet. |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| id | String | Domain name ID |
| policyid | String | Policy ID |
| hostname | String | Policy ID |
| domainid | String | Tenant ID |
| projectid | String | Project ID |
| protocol | String | HTTP protocol |
Status code: 400
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code |
| error_msg | String | Error code message |
Status code: 401
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code |
| error_msg | String | Error code message |
Status code: 500
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code |
| error_msg | String | Error code message |
Example Requests
{
"hostname" : "www.test.com",
"server" : [ {
"front_protocol" : "HTTP",
"back_protocol" : "HTTP",
"vpc_id" : "34e414f6-2407-456b-b61d-93d64e9e56f0",
"type" : "ipv4",
"address" : "1.1.1.1",
"port" : 80
} ],
"proxy" : true
} Example Responses
None
Status Codes
| Status Code | Description |
|---|---|
| 200 | OK |
| 400 | Invalid request |
| 401 | Unauthorized token |
| 500 | Internal server error |
Error Codes
See Error Codes.
Last Article: Protected Website Management in Dedicated Mode
Next Article: Querying the List of Domain Names Connected to Dedicated WAF Instances
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.