Skip to content

Commit e0b4ebf

Browse files
committed
Add note to highlight ASC:true
1 parent 3acc0f5 commit e0b4ebf

File tree

1 file changed

+51
-48
lines changed

1 file changed

+51
-48
lines changed

articles/defender-for-cloud/custom-security-policies.md

Lines changed: 51 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -165,66 +165,69 @@ This example shows you how to assign the built-in Defender for Cloud initiative
165165
```
166166

167167
This example shows you how to assign a custom Defender for Cloud initiative on a subscription or management group:
168+
169+
> [!NOTE]
170+
> Make sure you include `"ASC":"true"` in the request body as shown here.
168171
169-
```
170-
PUT
171-
PUT https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}?api-version=2021-06-01
172+
```
173+
PUT
174+
PUT https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policySetDefinitions/{policySetDefinitionName}?api-version=2021-06-01
172175
173-
Request Body (JSON)
176+
Request Body (JSON)
174177
175-
{
176-
"properties": {
177-
"displayName": "Cost Management",
178-
"description": "Policies to enforce low cost storage SKUs",
179-
"metadata": {
180-
"category": "Cost Management"
181-
"ASC":"true"
182-
},
183-
"parameters": {
184-
"namePrefix": {
185-
"type": "String",
186-
"defaultValue": "myPrefix",
187-
"metadata": {
188-
"displayName": "Prefix to enforce on resource names"
178+
{
179+
"properties": {
180+
"displayName": "Cost Management",
181+
"description": "Policies to enforce low cost storage SKUs",
182+
"metadata": {
183+
"category": "Cost Management"
184+
"ASC":"true"
185+
},
186+
"parameters": {
187+
"namePrefix": {
188+
"type": "String",
189+
"defaultValue": "myPrefix",
190+
"metadata": {
191+
"displayName": "Prefix to enforce on resource names"
192+
}
193+
}
194+
},
195+
"policyDefinitions": [
196+
{
197+
"policyDefinitionId": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyDefinitions/7433c107-6db4-4ad1-b57a-a76dce0154a1",
198+
"policyDefinitionReferenceId": "Limit_Skus",
199+
"parameters": {
200+
"listOfAllowedSKUs": {
201+
"value": [
202+
"Standard_GRS",
203+
"Standard_LRS"
204+
]
189205
}
190206
}
191207
},
192-
"policyDefinitions": [
193-
{
194-
"policyDefinitionId": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyDefinitions/7433c107-6db4-4ad1-b57a-a76dce0154a1",
195-
"policyDefinitionReferenceId": "Limit_Skus",
196-
"parameters": {
197-
"listOfAllowedSKUs": {
198-
"value": [
199-
"Standard_GRS",
200-
"Standard_LRS"
201-
]
202-
}
203-
}
204-
},
205-
{
206-
"policyDefinitionId": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyDefinitions/ResourceNaming",
207-
"policyDefinitionReferenceId": "Resource_Naming",
208-
"parameters": {
209-
"prefix": {
210-
"value": "[parameters('namePrefix')]"
211-
},
212-
"suffix": {
213-
"value": "-LC"
214-
}
208+
{
209+
"policyDefinitionId": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyDefinitions/ResourceNaming",
210+
"policyDefinitionReferenceId": "Resource_Naming",
211+
"parameters": {
212+
"prefix": {
213+
"value": "[parameters('namePrefix')]"
214+
},
215+
"suffix": {
216+
"value": "-LC"
215217
}
216218
}
217-
]
218-
}
219+
}
220+
]
219221
}
220-
```
222+
}
223+
```
221224

222225
This example shows you how to remove an assignment:
223226

224-
```
225-
DELETE
226-
https://management.azure.com/{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}?api-version=2018-05-01
227-
```
227+
```
228+
DELETE
229+
https://management.azure.com/{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}?api-version=2018-05-01
230+
```
228231

229232
::: zone-end
230233

0 commit comments

Comments
 (0)