Adding a NAT Gateway Tag
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.
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
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.
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
tag |
Yes |
Array |
Specifies the list of tags. |
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
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot