Help Center/ Virtual Private Cloud/ API Reference/ VPC APIs (V1/V2)/ Security Group Tag Management/ Querying Security Group Tags in a Specified Project
Updated on 2025-11-10 GMT+08:00

Querying Security Group Tags in a Specified Project

Function

This API is used to query all security group tags of a tenant in a specified region.

Debugging

You can debug this API through automatic authentication in API Explorer.

URI

GET /v2.0/{project_id}/security-groups/tags

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID

Request Parameters

None

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

tags

Array of ListTag objects

Tags

Table 3 ListTag

Parameter

Type

Description

key

String

Tag key.

The key cannot be left blank.

Minimum: 1

Maximum: 127

values

Array of strings

Tag values.

If values are null, it indicates any_value. All values of a tag key are in the OR relationship.

Example Requests

Querying Security Group Tags in a Specified Project

GET https://{Endpoint}/v2.0/{project_id}/security-groups/tags

Example Responses

Status code: 200

The response to the request is normal. For more status codes, see Status Codes.

{
  "tags" : [ {
    "key" : "key1",
    "values" : [ "value1", "value2" ]
  }, {
    "key" : "key2",
    "values" : [ "value1", "value2" ]
  } ]
}

Status Codes

Status Code

Description

200

The response to the request is normal. For more status codes, see Status Codes.

Error Codes

See Error Codes.