{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-express-route/json-schema/microsoft-azure-express-route-route-filter-rule-schema.json",
  "title": "RouteFilterRule",
  "description": "Route Filter Rule Resource.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-express-route-routefilterrules-api-openapi.yml#/components/schemas/RouteFilterRule",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/RouteFilterRulePropertiesFormat",
      "description": "Properties of the route filter rule.",
      "x-ms-client-flatten": true
    },
    "name": {
      "type": "string",
      "description": "The name of the resource that is unique within a resource group. This name can be used to access the resource."
    },
    "location": {
      "type": "string",
      "description": "Resource location."
    },
    "etag": {
      "type": "string",
      "description": "A unique read-only string that changes whenever the resource is updated.",
      "readOnly": true
    }
  },
  "allOf": [
    {
      "$ref": "#/$defs/SubResource"
    }
  ],
  "$defs": {
    "Access": {
      "type": "string",
      "description": "Access to be allowed or denied.",
      "enum": [
        "Allow",
        "Deny"
      ],
      "x-ms-enum": {
        "name": "Access",
        "modelAsString": true,
        "values": [
          {
            "name": "Allow",
            "value": "Allow",
            "description": "Allow"
          },
          {
            "name": "Deny",
            "value": "Deny",
            "description": "Deny"
          }
        ]
      }
    },
    "ProvisioningState": {
      "type": "string",
      "description": "Provisioning states of a resource.",
      "enum": [
        "Failed",
        "Succeeded",
        "Canceled",
        "Creating",
        "Updating",
        "Deleting"
      ],
      "x-ms-enum": {
        "name": "ProvisioningState",
        "modelAsString": true,
        "values": [
          {
            "name": "Failed",
            "value": "Failed",
            "description": "Failed"
          },
          {
            "name": "Succeeded",
            "value": "Succeeded",
            "description": "Succeeded"
          },
          {
            "name": "Canceled",
            "value": "Canceled",
            "description": "Canceled"
          },
          {
            "name": "Creating",
            "value": "Creating",
            "description": "Creating"
          },
          {
            "name": "Updating",
            "value": "Updating",
            "description": "Updating"
          },
          {
            "name": "Deleting",
            "value": "Deleting",
            "description": "Deleting"
          }
        ]
      }
    },
    "RouteFilterRulePropertiesFormat": {
      "type": "object",
      "description": "Route Filter Rule Resource.",
      "properties": {
        "access": {
          "$ref": "#/$defs/Access",
          "description": "The access type of the rule."
        },
        "routeFilterRuleType": {
          "$ref": "#/$defs/RouteFilterRuleType",
          "description": "The rule type of the rule."
        },
        "communities": {
          "type": "array",
          "description": "The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020'].",
          "items": {
            "type": "string"
          }
        },
        "provisioningState": {
          "$ref": "#/$defs/ProvisioningState",
          "description": "The provisioning state of the route filter rule resource.",
          "readOnly": true
        }
      },
      "required": [
        "access",
        "routeFilterRuleType",
        "communities"
      ]
    },
    "RouteFilterRuleType": {
      "type": "string",
      "description": "The rule type of the rule.",
      "enum": [
        "Community"
      ],
      "x-ms-enum": {
        "name": "RouteFilterRuleType",
        "modelAsString": true,
        "values": [
          {
            "name": "Community",
            "value": "Community",
            "description": "Community"
          }
        ]
      }
    },
    "SubResource": {
      "type": "object",
      "description": "Reference to another subresource.",
      "properties": {
        "id": {
          "type": "string",
          "description": "Resource ID."
        }
      }
    }
  }
}