Cloud Server Tags
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 to an existing cloud server or at server creation.
Limitations
The maximum number of tags for one cloud server is 10.
You can't change an added tag — you have to tag and add a new one.
Add a tag to an existing cloud server
Control panel
OpenStack CLI
- В control panels go to Cloud platform → Servers.
- Open the tab Servers.
- If tags have not yet been added to the server, in the menu of the server select Add tags.
- If tags are added, in the menu of the server select Change tags.
- Enter the name of the tag. The maximum length of the tag is 60 characters. You can use Latin and Cyrillic letters, numbers and hyphen sign.
- 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>
— ID or server name. The list can be viewed withopenstack server list
Filter servers by tag
Control panel
OpenStack CLI
- В control panels go to Cloud platform → Servers.
- Open the tab Servers.
- To see a list of servers with a tag, click on the tag in the list. You can select more than one tag.
-
Filter the servers.
If you need to see a list of servers with the tag:
openstack server list --tags <tag_name> --os-compute-api-version 2.26
If you need to see a list of servers without a 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 delete any tag except the service tag Прерываемый
. If you need to make the server uninterruptible, change the server type.
- В control panels go to Cloud platform → Servers.
- Open the tab Servers.
- In the tag list, tap Change tags.
- Remove the tag.
- Click Save.
- Click .
-
Remove the tag:
openstack server unset --tag <tag_name> --os-compute-api-version 2.26 <server>
Specify:
<tag_name>
— tag name;<server>
— ID or server name. The list can be viewed withopenstack server list