Command Reference > scan > putClassificationRule
Creates or Updates a classification rule
pv scan putClassificationRule --classificationRuleName=<val> --payloadFile=<val>
--classificationRuleName
(string)
The name of the classification rule.
--payloadFile
(string)
File path to a valid JSON document.
None
Scanning Data Plane > Classification Rules > Create Or Update
PUT https://{accountName}.purview.azure.com/scan/classificationrules/{classificationRuleName}
Create or update a classification rule.
pv scan putClassificationRule --classificationRuleName "my_rule" --payloadFile "/path/to/file.json"
Example payload.
{
"kind": "Custom",
"name": "my_rule",
"properties": {
"classificationAction": "Keep",
"classificationName": "Twitter Handle",
"columnPatterns": [],
"dataPatterns": [
{
"kind": "Regex",
"pattern": "^@[a-zA-Z0-9]{5,15}$"
}
],
"description": "",
"minimumDistinctMatchCount": null,
"minimumPercentageMatch": 60.0
}
}
Example payload.
{
"name":"my_rule",
"kind":"Custom",
"properties": {
"description":"",
"classificationName":"Twitter_Handle",
"columnPatterns":[],
"dataPatterns":[],
"minimumPercentageMatch":60,
"classificationRuleBloomFilter": {
"sourceFileName":"dictionary.csv",
"cookedBloomFilter":"sQPxegwAAAABBwgAAAAAAAYAAAAOAAAAFQAAAAAAAACN3Af9UPI7AkpL4RHZO4cIMGVXnTVGQSV07TARgE35QWHFVBaaYZwDr9WZlVdGKmc=",
"bloomFilterName":null
}
}
}