Device Tagging¶
Equinix Metal supports using tags to apply custom labels to your servers and requested IP Address Blocks.
Server Tags¶
In the console, you can assign tags to a server after provisioning from the server's Tags tab.
Enter the tag into the text field, and press TAB
to confirm it.
If entering multiple tags, enter each tag individually, pressing TAB
after each entry.
Click Add Tags to add them to the server. All of the server's tags appear in the Server Tags box.
To remove a tag, click the X on the tag.
To tag your server on provision, add the --tags
flag to your metal device create
command, with a tag or list of tags to add.
metal device create -p <project_id> -m <metro> -P <plan> -H <hostname> -O <operating_system> -t <tags>
To modify the tags on an already provisioned server, use the --tags
flag with the metal device update
command. Note that any new tags will replace existing tags, so if you are adding a tag to a list of tags, you will have to specify the whole list.
metal device update -i <device_id> -t <tags>
To tag your server on provision, add the "tags"
parameter to the body of your POST
request to the /projects/{id}/devices
endpoint.
curl -X POST \
-H "Content-Type: application/json" \
-H "X-Auth-Token: <API_TOKEN>" \
"https://api.equinix.com/metal/v1/projects/{id}/devices" \
-d '{
"metro": "<metro_code>",
"plan": "<server_type>",
"operating_system": "<os_slug>"
"tags": [
"string"
]
}'
To modify the tags on an already provisioned server, use the "tags"
parameter to the body of your PUT
request to the /projects/{id}/devices
endpoint. Note that any new tags will replace existing tags, so if you are adding a tag to a list of tags, you will have to specify the whole list.
curl -X PUT \
-H "Content-Type: application/json" \
-H "X-Auth-Token: <API_TOKEN>" \
"https://api.equinix.com/metal/v1/projects/{id}/devices" \
-d '{
"tags": [
"string"
],
}'
IP Address Block Tags¶
You can add tags to any IP Address Blocks that you request.
When you request more IP addresses, you can add tags to the request. Enter your tag or tags into the Tags field, pressing TAB
after each one. When you click Submit Request the tags will be added to the address block when they are created.
To modify or add tags to an IP Address block, open the Manage Block side-pane, and add tags to the Tags field, pressing TAB
after each one. To remove a tag, click the X on the tag. Click Update Block to update the tags.
When requesting an IP address block, you can add tags to your metal ip request
command.
metal ip request -p $METAL_PROJECT_ID --type <ip_address_type> --quantity <int> --metro <metro_code> --tags <tags>
When requesting an IP address block, you can add the "tags"
field to your POST
request to the /projects/{id}/ips
endpoint.
curl -X POST \
-H 'Content-Type: application/json' \
-H "X-Auth-Token: <API_TOKEN>" \
"https://api.equinix.com/metal/v1/projects/{id}/ips" \
-d '{
"type": "public_ipv4",
"quantity": 4,
"metro": "sv",
"tags": [
"string"
]
}'