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

Modifying a Service Group

Function

This API is used to update a service group.

URI

PUT /v1/{project_id}/service-sets/{set_id}

Table 1 Path Parameters

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

Service group ID, which can be obtained by calling the API for querying the service group list. Find the value in data.records.set_id (The period [.] is used to separate different levels of objects).

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

enterprise_project_id

No

String

Enterprise project ID, which is the ID of a project planned based on organizations. If the enterprise project function is not enabled, the value is 0.

fw_instance_id

No

String

Firewall ID, which can be obtained by referring to Obtaining a Firewall ID.

Request Parameters

Table 3 Request header 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).

Table 4 Request body parameters

Parameter

Mandatory

Type

Description

name

No

String

Service group name.

description

No

String

Service group description.

Response Parameters

Status code: 200

Table 5 Response body parameters

Parameter

Type

Description

data

ServiceSetId object

Data returned for updating a service group.

Table 6 ServiceSetId

Parameter

Type

Description

id

String

Service group ID.

name

String

Service group name.

Status code: 400

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Definition

Error code.

Range

N/A

error_msg

String

Definition

Error description.

Range

N/A

Example Requests

Change the name of the service group 221cfdca-3abf-4c30-ab0d-516a03c70866 in project 9d80d070b6d44942af73c9c3d38e0429 to ceshi2 and change its description to Description.

https://{Endpoint}/v1/9d80d070b6d44942af73c9c3d38e0429/service-sets/221cfdca-3abf-4c30-ab0d-516a03c70866

{
  "name" : "ceshi2",
  "description" : "Description."
}

Example Responses

Status code: 200

OK

{
  "data" : {
    "id" : "221cfdca-3abf-4c30-ab0d-516a03c70866"
  }
}

Status code: 400

Bad Request

{
  "error_code" : "CFW.00200005",
  "error_msg" : "Object not found."
}

Status Codes

Status Code

Description

200

OK

400

Bad Request

401

Unauthorized: Request error.

403

Forbidden: Access forbidden.

404

Not Found: Web page not found.

500

Internal Server Error

Error Codes

See Error Codes.