{ "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" }