Azure Virtual Machines Virtual Machine Scale Set Life Cycle Hook Events API

The VirtualMachineScaleSetLifeCycleHookEvents API from Azure Virtual Machines — 2 operation(s) for virtualmachinescalesetlifecyclehookevents.

GitHub OpenAPI

Operations 3

GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/lifecycleHookEvents Virtual machine scale set life cycle hook events list #
GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/lifecycleHookEvents/{lifecycleHookEventName} Virtual machine scale set life cycle hook events get #
PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/lifecycleHookEvents/{lifecycleHookEventName} Virtual machine scale set life cycle hook events update #

Documentation

Specifications

SDKs

Schemas & Data

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/microsoft-azure-virtual-machines:microsoft-azure-virtual-machines-virtualmachinescalesetlifecyclehookevents-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

microsoft-azure-virtual-machines-virtualmachinescalesetlifecyclehookevents-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Azure Compute resource management API.
  version: '2026-04-01'
  description: Compute Client
  x-typespec-generated:
  - emitter: '@azure-tools/typespec-autorest'
servers:
- url: https://management.azure.com
security:
- azure_auth:
  - user_impersonation
tags:
- name: VirtualMachineScaleSetLifeCycleHookEvents
paths:
  ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/lifecycleHookEvents
  : get:
      operationId: VirtualMachineScaleSetLifeCycleHookEvents_List
      tags:
      - VirtualMachineScaleSetLifeCycleHookEvents
      description: Gets a list of virtual machine scale set lifecycle hook events created for a virtual machine scale set resource.
      parameters:
      - $ref: '#/components/parameters/ApiVersionParameter'
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/ResourceGroupNameParameter'
      - name: vmScaleSetName
        in: path
        description: The name of the VM scale set.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VMScaleSetLifecycleHookEventListResult'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      x-ms-pageable:
        nextLinkName: nextLink
      summary: Virtual machine scale set life cycle hook events list
      x-summary-source: derived
  ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/lifecycleHookEvents/{lifecycleHookEventName}
  : get:
      operationId: VirtualMachineScaleSetLifeCycleHookEvents_Get
      tags:
      - VirtualMachineScaleSetLifeCycleHookEvents
      description: Gets a virtual machine scale set lifecycle hook event.
      parameters:
      - $ref: '#/components/parameters/ApiVersionParameter'
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/ResourceGroupNameParameter'
      - name: vmScaleSetName
        in: path
        description: The name of the VM scale set.
        required: true
        schema:
          type: string
      - name: lifecycleHookEventName
        in: path
        description: The name of the VMScaleSetLifecycleHookEvent
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Azure operation completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VMScaleSetLifecycleHookEvent'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      summary: Virtual machine scale set life cycle hook events get
      x-summary-source: derived
    patch:
      operationId: VirtualMachineScaleSetLifeCycleHookEvents_Update
      tags:
      - VirtualMachineScaleSetLifeCycleHookEvents
      description: The operation to update a virtual machine scale set lifecycle hook event.
      parameters:
      - $ref: '#/components/parameters/ApiVersionParameter'
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/ResourceGroupNameParameter'
      - name: vmScaleSetName
        in: path
        description: The name of the VM scale set.
        required: true
        schema:
          type: string
      - name: lifecycleHookEventName
        in: path
        description: The name of the VMScaleSetLifecycleHookEvent
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Azure operation completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VMScaleSetLifecycleHookEvent'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VMScaleSetLifecycleHookEventUpdate'
        description: Parameters supplied to the Update virtual machine scale set lifecycle hook event operation.
        required: true
      summary: Virtual machine scale set life cycle hook events update
      x-summary-source: derived
