{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-express-route/json-schema/microsoft-azure-express-route-service-endpoint-policy-definition-schema.json",
  "title": "ServiceEndpointPolicyDefinition",
  "description": "Service Endpoint policy definitions.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-express-route-serviceendpointpolicydefinitions-api-openapi.yml#/components/schemas/ServiceEndpointPolicyDefinition",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/ServiceEndpointPolicyDefinitionPropertiesFormat",
      "description": "Properties of the service endpoint policy definition.",
      "x-ms-client-flatten": true
    },
    "etag": {
      "type": "string",
      "description": "A unique read-only string that changes whenever the resource is updated.",
      "readOnly": true
    }
  },
  "allOf": [
    {
      "$ref": "#/$defs/SubResourceModel"
    }
  ],
  "$defs": {
    "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"
          }
        ]
      }
    },
    "ServiceEndpointPolicyDefinitionPropertiesFormat": {
      "type": "object",
      "description": "Service Endpoint policy definition resource.",
      "properties": {
        "description": {
          "type": "string",
          "description": "A description for this rule. Restricted to 140 chars."
        },
        "service": {
          "type": "string",
          "description": "Service endpoint name."
        },
        "serviceResources": {
          "type": "array",
          "description": "A list of service resources.",
          "items": {
            "type": "string"
          }
        },
        "provisioningState": {
          "$ref": "#/$defs/ProvisioningState",
          "description": "The provisioning state of the service endpoint policy definition resource.",
          "readOnly": true
        }
      }
    },
    "SubResource": {
      "type": "object",
      "description": "Reference to another subresource.",
      "properties": {
        "id": {
          "type": "string",
          "description": "Resource ID."
        }
      }
    },
    "SubResourceModel": {
      "type": "object",
      "description": "Reference to another subresource.",
      "properties": {
        "name": {
          "type": "string",
          "description": "Name of the resource."
        },
        "type": {
          "type": "string",
          "description": "Resource type.",
          "readOnly": true
        }
      },
      "allOf": [
        {
          "$ref": "#/$defs/SubResource"
        }
      ],
      "x-ms-azure-resource": true
    }
  }
}