From 89bb404e430b977158a034f57c73ab19392ae06c Mon Sep 17 00:00:00 2001 From: TJ Egbejimba Date: Mon, 25 Jan 2021 16:07:59 -0800 Subject: [PATCH 1/2] add vmss capabilities to force delete --- .../Microsoft.Resources/stable/2020-06-01/resources.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2020-06-01/resources.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2020-06-01/resources.json index 70ba10cb0720..a11b15e7e43d 100644 --- a/specification/resources/resource-manager/Microsoft.Resources/stable/2020-06-01/resources.json +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2020-06-01/resources.json @@ -2496,7 +2496,7 @@ "in": "query", "required": false, "type": "string", - "description": "The resource types you want to force delete. Currently, only the following is supported: forceDeletionResourceTypes=Microsoft.Compute/virtualMachines" + "description": "The resource types you want to force delete. Currently, only the following is supported: forceDeletionResourceTypes=Microsoft.Compute/virtualMachines,Microsoft.Compute/virtualMachineScaleSets" }, { "$ref": "#/parameters/ApiVersionParameter" From e77a2ea5b334cef730bc924914fc28ca4e475278 Mon Sep 17 00:00:00 2001 From: TJ Egbejimba Date: Thu, 28 Jan 2021 16:38:44 -0800 Subject: [PATCH 2/2] Add example for VM and VMSS force deletion --- .../ForceDeleteVMsAndVMSSInResourceGroup.json | 16 ++++++++++++++++ .../stable/2020-06-01/resources.json | 3 +++ 2 files changed, 19 insertions(+) create mode 100644 specification/resources/resource-manager/Microsoft.Resources/stable/2020-06-01/examples/ForceDeleteVMsAndVMSSInResourceGroup.json diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2020-06-01/examples/ForceDeleteVMsAndVMSSInResourceGroup.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2020-06-01/examples/ForceDeleteVMsAndVMSSInResourceGroup.json new file mode 100644 index 000000000000..593f902a362f --- /dev/null +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2020-06-01/examples/ForceDeleteVMsAndVMSSInResourceGroup.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "my-resource-group", + "forceDeletionResourceTypes": "Microsoft.Compute/virtualMachines,Microsoft.Compute/virtualMachineScaleSets", + "api-version": "2020-06-01" + }, + "responses": { + "202": { + "description": "Accepted" + }, + "200": { + "description": "OK" + } + } +} diff --git a/specification/resources/resource-manager/Microsoft.Resources/stable/2020-06-01/resources.json b/specification/resources/resource-manager/Microsoft.Resources/stable/2020-06-01/resources.json index a11b15e7e43d..9a5a19d43daf 100644 --- a/specification/resources/resource-manager/Microsoft.Resources/stable/2020-06-01/resources.json +++ b/specification/resources/resource-manager/Microsoft.Resources/stable/2020-06-01/resources.json @@ -2508,6 +2508,9 @@ "x-ms-examples": { "Force delete all the Virtual Machines in a resource group": { "$ref": "./examples/ForceDeleteVMsInResourceGroup.json" + }, + "Force delete all the Virtual Machines and Virtual Machine Scale Sets in a resource group": { + "$ref": "./examples/ForceDeleteVMsAndVMSSInResourceGroup.json" } }, "responses": {