Initial commit

This commit is contained in:
Jurjen Ladenius
2020-07-09 10:28:42 +02:00
parent f912178afb
commit 34b041dc2e
16 changed files with 825 additions and 20 deletions

View File

@@ -0,0 +1,52 @@
{
"properties": {
"displayName": "Service Bus Subscription must have Time to Live (TTL) of 14 days.",
"policyType": "Custom",
"mode": "All",
"description": "This policy enables you to restrict service bus queue subscriptions with TTL other than 2 weeks.",
"metadata": {
"category": "Service Bus",
"createdBy": "c6025a2e-416c-42da-96ef-dd507382793a",
"createdOn": "2020-04-03T11:50:04.4806377Z",
"updatedBy": null,
"updatedOn": null
},
"parameters": {
"effect": {
"type": "String",
"metadata": {
"displayName": "Effect",
"description": "Enable or disable the execution of the policy"
},
"allowedValues": [
"audit",
"deny",
"disabled"
],
"defaultValue": "audit"
}
},
"policyRule": {
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.ServiceBus/namespaces/topics/subscriptions"
},
{
"not": {
"field": "Microsoft.ServiceBus/namespaces/topics/subscriptions/defaultMessageTimeToLive",
"equals": "P14D"
}
}
]
},
"then": {
"effect": "[parameters('effect')]"
}
}
},
"id": "/providers/Microsoft.Management/managementGroups/ManagementGroup_SurveySoftware/providers/Microsoft.Authorization/policyDefinitions/60f3692c-286d-4184-8e2b-52d76716d947",
"type": "Microsoft.Authorization/policyDefinitions",
"name": "60f3692c-286d-4184-8e2b-52d76716d947"
}