You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-web-pubsub/howto-monitor-azure-policy.md
+22-16Lines changed: 22 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,23 +11,27 @@ ms.author: jixin
11
11
12
12
# Audit compliance of Azure Web PubSub Service resources using Azure Policy
13
13
14
-
[Azure Policy](../governance/policy/overview.md) is a service in Azure that you use to create, assign, and manage policies. These policies enforce different rules and effects over your resources, so those resources stay compliant with your corporate standards and service level agreements.
14
+
[Azure Policy](../governance/policy/overview.md) is a free service in Azure to create, assign, and manage policies that enforce rules and effects to ensure your resourcesstay compliant with your corporate standards and service level agreements. Use these policies to audit Web PubSub resources for compliance.
15
15
16
-
This article introduces built-in policies for Azure Web PubSub Service. Use these policies to audit new and existing Web PubSub resources for compliance.
17
-
18
-
There are no charges for using Azure Policy.
16
+
This article describes the built-in policies for Azure Web PubSub Service.
19
17
20
18
## Built-in policy definitions
21
19
22
-
The following built-in policy definitions are specific to Azure Web PubSub Service:
20
+
21
+
The following table contains an index of Azure Policy built-in policy definitions for Azure Web PubSub. For Azure Policy built-ins for other services, see [Azure Policy built-in definitions](../governance/policy/samples/built-in-policies.md).
22
+
23
+
The name of each built-in policy definition links to the policy definition in the Azure portal. Use the link in the Version column to view the source on the [Azure Policy GitHub repo](https://github.com/Azure/azure-policy).
* Assign policy definitions using the [Azure portal](../governance/policy/assign-policy-portal.md), [Azure CLI](../governance/policy/assign-policy-azurecli.md), a [Resource Manager template](../governance/policy/assign-policy-template.md), or the Azure Policy SDKs.
29
-
* Scope a policy assignment to a resource group, a subscription, or an [Azure management group](../governance/management-groups/overview.md). Web PubSub policy assignments apply to existing and new Web PubSub resources within the scope.
30
-
* Enable or disable [policy enforcement](../governance/policy/concepts/assignment-structure.md#enforcement-mode) at any time.
29
+
When assigning a policy definition:
30
+
31
+
* You can assign policy definitions using the [Azure portal](../governance/policy/assign-policy-portal.md), [Azure CLI](../governance/policy/assign-policy-azurecli.md), a [Resource Manager template](../governance/policy/assign-policy-template.md), or the Azure Policy SDKs.
32
+
* Policy assignments can be scoped to a resource group, a subscription, or an [Azure management group](../governance/management-groups/overview.md).
33
+
* You can enable or disable [policy enforcement](../governance/policy/concepts/assignment-structure.md#enforcement-mode) at any time.
34
+
* Web PubSub policy assignments apply to existing and new Web PubSub resources within the scope.
31
35
32
36
> [!NOTE]
33
37
> After you assign or update a policy, it takes some time for the assignment to be applied to resources in the defined scope. See information about [policy evaluation triggers](../governance/policy/how-to/get-compliance-data.md#evaluation-triggers).
@@ -40,36 +44,38 @@ When a resource is non-compliant, there are many possible reasons. To determine
40
44
41
45
### Policy compliance in the portal:
42
46
43
-
1. Select **All services**, and search for **Policy**.
47
+
1. Open the Azure portal and search for **Policy**.
48
+
1. Select **Policy**.
44
49
1. Select **Compliance**.
45
-
1. Use the filters to limit compliance states or to search for policies
46
-
50
+
1. Use the filters to display by **Scope**, **Type**or **Compliance state**. Use search list by name or
51
+
ID.
47
52
[](./media/howto-monitor-azure-policy/azure-policy-compliance.png#lightbox)
48
-
2. Select a policy to review aggregate compliance details and events. If desired, then select a specific Web PubSub for resource compliance.
53
+
1. Select a policy to review aggregate compliance details and events.
54
+
1. Select a specific Web PubSub for resource compliance.
49
55
50
56
### Policy compliance in the Azure CLI
51
57
52
-
You can also use the Azure CLI to get compliance data. For example, use the [az policy assignment list](/cli/azure/policy/assignment#az-policy-assignment-list) command in the CLI to get the policy IDs of the Azure Web PubSub Service policies that are applied:
58
+
You can use the Azure CLI to get compliance data. Use the [az policy assignment list](/cli/azure/policy/assignment#az-policy-assignment-list) command to get the policy IDs of the Azure Web PubSub Service policies that are applied:
53
59
54
60
```azurecli
55
61
az policy assignment list --query "[?contains(displayName,'Web PubSub')].{name:displayName, ID:id}" --output table
[Preview]: Azure Web PubSub Service should use private links /subscriptions/<subscriptionId>/resourceGroups/<resourceGroup>/providers/Microsoft.Authorization/policyAssignments/<assignmentId>
64
70
```
65
71
66
-
Then run[az policy state list](/cli/azure/policy/state#az-policy-state-list) to return the JSON-formatted compliance state for all resources under a specific resource group:
72
+
Run the[az policy state list](/cli/azure/policy/state#az-policy-state-list) command to return the JSON-formatted compliance state for all resources under a specific resource group:
67
73
68
74
```azurecli
69
75
az policy state list --g <resourceGroup>
70
76
```
71
77
72
-
Or run[az policy state list](/cli/azure/policy/state#az-policy-state-list) to return the JSON-formatted compliance state of a specific Web PubSub resource:
78
+
Run the[az policy state list](/cli/azure/policy/state#az-policy-state-list) command to return the JSON-formatted compliance state of a specific Web PubSub resource:
title: Built-in policy definitions for Azure Web PubSub
3
+
description: Lists Azure Policy built-in policy definitions for Azure Web PubSub. These built-in policy definitions provide common approaches to managing your Azure resources.
4
+
author: cebundy
5
+
ms.author: v-bcatherine
6
+
ms.date: 01/03/2022
7
+
ms.topic: reference
8
+
ms.service: azure-web-pubsub
9
+
ms.custom: subject-policy-reference
10
+
---
11
+
# Azure Policy built-in definitions for Azure Web PubSub
12
+
13
+
This page is an index of [Azure Policy](../governance/policy/overview.md) built-in policy
14
+
definitions for Azure Web PubSub. For Azure Policy built-ins for other services, see
0 commit comments