fabric-cli

label examples

Supported commands: fab label -h

Setting up labels local definition for CLI

To use labels seamlessly, the CLI needs a local labels.json mapping label IDs to names. Use the structure below to include your sensitivity labels.

{
    "labels": [
        {
            "name": "Non-Business",
            "id": "9a03958b-0a8f-0000-0000-a005f622ae00"
        },
        {
            "name": "Confidential",
            "id": "04ca0624-03b4-0000-8600-9ba7dca60860"
        },
        {
            "name": "Highly Confidential",
            "id": "04ca0600-03b4-46c5-86fd-9ba7dc060860"
        }
    ]
}

Set the CLI config by: config set local_definition_labels <json_local_path>

# set up local label config file, mapping IDs/names
fab:/$ config set local_definition_labels /tmp/labels.json

# check labels
fab:/$ label list-local

Adding a sensitivity label to an item

Set a sensitivity label with -n (name). Use -f to force.

fab:/$ label set /ws1.workspace/nb1.notebook -n Confidential
fab:/$ label set /ws1.workspace/nb1.notebook -n Non-Business -f

Removing a sensitivity label from an item

Remove a sensitivity label from an item. Use -f to force.

fab:/$ label rm /ws1.workspace/nb1.notebook
fab:/$ label rm /ws1.workspace/nb1.notebook -f

See all examples