components:
  schemas:
    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.
    VMScaleSetLifecycleHookEvent:
      type: object
      description: Defines a virtual machine scale set lifecycle hook event.
      properties:
        properties:
          $ref: '#/components/schemas/VMScaleSetLifecycleHookEventProperties'
          description: Defines the virtual machine scale set lifecycle hook event properties.
      allOf:
      - $ref: '#/components/schemas/ProxyResource'
    ApiError:
      type: object
      properties:
        details:
          type: array
          items:
            $ref: '#/components/schemas/ApiErrorBase'
          x-ms-identifiers:
          - message
          - target
          description: The Api error details
        innererror:
          $ref: '#/components/schemas/InnerError'
          description: The Api inner error
        code:
          type: string
          description: The error code.
        target:
          type: string
          description: The target of the particular error.
        message:
          type: string
          description: The error message.
      description: Api error.
    VMScaleSetLifecycleHookEventUpdate:
      type: object
      description: Specifies information about the virtual machine scale set lifecycle hook event.
      properties:
        properties:
          $ref: '#/components/schemas/VMScaleSetLifecycleHookEventProperties'
          description: virtual machine scale set lifecycle hook event properties.
          x-ms-client-flatten: true
    CloudError:
      type: object
      x-ms-external: true
      properties:
        error:
          $ref: '#/components/schemas/ApiError'
      description: An error response from the Compute service.
    VMScaleSetLifecycleHookEventProperties:
      type: object
      description: Defines the virtual machine scale set lifecycle hook event properties.
      properties:
        type:
          $ref: '#/components/schemas/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: '#/components/schemas/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: '#/components/schemas/VMScaleSetLifecycleHookEventTargetResource'
          x-ms-identifiers:
          - resource
        additionalContext:
          $ref: '#/components/schemas/VMScaleSetLifecycleHookEventAdditionalContext'
          description: 'Additional key-value pairs set on the lifecycle hook event that gives customer some useful context/data.

            The 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.

            For example, for a lifecycle hook event with UpgradeAutoOSScheduling type,

            the 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: '#/components/schemas/VMScaleSetLifecycleHookEventState'
          description: Specifies the state of the virtual machine scale set lifecycle hook event.
          readOnly: true
    VMScaleSetLifecycleHookEventListResult:
      type: object
      description: The List virtual machine scale set lifecycle hook events operation response.
      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: '#/components/schemas/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
    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: '#/components/schemas/Resource'
    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.
    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.
    VMScaleSetLifecycleHookEventAdditionalContext:
      type: object
      description: 'Additional key-value pairs set on the lifecycle hook event that gives customer some useful context/data.

        The 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.

        For example, for a lifecycle hook event with UpgradeAutoOSScheduling type,

        the 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".

            Denotes the priority of the virtual machine scale set lifecycle hook event for the Auto OS Upgrade scheduled on the virtual machine scale set.'
    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.
    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: '#/components/schemas/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: '#/components/schemas/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.
    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}/...
  parameters:
    SubscriptionIdParameter:
      name: subscriptionId
      in: path
      description: The ID of the target subscription.
      required: true
      schema:
        type: string
        minLength: 1
    ResourceGroupNameParameter:
      name: resourceGroupName
      in: path
      description: The name of the resource group. The name is case insensitive.
      required: true
      x-ms-parameter-location: method
      schema:
        type: string
        maxLength: 90
        minLength: 1
    ApiVersionParameter:
      name: api-version
      in: query
      description: The API version to use for this operation.
      required: true
      schema:
        type: string
        minLength: 1
  securitySchemes:
    azure_auth:
      type: oauth2
      flows:
        implicit:
          scopes:
            user_impersonation: impersonate your user account
          authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize
      description: Azure Active Directory OAuth2 Flow.
x-ms-paths:
  ? /subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions?$expand=Properties
  : get:
      operationId: VirtualMachineImages_ListWithProperties
      tags:
      - VirtualMachineImages
      parameters:
      - $ref: '#/components/parameters/ApiVersionParameter'
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/LocationParameter'
      - name: publisherName
        in: path
        description: A valid image publisher.
        required: true
        type: string
      - name: offer
        in: path
        description: A valid image publisher offer.
        required: true
        type: string
      - name: skus
        in: path
        description: A valid image SKU.
        required: true
        type: string
      - name: $expand
        in: query
        description: The expand expression to apply on the operation.
        required: true
        type: string
      - name: $top
        in: query
        required: false
        type: integer
        format: int32
      - name: $orderby
        in: query
        required: false
        type: string
      responses:
        '200':
          description: Azure operation completed successfully.
          schema:
            type: array
            items:
              $ref: '#/components/schemas/VirtualMachineImage'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/components/schemas/CloudError'