diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2021-04-01/compute.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2021-04-01/compute.json
index 4c1ae6b90ae7..0f9667a7e08b 100644
--- a/specification/compute/resource-manager/Microsoft.Compute/stable/2021-04-01/compute.json
+++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2021-04-01/compute.json
@@ -4734,6 +4734,9 @@
},
"Create a scale set with userData.": {
"$ref": "./examples/CreateOrUpdateAScaleSetWithUserData.json"
+ },
+ "Create a scale set with spot restore policy": {
+ "$ref": "./examples/CreateAScaleSetWithSpotRestorePolicy.json"
}
}
},
@@ -11256,6 +11259,20 @@
},
"description": "Describes a scale-in policy for a virtual machine scale set."
},
+ "SpotRestorePolicy": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "description": "Enables the Spot-Try-Restore feature where evicted VMSS SPOT instances will be tried to be restored opportunistically based on capacity availability and pricing constraints"
+ },
+ "restoreTimeout": {
+ "type": "string",
+ "description": "Timeout value expressed as an ISO 8601 time duration after which the platform will not try to restore the VMSS SPOT instances"
+ }
+ },
+ "description": "Specifies the Spot-Try-Restore properties for the virtual machine scale set.
With this property customer can enable or disable automatic restore of the evicted Spot VMSS VM instances opportunistically based on capacity availability and pricing constraint."
+ },
"OrchestrationMode": {
"type": "string",
"description": "Specifies the orchestration mode for the virtual machine scale set.",
@@ -12565,6 +12582,10 @@
"orchestrationMode": {
"$ref": "#/definitions/OrchestrationMode",
"description": "Specifies the orchestration mode for the virtual machine scale set."
+ },
+ "spotRestorePolicy": {
+ "$ref": "#/definitions/SpotRestorePolicy",
+ "description": "Specifies the Spot Restore properties for the virtual machine scale set."
}
},
"description": "Describes the properties of a Virtual Machine Scale Set."
diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2021-04-01/examples/CreateAScaleSetWithSpotRestorePolicy.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2021-04-01/examples/CreateAScaleSetWithSpotRestorePolicy.json
new file mode 100644
index 000000000000..616ebb4f1cd0
--- /dev/null
+++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2021-04-01/examples/CreateAScaleSetWithSpotRestorePolicy.json
@@ -0,0 +1,242 @@
+{
+ "parameters": {
+ "subscriptionId": "{subscription-id}",
+ "resourceGroupName": "myResourceGroup",
+ "vmScaleSetName": "{vmss-name}",
+ "api-version": "2021-04-01",
+ "parameters": {
+ "sku": {
+ "tier": "Standard",
+ "capacity": 2,
+ "name": "Standard_A8m_v2"
+ },
+ "location": "westus",
+ "properties": {
+ "overprovision": true,
+ "virtualMachineProfile": {
+ "storageProfile": {
+ "imageReference": {
+ "sku": "2016-Datacenter",
+ "publisher": "MicrosoftWindowsServer",
+ "version": "latest",
+ "offer": "WindowsServer"
+ },
+ "osDisk": {
+ "caching": "ReadWrite",
+ "managedDisk": {
+ "storageAccountType": "Standard_LRS"
+ },
+ "createOption": "FromImage"
+ }
+ },
+ "osProfile": {
+ "computerNamePrefix": "{vmss-name}",
+ "adminUsername": "{your-username}",
+ "adminPassword": "{your-password}"
+ },
+ "networkProfile": {
+ "networkInterfaceConfigurations": [
+ {
+ "name": "{vmss-name}",
+ "properties": {
+ "primary": true,
+ "enableIPForwarding": true,
+ "ipConfigurations": [
+ {
+ "name": "{vmss-name}",
+ "properties": {
+ "subnet": {
+ "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ },
+ "priority": "Spot",
+ "evictionPolicy": "Deallocate",
+ "billingProfile": {
+ "maxPrice": -1
+ }
+ },
+ "upgradePolicy": {
+ "mode": "Manual"
+ },
+ "spotRestorePolicy": {
+ "enabled": true,
+ "restoreTimeout": "PT1H"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "body": {
+ "sku": {
+ "tier": "Standard",
+ "capacity": 2,
+ "name": "Standard_A8m_v2"
+ },
+ "name": "{vmss-name}",
+ "properties": {
+ "singlePlacementGroup": true,
+ "overprovision": true,
+ "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7",
+ "virtualMachineProfile": {
+ "storageProfile": {
+ "imageReference": {
+ "sku": "2016-Datacenter",
+ "publisher": "MicrosoftWindowsServer",
+ "version": "latest",
+ "offer": "WindowsServer"
+ },
+ "osDisk": {
+ "caching": "ReadWrite",
+ "managedDisk": {
+ "storageAccountType": "Standard_LRS"
+ },
+ "createOption": "FromImage"
+ }
+ },
+ "osProfile": {
+ "computerNamePrefix": "{vmss-name}",
+ "adminUsername": "{your-username}",
+ "secrets": [],
+ "windowsConfiguration": {
+ "provisionVMAgent": true,
+ "enableAutomaticUpdates": true
+ }
+ },
+ "networkProfile": {
+ "networkInterfaceConfigurations": [
+ {
+ "name": "{vmss-name}",
+ "properties": {
+ "dnsSettings": {
+ "dnsServers": []
+ },
+ "primary": true,
+ "enableIPForwarding": true,
+ "ipConfigurations": [
+ {
+ "name": "{vmss-name}",
+ "properties": {
+ "subnet": {
+ "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
+ },
+ "privateIPAddressVersion": "IPv4"
+ }
+ }
+ ],
+ "enableAcceleratedNetworking": false
+ }
+ }
+ ]
+ },
+ "priority": "Spot",
+ "evictionPolicy": "Deallocate",
+ "billingProfile": {
+ "maxPrice": -1
+ }
+ },
+ "upgradePolicy": {
+ "mode": "Manual"
+ },
+ "spotRestorePolicy": {
+ "enabled": true,
+ "restoreTimeout": "PT1H"
+ },
+ "provisioningState": "Creating"
+ },
+ "location": "westus",
+ "type": "Microsoft.Compute/virtualMachineScaleSets",
+ "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
+ }
+ },
+ "201": {
+ "body": {
+ "sku": {
+ "tier": "Standard",
+ "capacity": 2,
+ "name": "Standard_A8m_v2"
+ },
+ "name": "{vmss-name}",
+ "properties": {
+ "singlePlacementGroup": true,
+ "overprovision": true,
+ "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7",
+ "virtualMachineProfile": {
+ "storageProfile": {
+ "imageReference": {
+ "sku": "2016-Datacenter",
+ "publisher": "MicrosoftWindowsServer",
+ "version": "latest",
+ "offer": "WindowsServer"
+ },
+ "osDisk": {
+ "caching": "ReadWrite",
+ "managedDisk": {
+ "storageAccountType": "Standard_LRS"
+ },
+ "createOption": "FromImage"
+ }
+ },
+ "osProfile": {
+ "computerNamePrefix": "{vmss-name}",
+ "adminUsername": "{your-username}",
+ "secrets": [],
+ "windowsConfiguration": {
+ "provisionVMAgent": true,
+ "enableAutomaticUpdates": true
+ }
+ },
+ "networkProfile": {
+ "networkInterfaceConfigurations": [
+ {
+ "name": "{vmss-name}",
+ "properties": {
+ "dnsSettings": {
+ "dnsServers": []
+ },
+ "primary": true,
+ "enableIPForwarding": true,
+ "ipConfigurations": [
+ {
+ "name": "{vmss-name}",
+ "properties": {
+ "subnet": {
+ "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
+ },
+ "privateIPAddressVersion": "IPv4"
+ }
+ }
+ ],
+ "enableAcceleratedNetworking": false
+ }
+ }
+ ]
+ },
+ "priority": "Spot",
+ "evictionPolicy": "Deallocate",
+ "billingProfile": {
+ "maxPrice": -1
+ }
+ },
+ "upgradePolicy": {
+ "mode": "Manual"
+ },
+ "spotRestorePolicy": {
+ "enabled": true,
+ "restoreTimeout": "PT1H"
+ },
+ "provisioningState": "Creating"
+ },
+ "location": "westus",
+ "type": "Microsoft.Compute/virtualMachineScaleSets",
+ "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
+ }
+ }
+ }
+}