Help Center/ NAT Gateway/ API Reference/ Out-of-Date APIs/ API v2.0/ Public NAT Gateway Tags/ Querying Tags of All Public NAT Gateways in a Project
Updated on 2025-09-12 GMT+08:00

Querying Tags of All Public NAT Gateways in a Project

Function

This API is used to query tags of all public NAT gateways owned by a tenant in a region.

TMS uses this API to list tags created by a tenant to ease tag creation and resource filtering on the console.

URI

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

Table 1 Parameter description

Parameter

Mandatory

Type

Description

project_id

Yes

String

Specifies the project ID.

Request

None

Response

Table 2 lists the response parameter.

Table 2 Response parameter

Parameter

Mandatory

Type

Description

tags

Yes

Array

Specifies tags.

Table 3 Parameter description of field tags

Parameter

Mandatory

Type

Description

key

Yes

String

Specifies the tag key.

It contains a maximum of 36 Unicode characters. It cannot be left blank, and cannot contain ASCII characters (0–31) or the following special characters:

*<>\=

values

Yes

Array<String>

Specifies the tag values.

The value can contain a maximum of 43 Unicode characters and can be an empty string. It cannot contain ASCII characters (0–31) or the following special characters:

*<>\=

Examples

  • Example request
    GET  https://{VPC_endpoint}/v2.0/9ad601814ac94c80bf7bb9073ded66fc/nat_gateways/tags
  • Example response
    {
        "tags": [
            {
                "key": "key1",
                "values": [
                    "value1",
                    "value2"
                ]
            },
            {
                "key": "key2",
                "values": [
                    "value3",
                    "value4"
                ]
            }
        ]
    }

Status Codes

See Status Codes.