add domains
Function
add domains
Calling Method
For details, see Calling APIs.
URI
POST /v1/{project_id}/domain-set/domains/{set_id}
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID |
set_id |
Yes |
String |
Domain Set ID |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
enterprise_project_id |
No |
String |
Enterprise project id, the id generated by the enterprise project after the user supports the enterprise project. |
fw_instance_id |
No |
String |
Firewall instance ID, which is automatically generated after a CFW instance is created. You can obtain the ID by calling the API used for querying a firewall instance. For details, see the API Explorer and Help Center FAQ.By default, if fw_instance_Id is not specified, information about the first firewall under the account is returned. If fw_instance_Id is specified, information about the firewall with this fw_instance_Id is returned.If object_Id is specified, information about the firewall with this object_Id is returned by default. If both fw_instance_Id and object_Id are specified, the specified object_Id must belong to the specified firewall. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is a token. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
fw_instance_id |
Yes |
String |
Firewall instance ID, which is automatically generated after a CFW instance is created. You can obtain the ID by calling the API used for querying a firewall instance. For details, see the API Explorer and Help Center FAQ.By default, if fw_instance_Id is not specified, information about the first firewall under the account is returned. If fw_instance_Id is specified, information about the firewall with this fw_instance_Id is returned.If object_Id is specified, information about the firewall with this object_Id is returned by default. If both fw_instance_Id and object_Id are specified, the specified object_Id must belong to the specified firewall. |
object_id |
Yes |
String |
Protected object ID, which is used to distinguish Internet border protection from VPC border protection after a CFW instance is created. You can obtain the ID by calling the API used for querying a firewall instance. Note that the value 0 indicates the ID of a protected object on the Internet border, and the value 1 indicates the ID of a protected object on the VPC border. For details, see the API Explorer and Help Center FAQ. |
domain_names |
Yes |
Array of DomainSetInfoDto objects |
domain names |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
data |
DomainSetResponseData object |
add domains response data |
Example Requests
Add domain names to the domain set under the project where project id is 14181c1245cf4fd786824efe1e2b9388, the firewall instance id is 546af3f8-88e9-47f2-a205-2346d7090925, the protected object id is ae42418e-f077-41a0-9d3b-5b2f5ad9102b, The domain set id is 78719348-6d79-477e-acec -676a29842ab2, and the domain names are www.bnm.com and www.vbc.com
https://{Endpoint}v1/14181c1245cf4fd786824efe1e2b9388/domain-set/domains/78719348-6d79-477e-acec-676a29842ab2?fw_instance_id=546af3f8-88e9-47f2-a205-2346d7090925&enterprise_project_id=default { "domain_names" : [ { "description" : "", "domain_name" : "www.bnm.com" }, { "description" : "", "domain_name" : "www.vbc.com" } ], "fw_instance_id" : "546af3f8-88e9-47f2-a205-2346d7090925", "object_id" : "ae42418e-f077-41a0-9d3b-5b2f5ad9102b" }
Example Responses
Status code: 200
add domains response
{ "data" : { "id" : "78719348-6d79-477e-acec-676a29842ab2", "name" : "test26" } }
Status Codes
Status Code |
Description |
---|---|
200 |
add domains response |
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