Tags are user-provided custom attributes to group nodes based on your business requirements or use case (for example, department, cost center code, or store name). Tags applied on a node are categorized by the “tags” namespace.
Apply a tag
To apply a tag, follow these steps:
Create a tag payload in a file, for example,
tag.json
Payload for creating a node filter
[{ "name": "testtagkey", "value": "somevalue" }]
Run the following command to apply the tag on a node:
chef-node-management-cli management node update-tags --nodeId <nodeId> --body-file tag.json --profile <NODE_MANAGER_PROFILE_NAME>
Chef Node Management returns:
{ "items": [{ "name": "testtagkey", "value": "somevalue" }] }