Updated on 2022-09-19 GMT+08:00

Listing All Tags of a Tenant

Function

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

URI

GET /v2/{project_id}/dcs/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 Tag objects

Tag list.

Table 3 Tag

Parameter

Type

Description

key

String

Tag key, which can contain a maximum of 36 Unicode characters.

values

Array of strings

Tag value.

Status code: 400

Table 4 Response body parameters

Parameter

Type

Description

error_msg

String

Error message.

Maximum: 1024

error_code

String

Error code.

Maximum: 9

error_ext_msg

String

Extended error information. This parameter is not used currently and is set to null.

Maximum: 1024

Status code: 500

Table 5 Response body parameters

Parameter

Type

Description

error_msg

String

Error message.

Maximum: 1024

error_code

String

Error code.

Maximum: 9

error_ext_msg

String

Extended error information. This parameter is not used currently and is set to null.

Maximum: 1024

Example Requests

POST https://{dcs_endpoint}/v2/{project_id}/dcs/tags

Example Responses

Status code: 200

Successfully queried all tags of the tenant.

{
  "tags" : [ {
    "values" : [ "value1", "value2" ],
    "key" : 1
  }, {
    "values" : [ "value1", "value2" ],
    "key" : 2
  } ]
}

Status Codes

Status Code

Description

200

Successfully queried all tags of the tenant.

400

Invalid request.

500

Internal service error.

Error Codes

See Error Codes.