Skip to main content

Tags

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:

  1. Create a tag payload in a file, for example, tag.json

    Payload for creating a node filter

    [{
        "name": "testtagkey",
        "value": "somevalue"
    }]
    
  2. 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
    

    Chef Node Management returns:

    {
        "items": [{
            "name": "testtagkey",
            "value": "somevalue"
        }]
    }
    

Thank you for your feedback!

×