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
@@ -25,11 +25,7 @@ When using models from Azure AI Services and Azure OpenAI with Azure AI Foundry,
25
25
26
26
## Create a custom policy
27
27
28
-
Select the scenario that applies to your case better:
29
-
30
-
# [Enforce specific models](#tab/models)
31
-
32
-
Follow these steps to create and assign an example custom policy to allow specific models from the model catalog.
28
+
Follow these steps to create and assign an example custom policy to control model deployments:
33
29
34
30
1. From the [Azure portal](https://portal.azure.com), select **Policy** from the left side of the page. You can also search for **Policy** in the search bar at the top of the page.
35
31
@@ -43,131 +39,111 @@ Follow these steps to create and assign an example custom policy to allow specif
43
39
-**Name**: Enter a unique name for the policy definition. For example, `Custom allowed Azure AI services and Azure OpenAI models`.
44
40
-**Description**: Enter a description for the policy definition.
45
41
-**Category**: You can either create a new category or use an existing one. For example, "AI model governance."
46
-
-**Policy rule**: Enter the policy rule in JSON format. The following example shows a policy rule that allows the deployment of specific Azure AI services and Azure OpenAI models:
47
42
48
-
> [!TIP]
49
-
> Azure AI services was originally named Azure Cognitive Services. This name is still used internally by Azure, such as this custom policy where you see a value of `Microsoft.CognitiveServices`. Azure OpenAI is part of Azure AI services, so this policy also applies to Azure OpenAI models.
43
+
4. On **Policy rule**, enter the policy rule details in JSON format. Select the scenario that applies to your case better:
The following policy allows you to control which specific models and versions are available for deployment. You can enforce this policy at different levels depending on your needs.
"description": "The list of allowed models to be deployed."
81
77
}
78
+
}
82
79
}
83
-
```
84
-
85
-
4. Select **Save** to save the policy definition. After saving, you arrive at the policy definition's overview page.
86
-
87
-
5. From the policy definition's overview page, select **Assign policy** to assign the policy definition.
80
+
}
81
+
```
88
82
89
-
6. From the **Assign policy** page, use the following values on the **Basics** tab:
83
+
# [Enforce specific deployment types](#tab/deployments)
90
84
91
-
- **Scope**: Select the scope where you want to assign the policy. The scope can be a management group, subscription, or resource group.
92
-
- **Policy definition**: This field is prepopulated with the title of policy definition you created previously.
93
-
- **Assignment name**: Enter a unique name for the assignment.
94
-
- **Policy enforcement**: Make sure that the **Policy enforcement** field is set to **Enabled**. If it isn't enabled, the policy isn't enforced.
85
+
The following policy allows you to control which types of deployments are allowed in the Azure AI Services or Azure OpenAI Resources. For example, you might want to prevent developers from creating deployments that result in data processed in a different region. Follow these steps to create a policy that denies creating global processing deployment types.
95
86
96
-
Select **Next** at the bottom of the page, or the **Parameters** tab at the top of the page.
7. From the **Parameters** tab, set **Allowed AI models** to the list of models that you want to allow. The list should be a comma-separated list of model names and approved versions, surrounded by square brackets. For example, `["gpt-4,0613", "gpt-35-turbo,0613"]`.
110
+
---
99
111
100
112
> [!TIP]
101
-
> You can find the model names and their versions in the [Azure AI Foundry Model Catalog](https://ai.azure.com/explore/models). Select the model to view the details, and then copy the model name and their version in the title.
102
-
103
-
8. Optionally, select the **Non-compliance messages** tab at the top of the page and set a custom message for noncompliance.
113
+
> Azure AI services was originally named Azure Cognitive Services. This name is still used internally by Azure, such as this custom policy where you see a value of `Microsoft.CognitiveServices`. Azure OpenAI is part of Azure AI services, so this policy also applies to Azure OpenAI models.
104
114
105
-
9. Select **Review + create** tab and verify that the policy assignment is correct. When ready, select **Create** to assign the policy.
115
+
5. Select **Save** to save the policy definition. After saving, you arrive at the policy definition's overview page.
106
116
107
-
10. Notify your developers that the policy is in place. They receive an error message if they try to deploy a model that isn't in the list of allowed models.
117
+
6. From the policy definition's overview page, select **Assign policy** to assign the policy definition.
108
118
119
+
7. From the **Assign policy** page, use the following values on the **Basics** tab:
109
120
110
-
# [Enforce specific deployment types](#tab/deployments)
121
+
- **Scope**: Select the scope where you want to assign the policy. The scope can be a management group, subscription, or resource group.
122
+
- **Policy definition**: This field is prepopulated with the title of policy definition you created previously.
123
+
- **Assignment name**: Enter a unique name for the assignment.
124
+
- **Policy enforcement**: Make sure that the **Policy enforcement** field is set to **Enabled**. If it isn't enabled, the policy isn't enforced.
111
125
112
-
The following policy allows you to control which types of deployments are allowed in the Azure AI Services or Azure OpenAI Resources. For example, you might want to prevent developers from creating deployments that result in data processed in a different region. Follow these steps to create a policy that denies creating global processing deployment types.
126
+
Select **Next** at the bottom of the page, or the **Parameters** tab at the top of the page.
113
127
114
-
1. From the [Azure portal](https://portal.azure.com), select **Policy** from the left side of the page. You can also search for **Policy** in the search bar at the top of the page.
115
-
116
-
2. From the left side of the Azure Policy Dashboard, select **Authoring**, **Definitions**, and then select **+ Policy definition** from the top of the page.
128
+
8. Configure the parameters for the policy (if any):
117
129
118
-
:::image type="content" source="../media/configure-deployment-policies/create-new-policy.png" alt-text="An screenshot showing how to create a new policy definition in Azure Policies." lightbox="../media/configure-deployment-policies/create-new-policy.png":::
119
-
120
-
3. In the **Policy Definition** form, use the following values:
130
+
# [Enforce specific models](#tab/models)
121
131
122
-
- **Definition location**: Select the subscription or management group where you want to store the policy definition.
123
-
- **Name**: Enter a unique name for the policy definition. For example, `Custom allowed Azure AI services and Azure OpenAI deployments`.
124
-
- **Description**: Enter a description for the policy definition.
125
-
- **Category**: You can either create a new category or use an existing one. For example, "AI model governance."
126
-
- **Policy rule**: Enter the policy rule in JSON format. The following example shows a policy rule that blocks specific deployment types, particularly Global Standard.
From the **Parameters** tab, set **Allowed AI models** to the list of models that you want to allow. The list should be a comma-separated list of model names and approved versions, surrounded by square brackets. For example, `["gpt-4,0613", "gpt-35-turbo,0613"]`.
150
133
151
-
4. Select **Save** to save the policy definition. After saving, you arrive at the policy definition's overview page.
152
-
153
-
5. From the policy definition's overview page, select **Assign policy** to assign the policy definition.
154
-
155
-
6. From the **Assign policy** page, use the following values on the **Basics** tab:
134
+
> [!TIP]
135
+
> You can find the model names and their versions in the [Azure AI Foundry Model Catalog](https://ai.azure.com/explore/models). Select the model to view the details, and then copy the model name and their version in the title.
156
136
157
-
- **Scope**: Select the scope where you want to assign the policy. The scope can be a management group, subscription, or resource group.
158
-
- **Policy definition**: This field is prepopulated with the title of policy definition you created previously.
159
-
- **Assignment name**: Enter a unique name for the assignment.
160
-
- **Policy enforcement**: Make sure that the **Policy enforcement** field is set to **Enabled**. If it isn't enabled, the policy isn't enforced.
137
+
# [Enforce specific deployment types](#tab/deployments)
161
138
162
-
7. Select **Next** at the bottom of the page, or the **Parameters** tab at the top of the page.
139
+
This policy doesn't require parameters.
163
140
164
-
8. Optionally, select the **Non-compliance messages** tab at the top of the page and set a custom message for noncompliance.
141
+
9. Optionally, select the **Non-compliance messages** tab at the top of the page and set a custom message for noncompliance.
165
142
166
-
9. Select the **Review + create** tab and verify that the policy assignment is correct. When ready, select **Create** to assign the policy.
143
+
10. Select **Review + create** tab and verify that the policy assignment is correct. When ready, select **Create** to assign the policy.
167
144
168
-
10. Notify your developers that the policy is in place. They receive an error message if they try to deploy a model that isn't in the list of allowed models.
145
+
11. Notify your developers that the policy is in place. They receive an error message if they try to deploy a model that isn't in the list of allowed models.
169
146
170
-
---
171
147
172
148
## Verify policy assignment
173
149
@@ -179,9 +155,9 @@ To monitor compliance with the policy, follow these steps:
179
155
180
156
1. From the [Azure portal](https://portal.azure.com), select **Policy** from the left side of the page. You can also search for **Policy** in the search bar at the top of the page.
181
157
182
-
1. From the left side of the Azure Policy Dashboard, select **Compliance**. Each policy assignment is listed with the compliance status. To view more details, select the policy assignment.
158
+
1. From the left side of the Azure Policy Dashboard, select **Compliance**. Each policy assignment is listed with the compliance status. To view more details, select the policy assignment. The following example shows the compliance report for a policy that blocks deployments of type *Global standard*.
183
159
184
-
:::image type="content" source="../media/configure-deployment-policies/policy-compliance.png" alt-text="An screenshot showing an example of a policy compliance report." lightbox="../media/configure-deployment-policies/policy-compliance.png":::
160
+
:::image type="content" source="../media/configure-deployment-policies/policy-compliance.png" alt-text="An screenshot showing an example of a policy compliance report for a policy that blocks Global standard deployment SKUs." lightbox="../media/configure-deployment-policies/policy-compliance.png":::
0 commit comments