• Virtual Private Cloud

vpc
  1. Help Center
  2. Virtual Private Cloud
  3. API Reference
  4. APIs
  5. VPC Tag Management
  6. Querying VPC Tags in a Specified Project

Querying VPC Tags in a Specified Project

Function

This interface is used to query all VPC tags of a tenant in a specified region. In the URI, project_id indicates the project ID.

URI

GET /v2.0/{project_id}/vpcs/tags

Request Message

Request parameter

None

Example request

GET /v2.0/{project_id}/vpcs/tags

Response Message

Response parameter

Table 1 Response parameter

Parameter

Type

Description

tags

List<tag>

Specifies the tag list.

Table 2 Description of the tag field

Name

Type

Description

key

String

Specifies the tag key.

  • Cannot be left blank.
  • Can contain a maximum of 36 characters.
  • Can contain only the following character types:
    • Uppercase letters
    • Lowercase letters
    • Digits
    • Special characters, including hyphens (-) and underscores (_)

values

List<String>

Specifies the tag value list.

  • Can contain a maximum of 43 characters.
  • Can contain only the following character types:
    • Uppercase letters
    • Lowercase letters
    • Digits
    • Special characters, including hyphens (-) and underscores (_)

Example response

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

Status Codes

Normal Response Code

Type

Description

200

OK

Specifies the normal response code for the GET operation.

Error Codes

For details, see section VPC Tag Error Codes.