Updated on 2025-11-21 GMT+08:00

Updating a Domain Name Group

Function

This API is used to update a domain name group.

URI

PUT /v1/{project_id}/domain-set/{set_id}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID, which is used to specify the project that an asset belongs to. You can query the assets of a project by project ID. You can obtain the project ID from the API or console. For details, see Obtaining a Project ID.

Constraints

N/A

Range

N/A

Default Value

N/A

set_id

Yes

String

Definition

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).

Constraints

N/A

Range

N/A

Default Value

N/A

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

enterprise_project_id

No

String

Definition

Enterprise project ID. If you plan enterprise projects based on your organization's plan, each enterprise project will have such an ID. After this parameter is configured, you can filter assets by enterprise project.

Constraints

N/A

Range

N/A

Default Value

0

fw_instance_id

Yes

String

Definition

Firewall instance ID, which is automatically generated after a CFW instance is created. You can obtain the ID by calling the API for querying a firewall instance.

Constraints

N/A

Range

N/A

Default Value

N/A

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition

User token. It can be obtained by calling the IAM API (value of X-Subject-Token in the response header).

Constraints

N/A

Range

N/A

Default Value

N/A

Table 4 Request body parameters

Parameter

Mandatory

Type

Description

name

Yes

String

Definition

Domain group name.

Constraints

N/A

Range

N/A

Default Value

N/A

description

No

String

Definition

Domain group description.

Constraints

N/A

Range

N/A

Default Value

N/A

Response Parameters

Status code: 200

Table 5 Response body parameters

Parameter

Type

Description

data

DomainSetResponseData object

Definition

Returned data of for updating a domain name group.

Range

N/A

Table 6 DomainSetResponseData

Parameter

Type

Description

id

String

Definition

Domain name group ID.

Range

N/A

name

String

Definition

Domain group name.

Range

N/A

Example Requests

Change the name of the domain name group 94da194d-24b2-4f60-919e-cf0bc76c75b3 of firewall 7a004e79-0b8b-4679-ab20-267f3946e8ba in project 9d80d070b6d44942af73c9c3d38e0429 to test.

https://{Endpoint}/v1/9d80d070b6d44942af73c9c3d38e0429/domain-set/94da194d-24b2-4f60-919e-cf0bc76c75b3?fw_instance_id=7a004e79-0b8b-4679-ab20-267f3946e8ba&enterprise_project_id=default

{
  "name" : "test",
  "description" : ""
}

Example Responses

Status code: 200

OK

{
  "data" : {
    "id" : "94da194d-24b2-4f60-919e-cf0bc76c75b3",
    "name" : "test"
  }
}

Status Codes

Status Code

Description

200

OK

Error Codes

See Error Codes.