Using Console
Using CLI
az login
.
az account list
to list all the subscriptions associated with your account.
az account set --subscription <subscription-id>
.
az policy definition list
to list all the policy definitions available in your subscription.
az policy definition show --name <policy-name>
to view the details of a specific policy definition.
az policy assignment create --name <assignment-name> --scope <resource-group-id> --policy <policy-name>
.
az policy assignment show --name <assignment-name> --scope <resource-group-id>
.
Using Python