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
description: Describes how policy definitions are used to establish conventions for Azure resources in your organization.
4
-
ms.date: 11/04/2019
4
+
ms.date: 11/26/2019
5
5
ms.topic: conceptual
6
6
---
7
7
# Azure Policy definition structure
@@ -63,8 +63,8 @@ All Azure Policy samples are at [Azure Policy samples](../samples/index.md).
63
63
64
64
## Mode
65
65
66
-
**Mode** is configured depending on if the policy is targeting an Azure Resource Manager property or a
67
-
Resource Provider property.
66
+
**Mode** is configured depending on if the policy is targeting an Azure Resource Manager property or
67
+
a Resource Provider property.
68
68
69
69
### Resource Manager modes
70
70
@@ -85,7 +85,8 @@ it prevents resources that don't support tags and locations from showing up as n
85
85
compliance results. The exception is **resource groups**. Policies that enforce location or tags on
86
86
a resource group should set **mode** to `all` and specifically target the
87
87
`Microsoft.Resources/subscriptions/resourceGroups` type. For an example, see [Enforce resource group
88
-
tags](../samples/enforce-tag-rg.md). For a list of resources that support tags, see [Tag support for Azure resources](../../../azure-resource-manager/tag-support.md).
88
+
tags](../samples/enforce-tag-rg.md). For a list of resources that support tags, see
89
+
[Tag support for Azure resources](../../../azure-resource-manager/tag-support.md).
Copy file name to clipboardExpand all lines: articles/governance/policy/how-to/author-policies-for-arrays.md
+13-11Lines changed: 13 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Author policies for array properties on resources
3
3
description: Learn to work with array parameters and array language expressions, evaluate the [*] alias, and to append elements with Azure Policy definition rules.
4
-
ms.date: 03/06/2019
4
+
ms.date: 11/26/2019
5
5
ms.topic: conceptual
6
6
---
7
7
# Author policies for array properties on Azure resources
@@ -15,8 +15,9 @@ used in several different ways:
15
15
- Part of a [policy rule](../concepts/definition-structure.md#policy-rule) using the conditions
16
16
**in** or **notIn**
17
17
- Part of a policy rule that evaluates the [\[\*\]
18
-
alias](../concepts/definition-structure.md#understanding-the--alias) to evaluate specific
19
-
scenarios such as **None**, **Any**, or **All**
18
+
alias](../concepts/definition-structure.md#understanding-the--alias) to evaluate:
19
+
- Scenarios such as **None**, **Any**, or **All**
20
+
- Complex scenarios with **count**
20
21
- In the [append effect](../concepts/effects.md#append) to replace or add to an existing array
21
22
22
23
This article covers each use by Azure Policy and provides several example definitions.
@@ -160,12 +161,13 @@ expression. To resolve this error message, change `equals` to either `in` or `no
160
161
161
162
### Evaluating the [*] alias
162
163
163
-
Aliases that have **[\*]** attached to their name indicate the **type** is an _array_. Instead of
164
-
evaluating the value of the entire array, **[\*]** makes it possible to evaluate each element of the
165
-
array. There are three scenarios this per item evaluation is useful in: None, Any, and All.
164
+
Aliases that have **\[\*\]** attached to their name indicate the **type** is an _array_. Instead of
165
+
evaluating the value of the entire array, **\[\*\]** makes it possible to evaluate each element of
166
+
the array. There are three standard scenarios this per item evaluation is useful in: None, Any, and
167
+
All. For complex scenarios, use [count](../concepts/definition-structure.md#count).
166
168
167
169
The policy engine triggers the **effect** in **then** only when the **if** rule evaluates as true.
168
-
This fact is important to understand in context of the way **[\*]** evaluates each individual
170
+
This fact is important to understand in context of the way **\[\*\]** evaluates each individual
169
171
element of the array.
170
172
171
173
The example policy rule for the scenario table below:
@@ -221,11 +223,11 @@ rule and array of existing values above:
221
223
## The append effect and arrays
222
224
223
225
The [append effect](../concepts/effects.md#append) behaves differently depending on if the
224
-
**details.field** is a **[\*]** alias or not.
226
+
**details.field** is a **\[\*\]** alias or not.
225
227
226
-
- When not a **[\*]** alias, append replaces the entire array with the **value** property
227
-
- When a **[\*]** alias, append adds the **value** property to the existing array or creates the new
228
-
array
228
+
- When not a **\[\*\]** alias, append replaces the entire array with the **value** property
229
+
- When a **\[\*\]** alias, append adds the **value** property to the existing array or creates the
230
+
new array
229
231
230
232
For more information, see the [append examples](../concepts/effects.md#append-examples).
0 commit comments