{ "properties": { "displayName": "Service Bus Queue must have Time to Live (TTL) of 14 days.", "policyType": "Custom", "mode": "All", "description": "This policy enables you to restrict service bus queues with TTL other than 2 weeks.", "metadata": { "category": "Service Bus", "createdBy": "c6025a2e-416c-42da-96ef-dd507382793a", "createdOn": "2020-04-01T13:25:04.7464348Z", "updatedBy": "c6025a2e-416c-42da-96ef-dd507382793a", "updatedOn": "2020-04-03T11:50:29.9215728Z" }, "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/queues" }, { "not": { "field": "Microsoft.ServiceBus/namespaces/queues/defaultMessageTimeToLive", "equals": "P14D" } } ] }, "then": { "effect": "[parameters('effect')]" } } }, "id": "/providers/Microsoft.Management/managementGroups/e9792fd7-4044-47e7-a40d-3fba46f1cd09/providers/Microsoft.Authorization/policyDefinitions/b8e823fc-5c2b-4ebe-b9fc-2d4524bc5ae5", "type": "Microsoft.Authorization/policyDefinitions", "name": "b8e823fc-5c2b-4ebe-b9fc-2d4524bc5ae5" }