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

Querying Security Group Tags

Function

This API is used to query tags of a specified security group.

Debugging

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

URI

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

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID

security_group_id

Yes

String

Security Group ID

Request Parameters

None

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

tags

Array of ResourceTag objects

Tags

Table 3 ResourceTag

Parameter

Type

Description

key

String

  • Definition: Tag key.

  • Constraints:

    • Cannot be left blank.

    • Can contain a maximum of 128 characters.

    • Must be unique for each resource.

    • Can contain letters, digits, underscores (_), and hyphens (-).

value

String

  • Definition: Tag value.

  • Constraints:

    • Can contain a maximum of 255 characters.

    • Can contain letters, digits, underscores (_), periods (.), and hyphens (-).

Example Requests

Querying Security Group Tags

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

Example Responses

Status code: 200

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

{
  "tags" : [ {
    "key" : "key1",
    "value" : "value1"
  }, {
    "key" : "key2",
    "value" : "value3"
  } ]
}

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.