CmdID

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

Opens CmdID with your command. It is read in your browser and sent nowhere.

Examples

from the Azure CLI, each command read by CmdID

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

1 in the Azure CLI reference
--policy-definition-reference-id, --message, --scope, --name, -m, -n, -r