CmdID / az / az policy / az policy assignment / az policy assignment non-compliance-message
az policy assignment non-compliance-message create
Create a non-compliance message. Azure CLI reference
Create a customized message used to report non-compliance by the policy assignment matching the given name and scope.
2 examples 1 option Its page in the Azure CLI reference
Examples
Add a non-compliance message to a policy assignment
az policy assignment non-compliance-message create -g MyResourceGroup -n MyPolicyAssignment -m 'Resources must follow naming standards'Identify-gName of resource group.Add a non-compliance message for a specific policy in an assigned policy set definition
az policy assignment non-compliance-message create -g MyResourceGroup -n MyPolicySetAssignment -m 'Resources must use allowed SKUs' --policy-definition-reference-id SkuPolicyRefIdIdentify-gName of resource group.Options
--policy-definition-reference-id, --message, --scope, --name, -m, -n, -r