{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-virtual-machines/json-schema/microsoft-azure-virtual-machines-availability-set-update-schema.json",
  "title": "AvailabilitySetUpdate",
  "description": "Specifies information about the availability set that the virtual machine should be assigned to. Only tags may be updated.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-virtual-machines-availabilitysets-api-openapi.yml#/components/schemas/AvailabilitySetUpdate",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/AvailabilitySetProperties",
      "description": "The instance view of a resource.",
      "x-ms-client-flatten": true
    },
    "sku": {
      "$ref": "#/$defs/Sku",
      "description": "Sku of the availability set"
    }
  },
  "allOf": [
    {
      "$ref": "#/$defs/UpdateResource"
    }
  ],
  "$defs": {
    "AllInstancesDown": {
      "type": "object",
      "description": "Specifies if Scheduled Events should be auto-approved when all instances are down.",
      "properties": {
        "automaticallyApprove": {
          "type": "boolean",
          "description": "Specifies if Scheduled Events should be auto-approved when all instances are down.\nits default value is true"
        }
      }
    },
    "AvailabilitySetProperties": {
      "type": "object",
      "description": "The instance view of a resource.",
      "properties": {
        "platformUpdateDomainCount": {
          "type": "integer",
          "format": "int32",
          "description": "Update Domain count."
        },
        "platformFaultDomainCount": {
          "type": "integer",
          "format": "int32",
          "description": "Fault Domain count."
        },
        "virtualMachines": {
          "type": "array",
          "description": "A list of references to all virtual machines in the availability set.",
          "items": {
            "$ref": "#/$defs/SubResource"
          }
        },
        "proximityPlacementGroup": {
          "$ref": "#/$defs/SubResource",
          "description": "Specifies information about the proximity placement group that the availability set should be assigned to. Minimum api-version: 2018-04-01."
        },
        "statuses": {
          "type": "array",
          "description": "The resource status information.",
          "items": {
            "$ref": "#/$defs/InstanceViewStatus"
          },
          "readOnly": true,
          "x-ms-identifiers": []
        },
        "scheduledEventsPolicy": {
          "$ref": "#/$defs/ScheduledEventsPolicy",
          "description": "Specifies Redeploy, Reboot and ScheduledEventsAdditionalPublishingTargets Scheduled Event related configurations for the availability set."
        },
        "virtualMachineScaleSetMigrationInfo": {
          "$ref": "#/$defs/VirtualMachineScaleSetMigrationInfo",
          "description": "Describes the migration properties on the Availability Set.",
          "readOnly": true
        }
      }
    },
    "DefaultVirtualMachineScaleSetInfo": {
      "type": "object",
      "description": "Indicates the target Virtual Machine ScaleSet properties upon triggering a seamless migration without downtime of the VMs via the ConvertToVirtualMachineScaleSet API.",
      "properties": {
        "constrainedMaximumCapacity": {
          "type": "boolean",
          "description": "Indicates if the the maximum capacity of the default migrated Virtual Machine Scale Set after its migration will be constrained to a limited number of VMs.",
          "readOnly": true
        },
        "defaultVirtualMachineScaleSet": {
          "$ref": "#/$defs/SubResource",
          "description": "The default Virtual Machine ScaleSet Uri that the Availability Set will be moved to upon triggering a seamless migration via the ConvertToVirtualMachineScaleSet API.",
          "readOnly": true
        }
      }
    },
    "EventGridAndResourceGraph": {
      "type": "object",
      "description": "Specifies eventGridAndResourceGraph related Scheduled Event related configurations.",
      "properties": {
        "enable": {
          "type": "boolean",
          "description": "Specifies if event grid and resource graph is enabled for Scheduled event related configurations."
        },
        "scheduledEventsApiVersion": {
          "type": "string",
          "description": "Specifies the api-version to determine which Scheduled Events configuration schema version will be delivered."
        }
      }
    },
    "InstanceViewStatus": {
      "type": "object",
      "description": "Instance view status.",
      "properties": {
        "code": {
          "type": "string",
          "description": "The status code."
        },
        "level": {
          "$ref": "#/$defs/StatusLevelTypes",
          "description": "The level code."
        },
        "displayStatus": {
          "type": "string",
          "description": "The short localizable label for the status."
        },
        "message": {
          "type": "string",
          "description": "The detailed status message, including for alerts and error messages."
        },
        "time": {
          "type": "string",
          "format": "date-time",
          "description": "The time of the status."
        }
      }
    },
    "ScheduledEventsAdditionalPublishingTargets": {
      "type": "object",
      "properties": {
        "eventGridAndResourceGraph": {
          "$ref": "#/$defs/EventGridAndResourceGraph",
          "description": "The configuration parameters used while creating eventGridAndResourceGraph Scheduled Event setting."
        }
      }
    },
    "ScheduledEventsPolicy": {
      "type": "object",
      "description": "Specifies Redeploy, Reboot and ScheduledEventsAdditionalPublishingTargets Scheduled Event related configurations.",
      "properties": {
        "userInitiatedRedeploy": {
          "$ref": "#/$defs/UserInitiatedRedeploy",
          "description": "The configuration parameters used while creating userInitiatedRedeploy scheduled event setting creation."
        },
        "userInitiatedReboot": {
          "$ref": "#/$defs/UserInitiatedReboot",
          "description": "The configuration parameters used while creating userInitiatedReboot scheduled event setting creation."
        },
        "scheduledEventsAdditionalPublishingTargets": {
          "$ref": "#/$defs/ScheduledEventsAdditionalPublishingTargets",
          "description": "The configuration parameters used while publishing scheduledEventsAdditionalPublishingTargets."
        },
        "allInstancesDown": {
          "$ref": "#/$defs/AllInstancesDown",
          "description": "The configuration parameters used while creating AllInstancesDown scheduled event setting creation."
        }
      }
    },
    "Sku": {
      "type": "object",
      "description": "Describes a virtual machine scale set sku. NOTE: If the new VM SKU is not supported on the hardware the scale set is currently on, you need to deallocate the VMs in the scale set before you modify the SKU name.",
      "properties": {
        "name": {
          "type": "string",
          "description": "The sku name."
        },
        "tier": {
          "type": "string",
          "description": "Specifies the tier of virtual machines in a scale set.<br /><br /> Possible Values:<br /><br /> **Standard**<br /><br /> **Basic**"
        },
        "capacity": {
          "type": "integer",
          "format": "int64",
          "description": "Specifies the number of virtual machines in the scale set."
        }
      }
    },
    "StatusLevelTypes": {
      "type": "string",
      "description": "The level code.",
      "enum": [
        "Info",
        "Warning",
        "Error"
      ],
      "x-ms-enum": {
        "name": "StatusLevelTypes",
        "modelAsString": false
      }
    },
    "SubResource": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Resource Id"
        }
      }
    },
    "UpdateResource": {
      "type": "object",
      "description": "The Update Resource model definition.",
      "properties": {
        "tags": {
          "type": "object",
          "description": "Resource tags",
          "additionalProperties": {
            "type": "string"
          }
        }
      }
    },
    "UserInitiatedReboot": {
      "type": "object",
      "description": "Specifies Reboot related Scheduled Event related configurations.",
      "properties": {
        "automaticallyApprove": {
          "type": "boolean",
          "description": "Specifies Reboot Scheduled Event related configurations."
        }
      }
    },
    "UserInitiatedRedeploy": {
      "type": "object",
      "description": "Specifies Redeploy related Scheduled Event related configurations.",
      "properties": {
        "automaticallyApprove": {
          "type": "boolean",
          "description": "Specifies Redeploy Scheduled Event related configurations."
        }
      }
    },
    "VirtualMachineScaleSetMigrationInfo": {
      "type": "object",
      "description": "Describes the Availability Set properties related to migration to Flexible Virtual Machine Scale Set.",
      "properties": {
        "defaultVirtualMachineScaleSetInfo": {
          "$ref": "#/$defs/DefaultVirtualMachineScaleSetInfo",
          "description": "Indicates the target Virtual Machine ScaleSet properties upon triggering a seamless migration without downtime of the VMs via the ConvertToVirtualMachineScaleSet API.",
          "readOnly": true
        },
        "migrateToVirtualMachineScaleSet": {
          "$ref": "#/$defs/SubResource",
          "description": "Specifies the Virtual Machine Scale Set that the Availability Set is migrated to.",
          "readOnly": true
        }
      }
    }
  }
}