Tags
You can add tags to IPsec-VPN resources to identify and classify them, which simplifies searching and aggregation. This topic uses a vpn gateway as an example to show how to manage and use tags. The procedure for tagging other IPsec-VPN resources is similar.
Overview

As your number of vpn gateways grows, management becomes more complex. Tags help you group, search for, and filter your gateways.
A tag is a label that you assign to an instance. Each tag consists of a key-value pair. Keep the following rules in mind when using tags:
-
You can add tags to vpn gateways, customer gateways, and IPsec-VPN connections.
-
Each tag key on an instance must be unique.
-
A tag key is required. A tag value is optional and can be an empty string.
-
Tags are not shared across different resource types.
For example, a tag that you create for a vpn gateway cannot be assigned to a customer gateway.
-
Tags are specific to a region.
For example, a tag created in the China (Hangzhou) region is not visible in the China (Shanghai) region.
-
You can modify the key and value of a tag or remove a tag from an instance at any time. If you delete an instance, all tags assigned to the instance are also deleted. This action does not affect tags on other instances.
-
You can bind a maximum of 20 tags to an instance. This quota cannot be increased.
This topic describes how to add and manage tags for resources in the VPN Gateway console. You can also manage tags for IPsec-VPN resources in the Resource Management console. Changes are synchronized between the two consoles. In the Resource Management console, you can also manage tags for other cloud resources. For more information, see What is a tag?.
Add tags to VPN gateways
- Log on to the VPN gateway console.
-
In the top navigation bar, select the region of the vpn gateway.
-
On the VPN Gateways page, add tags to one or more vpn gateways.
-
Add a tag to a single vpn gateway.
-
On the VPN Gateways page, find the vpn gateway that you want to tag, hover over the
icon in the Tags column, and then click Edit in the pop-up. -
In the Configure Tags dialog box, configure the tag as described in the following table and then click OK.
Parameter
Description
Tag Key
Select an existing tag key or enter a new one.
A tag key can be up to 128 characters long and cannot start with
aliyunoracs:, or containhttp://orhttps://.Tag Value
Select an existing tag value or enter a new one.
A tag value can be up to 128 characters long and cannot start with
aliyunoracs:, or containhttp://orhttps://. -
In the Configure Tags successfully dialog box, review the result and then click Close.
-
-
Add tags to multiple vpn gateways.
-
On the VPN Gateways page, select the vpn gateways to which you want to add tags. In the lower-left corner of the page, choose .
-
In the Configure Tags dialog box, set the Tag Key and Tag Value, and then click OK.
-
In the Configure Tags successfully dialog box, review the result and then click Close.
-
-
Filter VPN gateways by tag
After adding tags, you can use them to quickly filter your vpn gateways.
- Log on to the VPN gateway console.
-
In the top navigation bar, select the region of the vpn gateway.
-
On the VPN Gateways page, click Filter by Tag.
-
In the dialog box that appears, select a tag key and value. The console automatically filters the vpn gateways based on your selection.
Manage tags for VPN gateways
After you add tags to a vpn gateway, you can add more tags, or modify or remove existing tags.
- Log on to the VPN gateway console.
-
In the top navigation bar, select the region of the vpn gateway.
-
On the VPN Gateways page, perform the following operations to manage tags for vpn gateways.
-
Edit tags for a single vpn gateway
-
On the VPN Gateways page, find the vpn gateway that you want to manage, hover over the
icon in the Tags column, and then click Edit in the pop-up. -
In the Configure Tags dialog box, perform the following operations, and then click OK.
-
Add a tag: Add a new tag below the existing ones.
-
Modify a tag: Change the key or value of an existing tag.
-
Remove a tag: Click the
icon next to a tag.
-
-
In the Configure Tags successfully dialog box, review the result and then click Close.
-
-
Modify tags for multiple vpn gateways
-
On the VPN Gateways page, select the vpn gateways whose tags you want to modify. In the lower-left corner of the page, choose .
-
In the Configure Tags dialog box, modify the tags for the selected vpn gateways, and then click OK.
-
If you enter a new tag key, a new tag is added to the selected vpn gateways.
-
If you enter an existing tag key with a new value, the tag is updated on the selected vpn gateways.
-
-
In the Configure Tags successfully dialog box, review the result and then click Close.
-
-
Remove tags from multiple vpn gateways
-
On the VPN Gateways page, select the vpn gateways from which you want to remove tags. In the lower-left corner of the page, choose .
-
In the Delete Tags for Multiple Resources dialog box, select the key-value pairs that you want to remove, and then click Unbind {value} tags.
-
In the Configure Tags successfully dialog box, review the result and then click Close.
-
After you edit the tags, you can hover over the
icon in the Tags column of a vpn gateway to view its updated tags. -