Skip to content

Commit 809d6d0

Browse files
Merge pull request #222687 from cebundy/wps-howto-monitor-azure-policy
[Web PubSub]: freshness review for Web PubSub how-to monitor Azure Policy
2 parents 4a097d4 + 63a64b2 commit 809d6d0

File tree

3 files changed

+54
-19
lines changed

3 files changed

+54
-19
lines changed

articles/azure-web-pubsub/howto-monitor-azure-policy.md

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,27 @@ ms.author: jixin
1111

1212
# Audit compliance of Azure Web PubSub Service resources using Azure Policy
1313

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 resources stay compliant with your corporate standards and service level agreements. Use these policies to audit Web PubSub resources for compliance.
1515

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.
1917

2018
## Built-in policy definitions
2119

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).
2324

2425
[!INCLUDE [azure-policy-reference-policies-web-pubsub](../../includes/policy/reference/bycat/policies-web-pubsub.md)]
2526

2627
## Assign policy definitions
2728

28-
* 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.
3135

3236
> [!NOTE]
3337
> 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
4044

4145
### Policy compliance in the portal:
4246

43-
1. Select **All services**, and search for **Policy**.
47+
1. Open the Azure portal and search for **Policy**.
48+
1. Select **Policy**.
4449
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.
4752
[ ![Policy compliance in portal](./media/howto-monitor-azure-policy/azure-policy-compliance.png) ](./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.
4955

5056
### Policy compliance in the Azure CLI
5157

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:
5359

5460
```azurecli
5561
az policy assignment list --query "[?contains(displayName,'Web PubSub')].{name:displayName, ID:id}" --output table
5662
```
5763

58-
Sample output:
64+
Example output:
5965

6066
```
6167
Name ID
6268
------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------
6369
[Preview]: Azure Web PubSub Service should use private links /subscriptions/<subscriptionId>/resourceGroups/<resourceGroup>/providers/Microsoft.Authorization/policyAssignments/<assignmentId>
6470
```
6571

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:
6773

6874
```azurecli
6975
az policy state list --g <resourceGroup>
7076
```
7177

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:
7379

7480
```azurecli
7581
az policy state list \
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
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
15+
[Azure Policy built-in definitions](../governance/policy/samples/built-in-policies.md).
16+
17+
The name of each built-in policy definition links to the policy definition in the Azure portal. Use
18+
the link in the **Version** column to view the source on the
19+
[Azure Policy GitHub repo](https://github.com/Azure/azure-policy).
20+
21+
## Policy definitions
22+
23+
24+
[!INCLUDE [azure-policy-reference-policies-web-pubsub](../../includes/policy/reference/bycat/policies-web-pubsub.md)]
25+
26+
## Next steps
27+
28+
- See the built-ins on the [Azure Policy GitHub repo](https://github.com/Azure/azure-policy).
29+
- Review the [Azure Policy definition structure](../governance/policy/concepts/definition-structure.md).
30+
- Review [Understanding policy effects](../governance/policy/concepts/effects.md).

articles/azure-web-pubsub/toc.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
- name: Azure Web PubSub service documentation
22
href: index.yml
3-
43
- name: Overview
54
expanded: true
65
items:
@@ -116,7 +115,6 @@
116115
items:
117116
- name: Autoscale
118117
href: howto-scale-autoscale.md
119-
120118
- name: Concepts
121119
expanded: true
122120
items:
@@ -138,7 +136,6 @@
138136
href: concept-azure-ad-authorization.md
139137
- name: Metrics
140138
href: concept-metrics.md
141-
142139
- name: Reference
143140
items:
144141
- name: WebSocket subprotocols
@@ -158,6 +155,8 @@
158155
href: reference-cloud-events-amqp.md
159156
- name: Functions trigger and bindings
160157
href: reference-functions-bindings.md
158+
- name: Azure policy definitions
159+
href: policy-definitions.md
161160
- name: Data plane REST API and SDKs
162161
items:
163162
- name: REST API

0 commit comments

Comments
 (0)