Complete the code to assign a policy to a resource group.
az policy assignment create --name MyPolicyAssignment --policy [1] --resource-group MyResourceGroupThe --policy parameter requires the policy definition name to assign it.
Complete the code to check compliance state for a policy assignment.
az policy state summarize --management-group [1]The --management-group parameter specifies the management group to check compliance for.
Fix the error in the command to assign a policy with parameters.
az policy assignment create --name EnforceTag --policy [1] --params '{"tagName": {"value": "environment"}}' --scope /subscriptions/12345/resourceGroups/MyRG
The --policy parameter requires the full policy definition ID when passing parameters.
Fill both blanks to create a policy assignment with a description and enforcement mode.
az policy assignment create --name AuditVMs --policy [1] --description "[2]"
The --policy parameter requires the policy definition ID, and --description is a text describing the assignment.
Fill all three blanks to list policy compliance states filtered by resource group and policy assignment.
az policy state list --resource-group [1] --policy-assignment [2] --filter "complianceState eq '[3]'"
The command filters compliance states for a specific resource group and policy assignment, showing only non-compliant resources.