Reviewed-by: Gladkov, Maksim <mgladkov@noreply.gitea.eco.tsi-dev.otc-service.com> Co-authored-by: qiaoli <qiaoli@huawei.com> Co-committed-by: qiaoli <qiaoli@huawei.com>
13 KiB
Deleting a Domain Name List
Function
This API is used to delete a domain name list.
URI
DELETE /v1/{project_id}/domain-set/domains/{set_id}
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
project_id |
Yes |
String |
Project ID, which can be obtained by calling an API or from the console. For details, see Obtaining a Project ID. |
set_id |
Yes |
String |
Domain name group ID, which can be obtained by calling the API for querying the domain name group list. Find the value in data.records.set_id (The period [.] is used to separate different levels of objects). |
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
enterprise_project_id |
No |
String |
Enterprise project ID, which is the ID of a project planned based on organizations. You can obtain the enterprise project ID by referring to Obtaining an Enterprise Project ID. If the enterprise project function is not enabled, the value is 0. |
fw_instance_id |
Yes |
String |
Firewall ID, which can be obtained by referring to Obtaining a Firewall ID. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. You can obtain the token by referring to Obtaining a User Token. |
Content-Type |
Yes |
String |
Content type. It can only be set to application/json. |
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
object_id |
Yes |
String |
Protected object ID, which is used to distinguish between Internet border protection and VPC border protection after a cloud firewall is created. You can obtain the ID by calling the API for querying firewall instances. In the return value, find the ID in data.records.protect_objects.object_id (The period [.] is used to separate different levels of objects). If the value of type is 0, the protected object ID belongs to the Internet border. If the value of type is 1, the protected object ID belongs to the VPC border. You can obtain the value of type from data.records.protect_objects.type (The period [.] is used to separate different levels of objects). |
domain_address_ids |
Yes |
Array of strings |
Domain name ID list. Domain name IDs can be obtained by calling the API for querying the domain name list under a domain name group. Find the value in data.records.domain_address_id (The period [.] is used to separate different levels of objects). |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
|---|---|---|
data |
DomainSetResponseData object |
Returned data for deleting a domain name list. |
Example Requests
In project 14181c1245cf4fd786824efe1e2b9388, delete domain names from domain name group 78719348-6d79-477e-acec-676a29842ab2. The firewall ID is 546af3f8-88e9-47f2-a205-2346d7090925, the protected object ID is ae42418e-f077-41a0-9d3b-5b2f5ad9102b, the domain name group ID is 78719348-6d79-477e-acec-676a29842ab2, and the domain list is "b9c23ad8-16d2-4f14-894f-29250c5d27e5", "c36f9462-467b-4303-9734-f9abc38ddb95".
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_address_ids" : [ "b9c23ad8-16d2-4f14-894f-29250c5d27e5", "c36f9462-467b-4303-9734-f9abc38ddb95" ],
"object_id" : "ae42418e-f077-41a0-9d3b-5b2f5ad9102b"
}
Example Responses
Status code: 200
Return value for deleting a domain name list.
{
"data" : {
"id" : "78719348-6d79-477e-acec-676a29842ab2",
"name" : "test26"
}
}
Status Codes
Status Code |
Description |
|---|---|
200 |
Return value for deleting a domain name list. |
Error Codes
See Error Codes.