Adding a Domain Name to WAF
Function
This API is used to add a domain name to WAF.
URI
POST /v1/edgewaf/domains
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 |
---|---|---|---|
domain_name |
Yes |
String |
Protected domain name, which can be obtained by calling the CDN domain name query API. The domain name can contain a port number. |
enterprise_project_id |
No |
String |
Obtain the enterprise project ID by calling the ListEnterpriseProject API of Enterprise Project Management Service (EPS). |
policy_id |
No |
String |
ID of the policy associated with the protected domain name. It can be obtained by calling the API for querying WAF protection policies. |
certificate_id |
No |
String |
Certificate ID, which is obtained through the ListCertificates API.
|
web_tag |
No |
String |
Domain name. |
description |
No |
String |
Domain name description. |
area_type |
Yes |
String |
Region that the domain name belongs to. Obtain the value by calling the API for querying the CDN domain name. Enumeration values:
|
Response Parameters
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Status code: 401
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Example Requests
Add domain_name to be protected by WAF.
POST https://{Endpoint}/v1/edgewaf/domains { "domain_name" : "domain_name", "enterprise_project_id" : 0, "policy_id" : "1771a426afcc4e16b8636cb72c2d53e4", "web_tag" : "domain_name", "description" : "demo", "area_type" : "outside_mainland_china" }
Example Responses
None
Status Codes
Status Code |
Description |
---|---|
200 |
Request succeeded. |
400 |
Request failed. |
401 |
The token does not have required permissions. |
500 |
Internal server error. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot