Cloud Server Tags
Tags are labels that can be added to cloud servers. With tags you can:
- add additional information about the server: image, configuration, purpose of the server, the environment in which the server is used, and other attributes;
- filter the servers in the list.
You can add a tag to an existing cloud server or when creating a server.
Limitations
The maximum number of tags for one cloud server is 10.
You can't change an added tag — you have to delete the tag and add a new one.
Add a tag to an existing cloud server
Control panel
OpenStack CLI
-
In the dashboard, on the top menu, click Products and select Cloud Servers.
-
Open the Servers tab.
-
If tags have not yet been added to the server, select Add Tags from the server menu.
-
If tags are added, from the server's menu, select Edit Tags.
-
Enter the name of the tag. The maximum length of the tag is 60 characters. You can use Latin or Cyrillic characters, numbers and hyphens.
-
Click .
-
Click Save.
-
Add a tag to the server:
openstack server set --tag <tag_name> --os-compute-api-version 2.26 <server>
Specify:
<tag_name>
— tag name;<server>
— Server ID or name. The list of servers can be viewed with the commandopenstack server list
.
Filter servers by tag
Control panel
OpenStack CLI
-
In the dashboard, on the top menu, click Products and select Cloud Servers.
-
Open the Servers tab.
-
To see a list of servers with a tag, click on the tag in the list. You can filter the list of servers by multiple tags.
-
Filter the servers:
- check out the list of servers with the tag:
openstack server list --tags <tag_name> --os-compute-api-version 2.26
- or look at the list of servers without the tag:
openstack server list --not-tags <tag_name> --os-compute-api-version 2.26
Specify
<tag_name>
— tag name.
Delete tag
Control panel
OpenStack CLI
You can remove any tag except the Interruptible
service tag. If you want to make the server uninterruptible , change the server type.
-
In the dashboard, on the top menu, click Products and select Cloud Servers.
-
Open the Servers tab.
-
From the server's menu, select Change Tags.
-
In the tag list, click .
-
Click Save.
-
Remove the tag:
openstack server unset --tag <tag_name> --os-compute-api-version 2.26 <server>
Specify:
<tag_name>
— tag name;<server>
— Server ID or name. The list of servers can be viewed with the commandopenstack server list
.