Connecting a Domain Name to WAF¶
Function Description¶
This API is used to connect a domain name to WAF.
URI¶
URI format
PUT /v1/{project_id}/waf/instance/{instance_id}/access_status
Parameter description
¶ Parameter
Mandatory
Type
Description
projecte_id
Yes
String
Specifies the project ID.
instance_id
Yes
String
Specifies the instance ID.
Request¶
Request parameters
Parameter | Mandatory | Type | Description |
---|---|---|---|
access_status | Yes | Integer | Specifies whether a domain name is connected to WAF. 1: The domain name is connected to WAF. |
Response¶
Response parameters
Parameter | Mandatory | Type | Description |
---|---|---|---|
access_status | Yes | Integer | Specifies whether a domain name is connected to WAF.
|
protect_status | Yes | Integer | Specifies the WAF mode of a domain name.
|
Examples¶
access_status with a value of 1 is used as an example.
Request example
{ "access_status": 1 }
Response examples
The following shows the response if the domain name is connected to WAF:
{ "access_status": 1, "protect_status": 1 }
The following shows the response if connection fails:
{ "access_status": 0, "protect_status": 0 }
Status Code¶
Table 4 describes the normal status code returned by the API.
Status Code | Description | Meaning |
---|---|---|
200 | OK | The request has succeeded. |
For details about error status codes, see Status Codes.