{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-virtual-machines/json-schema/microsoft-azure-virtual-machines-vmscale-set-lifecycle-hook-event-list-result-schema.json",
  "title": "VMScaleSetLifecycleHookEventListResult",
  "description": "The List virtual machine scale set lifecycle hook events operation response.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-virtual-machines-virtualmachinescalesetlifecyclehookevents-api-openapi.yml#/components/schemas/VMScaleSetLifecycleHookEventListResult",
  "type": "object",
  "properties": {
    "value": {
      "type": "array",
      "description": "The list of virtual machine scale set lifecycle hook events created for a virtual machine scale set resource.",
      "items": {
        "$ref": "#/$defs/VMScaleSetLifecycleHookEvent"
      },
      "x-ms-identifiers": [
        "name",
        "id"
      ]
    },
    "nextLink": {
      "type": "string",
      "format": "uri",
      "description": "The uri to fetch the next page of virtual machine scale set lifecycle hook events. Call ListNext() with this to fetch the next page of virtual machine scale set lifecycle hook events."
    }
  },
  "required": [
    "value"
  ],
  "$defs": {
    "ApiEntityReference": {
      "type": "object",
      "description": "The API entity reference.",
      "properties": {
        "id": {
          "type": "string",
          "description": "The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/..."
        }
      }
    },
    "LifecycleHookAction": {
      "type": "string",
      "description": "The action that will be applied to a target resource in the virtual machine scale set lifecycle hook event if the platform does not receive a response from the customer for the target resource before waitUntil.",
      "enum": [
        "Approve",
        "Reject"
      ],
      "x-ms-enum": {
        "name": "LifecycleHookAction",
        "modelAsString": true,
        "values": [
          {
            "name": "Approve",
            "value": "Approve",
            "description": "The lifecycle hook of a target resource in a lifecycle hook event will be approved."
          },
          {
            "name": "Reject",
            "value": "Reject",
            "description": "The lifecycle hook of a target resource in a lifecycle hook event will be rejected."
          }
        ]
      }
    },
    "LifecycleHookActionState": {
      "type": "string",
      "description": "Approval status of a target resource in a virtual machine scale set lifecycle hook event.",
      "enum": [
        "Waiting",
        "Approved",
        "Rejected"
      ],
      "x-ms-enum": {
        "name": "LifecycleHookActionState",
        "modelAsString": true,
        "values": [
          {
            "name": "Waiting",
            "value": "Waiting",
            "description": "The lifecycle hook for the target resource is waiting for approval."
          },
          {
            "name": "Approved",
            "value": "Approved",
            "description": "The lifecycle hook for the target resource is approved."
          },
          {
            "name": "Rejected",
            "value": "Rejected",
            "description": "The lifecycle hook for the target resource is rejected."
          }
        ]
      }
    },
    "ProxyResource": {
      "type": "object",
      "title": "Proxy Resource",
      "description": "The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location",
      "allOf": [
        {
          "$ref": "#/$defs/Resource"
        }
      ]
    },
    "Resource": {
      "type": "object",
      "description": "Referenced by this document but never defined in it. API Evangelist added this empty placeholder so the document resolves; the shape is unknown and is NOT a claim about the API.",
      "x-ae-placeholder": true
    },
    "VMScaleSetLifecycleHookEvent": {
      "type": "object",
      "description": "Defines a virtual machine scale set lifecycle hook event.",
      "properties": {
        "properties": {
          "$ref": "#/$defs/VMScaleSetLifecycleHookEventProperties",
          "description": "Defines the virtual machine scale set lifecycle hook event properties."
        }
      },
      "allOf": [
        {
          "$ref": "#/$defs/ProxyResource"
        }
      ]
    },
    "VMScaleSetLifecycleHookEventAdditionalContext": {
      "type": "object",
      "description": "Additional key-value pairs set on the lifecycle hook event that gives customer some useful context/data.\nThe keys in this dictionary are specific to the lifecycle hook type. Different lifecycle hook events can have different sets of keys in the additional context depending on the lifecycle hook type.\nFor example, for a lifecycle hook event with UpgradeAutoOSScheduling type,\nthe additional context can contain the key \"priority\" that helps customer identify the priority of the Auto OS Upgrade operation triggered on the virtual machine scale set.",
      "properties": {
        "priority": {
          "type": "string",
          "description": "Can only be present for a lifecycle hook event of type \"UpgradeAutoOSScheduling\".\nDenotes the priority of the virtual machine scale set lifecycle hook event for the Auto OS Upgrade scheduled on the virtual machine scale set."
        }
      }
    },
    "VMScaleSetLifecycleHookEventProperties": {
      "type": "object",
      "description": "Defines the virtual machine scale set lifecycle hook event properties.",
      "properties": {
        "type": {
          "$ref": "#/$defs/VMScaleSetLifecycleHookEventType",
          "description": "Defines the type or scenario for sending a virtual machine scale set lifecycle hook event to the customer."
        },
        "waitUntil": {
          "type": "string",
          "description": "Specifies the exact UTC timestamp in ISO 8601 format till which the event would remain in the current lifecycle state waiting for an action from the customer. Beyond this timestamp, the platform will apply the defaultAction for the event."
        },
        "maxWaitUntil": {
          "type": "string",
          "description": "Specifies the exact UTC timestamp in ISO 8601 format till when the customer can delay the lifecycle hook event. The customer will not be allowed to delay the event to a timestamp beyond this.",
          "readOnly": true
        },
        "timeCreated": {
          "type": "string",
          "description": "The UTC timestamp in ISO 8601 format at which the platform creates the virtual machine scale set lifecycle hook event entity.",
          "readOnly": true
        },
        "defaultAction": {
          "$ref": "#/$defs/LifecycleHookAction",
          "description": "Specify the action that will be applied on the a target resource in the virtual machine scale set lifecycle hook event if the platform does not get a response from the customer for the target resource before waitUntil.",
          "readOnly": true
        },
        "targetResources": {
          "type": "array",
          "description": "List of target resources which are getting processed in the virtual machine scale set lifecycle hook event.",
          "items": {
            "$ref": "#/$defs/VMScaleSetLifecycleHookEventTargetResource"
          },
          "x-ms-identifiers": [
            "resource"
          ]
        },
        "additionalContext": {
          "$ref": "#/$defs/VMScaleSetLifecycleHookEventAdditionalContext",
          "description": "Additional key-value pairs set on the lifecycle hook event that gives customer some useful context/data.\nThe keys in this dictionary are specific to the lifecycle hook type. Different lifecycle hook events can have different sets of keys in the additional context depending on the lifecycle hook type.\nFor example, for a lifecycle hook event with UpgradeAutoOSScheduling type,\nthe additional context can contain the key \"priority\" that helps customer identify the priority of the Auto OS Upgrade operation triggered on the virtual machine scale set."
        },
        "state": {
          "$ref": "#/$defs/VMScaleSetLifecycleHookEventState",
          "description": "Specifies the state of the virtual machine scale set lifecycle hook event.",
          "readOnly": true
        }
      }
    },
    "VMScaleSetLifecycleHookEventState": {
      "type": "string",
      "description": "The states that a virtual machine scale set lifecycle hook event can be in. This is not settable by the customer. It is set only by the platform.",
      "enum": [
        "Active",
        "Completed"
      ],
      "x-ms-enum": {
        "name": "VMScaleSetLifecycleHookEventState",
        "modelAsString": true,
        "values": [
          {
            "name": "Active",
            "value": "Active",
            "description": "The lifecycle hook event is active. E.g., waiting on a response from the customer."
          },
          {
            "name": "Completed",
            "value": "Completed",
            "description": "The lifecycle hook event is completed. i.e., all the target resources in the event have moved to a terminal state."
          }
        ]
      }
    },
    "VMScaleSetLifecycleHookEventTargetResource": {
      "type": "object",
      "description": "Define a single target ARM resource in a virtual machine scale set lifecycle hook event. Currently, this can be a virtual machine scale set resource or an individual virtual machine resource within a VMScaleSet.",
      "properties": {
        "resource": {
          "$ref": "#/$defs/ApiEntityReference",
          "description": "Specifies the target ARM resource. Currently, this can be a virtual machine scale set resource or an individual virtual machine resource within a VMScaleSet."
        },
        "actionState": {
          "$ref": "#/$defs/LifecycleHookActionState",
          "description": "State of the lifecycle hook for the target resource. The customer can patch this property to move the lifecycle hook to a terminal state."
        }
      }
    },
    "VMScaleSetLifecycleHookEventType": {
      "type": "string",
      "description": "Specifies the scenario for which the customer is interested in receiving virtual machine scale set lifecycle hook events.",
      "enum": [
        "UpgradeAutoOSScheduling",
        "UpgradeAutoOSRollingBatchStarting"
      ],
      "x-ms-enum": {
        "name": "VMScaleSetLifecycleHookEventType",
        "modelAsString": true,
        "values": [
          {
            "name": "UpgradeAutoOSScheduling",
            "value": "UpgradeAutoOSScheduling",
            "description": "Lifecycle hook event sent to the customer before an Auto OS Upgrade operation starts on the virtual machine scale set."
          },
          {
            "name": "UpgradeAutoOSRollingBatchStarting",
            "value": "UpgradeAutoOSRollingBatchStarting",
            "description": "Lifecycle hook event sent to the customer before upgrade starts on a batch of virtual machines belonging to a virtual machine scale set during an Auto OS Upgrade operation."
          }
        ]
      }
    }
  }
}