---
title: "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/locations/{location}/virtualMachinesBulkCancel"
method: POST
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/locations/{location}/virtualMachinesBulkCancel"
---

# POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/locations/{location}/virtualMachinesBulkCancel

`POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/locations/{location}/virtualMachinesBulkCancel`

## Request

- Base URL: `https://management.azure.com`
- URL: `https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/locations/{location}/virtualMachinesBulkCancel`
- Auth: OAuth 2
  - Implicit: `https://login.microsoftonline.com/common/oauth2/authorize`
  - Scopes: `user_impersonation`

Cancel one or more Bulk Actions operations by Bulk Action Operation Ids. Cancellation is best effort and work that has already completed is not reversed.

## Path parameters

- `location` string, required

## Parameters

- `../../../../../../common-types/resource-management/v6/types.json#/components/parameters/ApiVersionParameter` (unresolved $ref)
- `../../../../../../common-types/resource-management/v6/types.json#/components/parameters/SubscriptionIdParameter` (unresolved $ref)
- `../../../../../../common-types/resource-management/v6/types.json#/components/parameters/ResourceGroupNameParameter` (unresolved $ref)

## Request body

- CancelOperationsRequest: The eligible operations to cancel.
  - `operationIds` string[], required: The Bulk Action Operation Ids that identify the operations to cancel.

## Response `200`

Azure operation completed successfully.

- CancelOperationsResponse: The results of the cancellation requests.
  - `results` ResourceOperation[], required: The current result for each operation submitted for cancellation.
    - `resourceId` string, arm-id: The virtual machine Azure resource ID.
    - `errorCode` string: A code that identifies the error for the virtual machine operation.
    - `errorDetails` string: A message that describes the error for the virtual machine operation.
    - `operation` ResourceOperationDetails: The status and settings for an operation on one virtual machine.
      - `operationId` string, required: The operation ID used to track the action for this virtual machine.
      - `resourceId` string, arm-id: The virtual machine's Azure resource ID.
      - `opType` 'Unknown' | 'Start' | 'Deallocate' | 'Hibernate' | 'Create' | 'Delete': The type of operation performed on the virtual machine.
      - `subscriptionId` string: The subscription ID associated with the bulk action.
      - `deadline` string, date-time: The requested deadline for the operation.
      - `deadlineType` 'Unknown' | 'InitiateAt' | 'CompleteBy': Specifies whether the deadline time indicates the time at which the operation should start or should be complete.
      - `state` 'Unknown' | 'PendingScheduling' | 'Scheduled' | 'PendingExecution' | 'Executing' | 'Succeeded' | 'Failed' | 'Cancelled' | 'Blocked': The current state of the operation.
      - `timezone` string: The time zone used to interpret the operation deadline.
      - `resourceOperationError` ResourceOperationError: An error that occurred while processing one virtual machine.
        - `errorCode` string, required: A code that identifies the error.
        - `errorDetails` string, required: A message that describes the error.
      - `fallbackOperationInfo` FallbackOperationInfo: Information about the fallback operation attempted after the requested operation did not succeed.
        - `lastOpType` 'Unknown' | 'Start' | 'Deallocate' | 'Hibernate' | 'Create' | 'Delete', required: The type of operation performed by Bulk Actions.
        - `status` string, required: The status of the additional operation.
        - `error` ResourceOperationError: An error that occurred while processing one virtual machine.
          - `errorCode` string, required: A code that identifies the error.
          - `errorDetails` string, required: A message that describes the error.
      - `completedAt` string, date-time: The date and time when the operation completed.
      - `retryPolicy` RetryPolicy: The retry settings for a bulk action.
        - `retryCount` integer: The maximum number of retry attempts.
        - `retryWindowInMinutes` integer: The period, in minutes, during which Bulk Actions can retry the operation.
        - `onFailureAction` 'Unknown' | 'Start' | 'Deallocate' | 'Hibernate' | 'Create' | 'Delete': The type of operation performed by Bulk Actions.

## Other responses

- `default`: An unexpected error response.

## Changes

- **2026-05-29** (2026-04-06-preview) `0af182ed1338`: 1 info
  - endpoint added
- **2026-04-16** (2026-04-06-preview) `1d3b494600fa`: 1 breaking
  - api path removed without deprecation

[Operation history](https://skmtc.dev/azure/apis/compute-microsoft-compute-bulkactions/changes/subscriptions/:subscriptionId/resourceGroups/:resourceGroupName/providers/Microsoft.Compute/locations/:location/virtualMachinesBulkCancel/post.md)

---

[API](https://skmtc.dev/azure/apis/compute-microsoft-compute-bulkactions.md) - [All operations](https://skmtc.dev/azure/apis/compute-microsoft-compute-bulkactions/llms.txt) - [OpenAPI document](https://skmtc.dev/azure/apis/compute-microsoft-compute-bulkactions/revisions/057e794e9c55?raw)
