azure-policy
azure-policy copied to clipboard
Alias Request: Microsoft.EventHub/namespaces/eventhubs/messageRetentionInDays
Scenario - The ability to enforce message retention on an EventHub.
Definition
"properties": {
"displayName": "Enforce message retention on an Event Hub.",
"description": "Enforces a specific message retention (in days) on an event hub.",
"policyRule": {
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.EventHub/namespaces"
},
{
"not": {
"field": "Microsoft.EventHub/namespaces/eventhubs/messageRetentionInDays",
"equals": 7
}
}
]
},
"then": {
"effect": "deny"
}
}
}
}```
Aliases have been added for all properties in Microsoft.EventHub/namespaces. Please give it a try.