Skip to content

Commit 43ea6f9

Browse files
committed
Removing code snippets and changing code pointers
1 parent 24523e8 commit 43ea6f9

19 files changed

+28
-511
lines changed

articles/governance/policy/samples/pattern-count-operator.json

Lines changed: 0 additions & 40 deletions
This file was deleted.

articles/governance/policy/samples/pattern-count-operator.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The [count](../concepts/definition-structure.md#count) operator evaluates member
1313
This policy definition [audits](../concepts/effects.md#audit) Network Security Groups configured to
1414
allow inbound Remote Desktop Protocol (RDP) traffic.
1515

16-
:::code language="json" source="./pattern-count-operator.json":::
16+
:::code language="json" source="~/policy-templates/patterns/pattern-count-operator.json":::
1717

1818
### Explanation
1919

@@ -29,7 +29,7 @@ highlighted in the snippet below.
2929
- The count condition in this example is **greater**. Count evaluates as true when one or more
3030
members of the alias _array_ matches the _where_ clause.
3131

32-
:::code language="json" source="./pattern-count-operator.json" range="12-32" highlight="3,4,20":::
32+
:::code language="json" source="~/policy-templates/patterns/pattern-count-operator.json" range="12-32" highlight="3,4,20":::
3333

3434
## Next steps
3535

articles/governance/policy/samples/pattern-deploy-resources.json

Lines changed: 0 additions & 56 deletions
This file was deleted.

articles/governance/policy/samples/pattern-deploy-resources.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ updated. When that resource is a _Microsoft.Network/virtualNetworks_, the policy
1919
watcher in the location of the new or updated resource. If a matching network watcher isn't located,
2020
the Resource Manager template is deployed to create the missing resource.
2121

22-
:::code language="json" source="./pattern-deploy-resources.json":::
22+
:::code language="json" source="~/policy-templates/patterns/pattern-deploy-resources.json":::
2323

2424
### Explanation
2525

2626
#### existenceCondition
2727

28-
:::code language="json" source="./pattern-deploy-resources.json" range="18-23":::
28+
:::code language="json" source="~/policy-templates/patterns/pattern-deploy-resources.json" range="18-23":::
2929

3030
The **properties.policyRule.then.details** block tells Azure Policy what to look for related to the
3131
created or updated resource in the **properties.policyRule.if** block. In this example, a network
@@ -36,7 +36,7 @@ location of the new or updated resource. Using the `field()` function allows the
3636

3737
#### roleDefinitionIds
3838

39-
:::code language="json" source="./pattern-deploy-resources.json" range="24-26":::
39+
:::code language="json" source="~/policy-templates/patterns/pattern-deploy-resources.json" range="24-26":::
4040

4141
The **roleDefinitionIds** _array_ property in the **properties.policyRule.then.details** block tells
4242
the policy definition which rights the managed identity needs to deploy the included Resource
@@ -55,14 +55,14 @@ three core components:
5555
- **template** - This property includes the template itself. In this example, the **location**
5656
template parameter sets the location of the new network watcher resource.
5757

58-
:::code language="json" source="./pattern-deploy-resources.json" range="30-44":::
58+
:::code language="json" source="~/policy-templates/patterns/pattern-deploy-resources.json" range="30-44":::
5959

6060
- **parameters** - This property defines parameters that are provided to the **template**. The
6161
parameter names must match what are defined in **template**. In this example, the parameter is
6262
named **location** to match. The value of **location** uses the `field()` function again to get
6363
the value of the evaluated resource, which is the virtual network in the **policyRule.if** block.
6464

65-
:::code language="json" source="./pattern-deploy-resources.json" range="45-49":::
65+
:::code language="json" source="~/policy-templates/patterns/pattern-deploy-resources.json" range="45-49":::
6666

6767
## Next steps
6868

articles/governance/policy/samples/pattern-effect-details-1.json

Lines changed: 0 additions & 54 deletions
This file was deleted.

articles/governance/policy/samples/pattern-effect-details-2.json

Lines changed: 0 additions & 62 deletions
This file was deleted.

articles/governance/policy/samples/pattern-effect-details.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ This policy definition checks to see if the tag defined in parameter **tagName**
1616
evaluated resource. If the tag doesn't yet exist, the [modify](../concepts/effects.md#modify) effect
1717
is triggered to add the tag with the value in parameter **tagValue**.
1818

19-
:::code language="json" source="./pattern-effect-details-1.json":::
19+
:::code language="json" source="~/policy-templates/patterns/pattern-effect-details-1.json":::
2020

2121
### Sample 1: Explanation
2222

23-
:::code language="json" source="./pattern-effect-details-1.json" range="30-34":::
23+
:::code language="json" source="~/policy-templates/patterns/pattern-effect-details-1.json" range="30-34":::
2424

2525
An **modify** effect requires the **policyRule.then.details** block that defines
2626
**roleDefinitionIds** and **operations**. These parameters inform Azure Policy what roles are needed
@@ -35,11 +35,11 @@ This policy definition audits each virtual machine for when an extension, define
3535
virtual machine to see if an instance exists that matches the defined parameters. This example
3636
checks the **extensions** type.
3737

38-
:::code language="json" source="./pattern-effect-details-2.json":::
38+
:::code language="json" source="~/policy-templates/patterns/pattern-effect-details-2.json":::
3939

4040
### Sample 2: Explanation
4141

42-
:::code language="json" source="./pattern-effect-details-2.json" range="45-58":::
42+
:::code language="json" source="~/policy-templates/patterns/pattern-effect-details-2.json" range="45-58":::
4343

4444
An **auditIfNotExists** effect requires the **policyRule.then.details** block to define both a
4545
**type** and the **existenceCondition** to look for. The **existenceCondition** uses policy language

articles/governance/policy/samples/pattern-fields.json

Lines changed: 0 additions & 38 deletions
This file was deleted.

articles/governance/policy/samples/pattern-fields.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ This policy definition enables you to define allowed regions that meet your orga
1616
geo-location requirements. The allowed resources are defined in parameter **listOfAllowedLocations**
1717
(_array_). Resources that match the definition are [denied](../concepts/effects.md#deny).
1818

19-
:::code language="json" source="./pattern-fields.json":::
19+
:::code language="json" source="~/policy-templates/patterns/pattern-fields.json":::
2020

2121
### Explanation
2222

23-
:::code language="json" source="./pattern-fields.json" range="18-36" highlight="3,7,11":::
23+
:::code language="json" source="~/policy-templates/patterns/pattern-fields.json" range="18-36" highlight="3,7,11":::
2424

2525
The **field** operator is used three times within the
2626
[logical operator](../concepts/definition-structure.md#logical-operators) **allOf**.

0 commit comments

Comments
 (0)