{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-virtual-machines/json-schema/microsoft-azure-virtual-machines-deallocate-resource-operation-response-schema.json",
  "title": "DeallocateResourceOperationResponse",
  "description": "The result of a bulk deallocate action.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-virtual-machines-subscriptions-api-openapi.yml#/components/schemas/DeallocateResourceOperationResponse",
  "type": "object",
  "properties": {
    "description": {
      "type": "string",
      "description": "A description of the bulk action result."
    },
    "type": {
      "type": "string",
      "description": "The type of resources targeted by the bulk action."
    },
    "location": {
      "$ref": "#/$defs/Azure.Core.azureLocation",
      "description": "The Azure region where Bulk Actions processes the request.",
      "x-ms-mutability": [
        "read",
        "create"
      ]
    },
    "results": {
      "type": "array",
      "description": "The result for each virtual machine.",
      "items": {
        "$ref": "#/$defs/ResourceOperation"
      },
      "x-ms-identifiers": [
        "resourceId"
      ]
    }
  },
  "required": [
    "description",
    "type",
    "location"
  ],
  "$defs": {
    "Azure.Core.azureLocation": {
      "type": "string",
      "description": "Represents an Azure geography region where supported resource providers live."
    },
    "FallbackOperationInfo": {
      "type": "object",
      "description": "Information about the fallback operation attempted after the requested operation did not succeed.",
      "properties": {
        "lastOpType": {
          "$ref": "#/$defs/ResourceOperationType",
          "description": "The type of the additional operation."
        },
        "status": {
          "type": "string",
          "description": "The status of the additional operation."
        },
        "error": {
          "$ref": "#/$defs/ResourceOperationError",
          "description": "The error returned when the additional operation did not succeed."
        }
      },
      "required": [
        "lastOpType",
        "status"
      ]
    },
    "ResourceOperation": {
      "type": "object",
      "description": "The result of a bulk action for one virtual machine.",
      "properties": {
        "resourceId": {
          "type": "string",
          "format": "arm-id",
          "description": "The virtual machine Azure resource ID."
        },
        "errorCode": {
          "type": "string",
          "description": "A code that identifies the error for the virtual machine operation."
        },
        "errorDetails": {
          "type": "string",
          "description": "A message that describes the error for the virtual machine operation."
        },
        "operation": {
          "$ref": "#/$defs/ResourceOperationDetails",
          "description": "The virtual machine operation details."
        }
      }
    },
    "ResourceOperationDetails": {
      "type": "object",
      "description": "The status and settings for an operation on one virtual machine.",
      "properties": {
        "operationId": {
          "type": "string",
          "description": "The operation ID used to track the action for this virtual machine."
        },
        "resourceId": {
          "type": "string",
          "format": "arm-id",
          "description": "The virtual machine's Azure resource ID."
        },
        "opType": {
          "type": "string",
          "description": "The type of operation performed on the virtual machine.",
          "default": "Unknown",
          "enum": [
            "Unknown",
            "Start",
            "Deallocate",
            "Hibernate",
            "Create",
            "Delete"
          ],
          "x-ms-enum": {
            "name": "ResourceOperationType",
            "modelAsString": true,
            "values": [
              {
                "name": "Unknown",
                "value": "Unknown",
                "description": "The operation type is not known."
              },
              {
                "name": "Start",
                "value": "Start",
                "description": "Starts the specified virtual machines."
              },
              {
                "name": "Deallocate",
                "value": "Deallocate",
                "description": "Deallocates the specified virtual machines."
              },
              {
                "name": "Hibernate",
                "value": "Hibernate",
                "description": "Hibernates the specified virtual machines."
              },
              {
                "name": "Create",
                "value": "Create",
                "description": "Creates the specified virtual machines."
              },
              {
                "name": "Delete",
                "value": "Delete",
                "description": "Deletes the specified virtual machines."
              }
            ]
          }
        },
        "subscriptionId": {
          "type": "string",
          "description": "The subscription ID associated with the bulk action."
        },
        "deadline": {
          "type": "string",
          "format": "date-time",
          "description": "The requested deadline for the operation."
        },
        "deadlineType": {
          "type": "string",
          "description": "Specifies whether the deadline time indicates the time at which the operation should start or should be complete.",
          "default": "Unknown",
          "enum": [
            "Unknown",
            "InitiateAt",
            "CompleteBy"
          ],
          "x-ms-enum": {
            "name": "DeadlineType",
            "modelAsString": true,
            "values": [
              {
                "name": "Unknown",
                "value": "Unknown",
                "description": "The deadline behavior is not known."
              },
              {
                "name": "InitiateAt",
                "value": "InitiateAt",
                "description": "Bulk Actions attempts to start the operation at the specified deadline."
              },
              {
                "name": "CompleteBy",
                "value": "CompleteBy",
                "description": "Bulk Actions attempts to complete the operation by the specified deadline."
              }
            ]
          }
        },
        "state": {
          "type": "string",
          "description": "The current state of the operation.",
          "default": "Unknown",
          "enum": [
            "Unknown",
            "PendingScheduling",
            "Scheduled",
            "PendingExecution",
            "Executing",
            "Succeeded",
            "Failed",
            "Cancelled",
            "Blocked"
          ],
          "x-ms-enum": {
            "name": "OperationState",
            "modelAsString": true,
            "values": [
              {
                "name": "Unknown",
                "value": "Unknown",
                "description": "The operation state is not known."
              },
              {
                "name": "PendingScheduling",
                "value": "PendingScheduling",
                "description": "The operation is waiting to be scheduled."
              },
              {
                "name": "Scheduled",
                "value": "Scheduled",
                "description": "The operation has been scheduled."
              },
              {
                "name": "PendingExecution",
                "value": "PendingExecution",
                "description": "The operation is waiting to begin."
              },
              {
                "name": "Executing",
                "value": "Executing",
                "description": "The operation is in progress."
              },
              {
                "name": "Succeeded",
                "value": "Succeeded",
                "description": "The operation completed successfully."
              },
              {
                "name": "Failed",
                "value": "Failed",
                "description": "The operation failed."
              },
              {
                "name": "Cancelled",
                "value": "Cancelled",
                "description": "The operation was canceled by the caller."
              },
              {
                "name": "Blocked",
                "value": "Blocked",
                "description": "The operation cannot currently make progress."
              }
            ]
          },
          "readOnly": true
        },
        "timezone": {
          "type": "string",
          "description": "The time zone used to interpret the operation deadline."
        },
        "resourceOperationError": {
          "$ref": "#/$defs/ResourceOperationError",
          "description": "Contains error details if the operation does not succeed."
        },
        "fallbackOperationInfo": {
          "$ref": "#/$defs/FallbackOperationInfo",
          "description": "Information about the fallback operation attempted after the requested operation did not succeed."
        },
        "completedAt": {
          "type": "string",
          "format": "date-time",
          "description": "The date and time when the operation completed."
        },
        "retryPolicy": {
          "$ref": "#/$defs/RetryPolicy",
          "description": "The retry settings for the bulk action."
        }
      },
      "required": [
        "operationId"
      ]
    },
    "ResourceOperationError": {
      "type": "object",
      "description": "An error that occurred while processing one virtual machine.",
      "properties": {
        "errorCode": {
          "type": "string",
          "description": "A code that identifies the error."
        },
        "errorDetails": {
          "type": "string",
          "description": "A message that describes the error."
        }
      },
      "required": [
        "errorCode",
        "errorDetails"
      ]
    },
    "ResourceOperationType": {
      "type": "string",
      "description": "The type of operation performed by Bulk Actions.",
      "enum": [
        "Unknown",
        "Start",
        "Deallocate",
        "Hibernate",
        "Create",
        "Delete"
      ],
      "x-ms-enum": {
        "name": "ResourceOperationType",
        "modelAsString": true,
        "values": [
          {
            "name": "Unknown",
            "value": "Unknown",
            "description": "The operation type is not known."
          },
          {
            "name": "Start",
            "value": "Start",
            "description": "Starts the specified virtual machines."
          },
          {
            "name": "Deallocate",
            "value": "Deallocate",
            "description": "Deallocates the specified virtual machines."
          },
          {
            "name": "Hibernate",
            "value": "Hibernate",
            "description": "Hibernates the specified virtual machines."
          },
          {
            "name": "Create",
            "value": "Create",
            "description": "Creates the specified virtual machines."
          },
          {
            "name": "Delete",
            "value": "Delete",
            "description": "Deletes the specified virtual machines."
          }
        ]
      }
    },
    "RetryPolicy": {
      "type": "object",
      "description": "The retry settings for a bulk action.",
      "properties": {
        "retryCount": {
          "type": "integer",
          "format": "int32",
          "description": "The maximum number of retry attempts."
        },
        "retryWindowInMinutes": {
          "type": "integer",
          "format": "int32",
          "description": "The period, in minutes, during which Bulk Actions can retry the operation."
        },
        "onFailureAction": {
          "$ref": "#/$defs/ResourceOperationType",
          "description": "The operation that Bulk Actions attempts when the requested operation fails."
        }
      }
    }
  }
}