Updated on 2024-03-05 GMT+08:00

Querying All Tags of a Tenant

Function

This API is used to query the tags of all resources owned by a tenant in a specified project.

This API is available only in the AP-Singapore region.

URI

GET /v1.0/{project_id}/dcs/tags

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID.

Request

None

Response

When the status code is 200, the response parameters are as follows.

Parameter

Type

Description

key

String

Tag key, which

  • Contains a maximum of 36 Unicode characters.

values

Array of strings

Tag value, which

  • Contains a maximum of 43 Unicode characters.
  • Can be an empty string.

Example response

{
    "tags": [
        {
            "key": "001",
            "values": [
                "002"
            ]
        },
        {
            "key": "003",
            "values": [
                "004"
            ]
        }
    ]
}

Return Value

Return Value

Description

200

Successfully queried all tags of a tenant.

Error Codes

None