{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/azure-container-registry/json-schema/azure-container-registry-webhook-schema.json",
  "title": "Webhook",
  "description": "An object that represents a webhook for a container registry.",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_superseded/azure-container-registry-webhooks-api-openapi.yml#/components/schemas/Webhook",
  "allOf": [
    {
      "$ref": "#/$defs/Resource"
    }
  ],
  "properties": {
    "properties": {
      "$ref": "#/$defs/WebhookProperties",
      "description": "The properties of the webhook.",
      "x-ms-client-flatten": true
    }
  },
  "type": "object",
  "$defs": {
    "Resource": {
      "description": "An Azure resource.",
      "properties": {
        "id": {
          "description": "The resource ID.",
          "readOnly": true,
          "type": "string"
        },
        "location": {
          "description": "The location of the resource. This cannot be changed after the resource is created.",
          "type": "string",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        },
        "name": {
          "description": "The name of the resource.",
          "readOnly": true,
          "type": "string"
        },
        "tags": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "The tags of the resource.",
          "type": "object"
        },
        "type": {
          "description": "The type of the resource.",
          "readOnly": true,
          "type": "string"
        }
      },
      "required": [
        "location"
      ],
      "x-ms-azure-resource": true
    },
    "WebhookProperties": {
      "description": "The properties of a webhook.",
      "properties": {
        "actions": {
          "description": "The list of actions that trigger the webhook to post notifications.",
          "items": {
            "enum": [
              "push",
              "delete",
              "quarantine",
              "chart_push",
              "chart_delete"
            ],
            "type": "string",
            "x-ms-enum": {
              "modelAsString": true,
              "name": "WebhookAction"
            }
          },
          "type": "array"
        },
        "provisioningState": {
          "description": "The provisioning state of the webhook at the time the operation was called.",
          "enum": [
            "Creating",
            "Updating",
            "Deleting",
            "Succeeded",
            "Failed",
            "Canceled"
          ],
          "readOnly": true,
          "type": "string",
          "x-ms-enum": {
            "modelAsString": true,
            "name": "ProvisioningState"
          }
        },
        "scope": {
          "description": "The scope of repositories where the event can be triggered. For example, 'foo:*' means events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to 'foo:latest'. Empty means all events.",
          "type": "string"
        },
        "status": {
          "description": "The status of the webhook at the time the operation was called.",
          "enum": [
            "enabled",
            "disabled"
          ],
          "type": "string",
          "x-ms-enum": {
            "modelAsString": true,
            "name": "WebhookStatus"
          }
        }
      },
      "required": [
        "actions"
      ],
      "type": "object"
    }
  }
}