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/governance/policy/concepts/definition-structure.md
+12-7Lines changed: 12 additions & 7 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: Details of the policy definition structure
3
3
description: Describes how policy definitions are used to establish conventions for Azure resources in your organization.
4
-
ms.date: 02/26/2020
4
+
ms.date: 04/03/2020
5
5
ms.topic: conceptual
6
6
---
7
7
# Azure Policy definition structure
@@ -695,6 +695,10 @@ use within a policy rule, except the following functions and user-defined functi
695
695
- resourceId()
696
696
- variables()
697
697
698
+
> [!NOTE]
699
+
> These functions are still available within the `details.deployment.properties.template` portion of
700
+
> the template deployment in a **deployIfNotExists** policy definition.
701
+
698
702
The following function is available to use in a policy rule, but differs from use in an Azure
699
703
Resource Manager template:
700
704
@@ -711,12 +715,15 @@ The following functions are only available in policy rules:
711
715
-`field(fieldName)`
712
716
-**fieldName**: [Required] string - Name of the [field](#fields) to retrieve
713
717
- Returns the value of that field from the resource that is being evaluated by the If condition
714
-
-`field` is primarily used with **AuditIfNotExists** and **DeployIfNotExists** to reference fields on the resource that are being evaluated. An example of this use can be seen in the [DeployIfNotExists example](effects.md#deployifnotexists-example).
718
+
-`field` is primarily used with **AuditIfNotExists** and **DeployIfNotExists** to reference
719
+
fields on the resource that are being evaluated. An example of this use can be seen in the
- Returns the API version of the request that triggered policy evaluation (example: `2019-09-01`). This will be the API version that was used in the PUT/PATCH request for evaluations on resource creation/update. The latest API version is always used during compliance evaluation on existing resources.
722
+
- Returns the API version of the request that triggered policy evaluation (example: `2019-09-01`).
723
+
This will be the API version that was used in the PUT/PATCH request for evaluations on resource
724
+
creation/update. The latest API version is always used during compliance evaluation on existing
725
+
resources.
717
726
718
-
719
-
720
727
#### Policy function example
721
728
722
729
This policy rule example uses the `resourceGroup` resource function to get the **name** property,
@@ -842,8 +849,6 @@ This sample rule checks for any matches of **ipRules\[\*\].value** to **10.0.4.1
0 commit comments