az policy assignment non-compliance-message
Manage a policy assignment's non-compliance messages.
Commands
Name | Description | Type | Status |
---|---|---|---|
az policy assignment non-compliance-message create |
Add a non-compliance message to a policy assignment. |
Core | GA |
az policy assignment non-compliance-message delete |
Remove one or more non-compliance messages from a policy assignment. |
Core | GA |
az policy assignment non-compliance-message list |
List the non-compliance messages for a policy assignment. |
Core | GA |
az policy assignment non-compliance-message create
Add a non-compliance message to a policy assignment.
az policy assignment non-compliance-message create --message
--name
[--policy-definition-reference-id]
[--resource-group]
[--scope]
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'
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 SkuPolicyRefId
Required Parameters
Message that will be shown when a resource is denied by policy or evaluation details are inspected.
Name of the policy assignment.
Optional Parameters
Policy definition reference ID within the assigned initiative (policy set) that the message applies to.
The resource group where the policy will be applied.
Scope at which this policy assignment subcommand applies. Defaults to current context subscription.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az policy assignment non-compliance-message delete
Remove one or more non-compliance messages from a policy assignment.
az policy assignment non-compliance-message delete --message
--name
[--policy-definition-reference-id]
[--resource-group]
[--scope]
Examples
Remove non-compliance messages from a policy assignment that contain a specific message and no policy definition reference ID.
az policy assignment non-compliance-message delete -g MyResourceGroup -n MyPolicyAssignment -m 'Resources must follow naming standards'
Remove non-compliance messages from a policy assignment that contain a specific message and a specific policy definition reference ID.
az policy assignment non-compliance-message delete -g MyResourceGroup -n MyPolicySetAssignment -m 'Resources must use allowed SKUs' --policy-definition-reference-id SkuPolicyRefId
Required Parameters
Message that will be shown when a resource is denied by policy or evaluation details are inspected.
Name of the policy assignment.
Optional Parameters
Policy definition reference ID within the assigned initiative (policy set) that the message applies to.
The resource group where the policy will be applied.
Scope at which this policy assignment subcommand applies. Defaults to current context subscription.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az policy assignment non-compliance-message list
List the non-compliance messages for a policy assignment.
az policy assignment non-compliance-message list --name
[--resource-group]
[--scope]
Examples
List the non-compliance messages for a policy assignment.
az policy assignment non-compliance-message list -g MyResourceGroup -n MyPolicyAssignment
Required Parameters
Name of the policy assignment.
Optional Parameters
The resource group where the policy will be applied.
Scope at which this policy assignment subcommand applies. Defaults to current context subscription.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.