azure-policy icon indicating copy to clipboard operation
azure-policy copied to clipboard

Alias Request: Microsoft.EventHub/namespaces/eventhubs/messageRetentionInDays

Open Steven-N opened this issue 8 years ago • 1 comments

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

Steven-N avatar Jun 18 '18 15:06 Steven-N

Aliases have been added for all properties in Microsoft.EventHub/namespaces. Please give it a try.

mentat9 avatar Oct 26 '18 03:10 mentat9