Cette page n'est pas encore disponible dans votre langue. Nous nous efforçons d'ajouter d'autres langues. Nous vous remercions de votre compréhension.

Help Center/ NAT Gateway/ API Reference/ API v2.0/ Tags/ Adding a NAT Gateway Tag

Adding a NAT Gateway Tag

Updated on 2023-04-19 GMT+08:00

Function

This API is used to add tags to a NAT gateway. You can add a maximum of 10 tags to a NAT gateway.

This API is idempotent.

If a to-be-created tag has the same key as an existing tag, the tag will be created and overwrite the existing one.

NOTE:

Ensure that the NAT gateway to which you will add tags is available.

URI

POST /v2.0/{project_id}/nat_gateways/{nat_gateway_id}/tags

Table 1 Parameter description

Parameter

Mandatory

Type

Description

project_id

Yes

String

Specifies the project ID.

nat_gateway_id

Yes

String

Specifies the NAT gateway ID.

Request

Table 2 describes the request parameters.

Table 2 Request parameter

Parameter

Mandatory

Type

Description

tag

Yes

Array

Specifies the list of tags.

Table 3 Parameter description of field tag

Parameter

Mandatory

Type

Description

key

Yes

String

Specifies the tag key. It contains a maximum of 36 Unicode characters. A tag key cannot be left blank. It cannot contain ASCII (0-31) or the following characters: =*<>\,|/

value

Yes

String

Specifies the key value. The value can contain a maximum of 43 Unicode characters and can be an empty string. It cannot contain ASCII (0-31) or the following characters: =*<>\,|/

Response

None

Examples

  • Example request
    POST  https://{VPC_endpoint}/v2.0/9ad601814ac94c80bf7bb9073ded66fc/nat_gateways/fe1a4cf0-27fe-4b97-a9b1-2c67c127f0e0/tags
    {
         "tag":
        {
            "key":"key1",
            "value":"value1"
        }
    }

Status Codes

See Status Codes.

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback