From 0af110038a33398fda2f6e96c538b0301a2d804d Mon Sep 17 00:00:00 2001 From: Sridhar Varma Date: Thu, 2 Apr 2020 15:44:14 -0700 Subject: [PATCH 1/3] =?UTF-8?q?Updates=20Compute.Json=20to=20improve=20Doc?= =?UTF-8?q?umentation=20around=20PerformMaintenan=E2=80=A6=20and=20Convert?= =?UTF-8?q?ToManagedDisks=20APIs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updates Compute.Json to improve Documentation around PerformMaintenan… and ConvertToManagedDisks APIs --- .../Microsoft.Compute/stable/2019-07-01/compute.json | 11 ++++++++--- .../2019-07-01/examples/ConvertToManagedDisks.json | 11 +++++++++++ .../Microsoft.Compute/stable/2019-12-01/compute.json | 11 ++++++++--- .../2019-12-01/examples/ConvertToManagedDisks.json | 11 +++++++++++ 4 files changed, 38 insertions(+), 6 deletions(-) create mode 100644 specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/ConvertToManagedDisks.json create mode 100644 specification/compute/resource-manager/Microsoft.Compute/stable/2019-12-01/examples/ConvertToManagedDisks.json diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/compute.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/compute.json index 658fcc12c0c0..4aa7aa4865d8 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/compute.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/compute.json @@ -2597,7 +2597,7 @@ "VirtualMachines" ], "operationId": "VirtualMachines_ConvertToManagedDisks", - "description": "Converts virtual machine disks from blob-based to managed disks. Virtual machine must be stop-deallocated before invoking this operation.", + "description": "Converts virtual machine disks from blob-based to managed disks. Virtual machine must be stop-deallocated before invoking this operation.
For Windows, please refer to [Convert a virtual machine from unmanaged disks to managed disks.](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/convert-unmanaged-to-managed-disks).
For Linux, please refer to [Convert a virtual machine from unmanaged disks to managed disks.](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/convert-unmanaged-to-managed-disks).", "parameters": [ { "name": "resourceGroupName", @@ -2628,6 +2628,11 @@ "description": "Accepted" } }, + "x-ms-examples": { + "Generalize a Virtual Machine.": { + "$ref": "./examples/ConvertToManagedDisks.json" + } + }, "x-ms-long-running-operation": true } }, @@ -3108,7 +3113,7 @@ "VirtualMachines" ], "operationId": "VirtualMachines_PerformMaintenance", - "description": "The operation to perform maintenance on a virtual machine.", + "description": "Shuts down the virtual machine, moves it to a already updated node, and powers it back on during the self-service phase of planned maintenance.", "parameters": [ { "name": "resourceGroupName", @@ -5552,7 +5557,7 @@ "VirtualMachineScaleSetVMs" ], "operationId": "VirtualMachineScaleSetVMs_PerformMaintenance", - "description": "Performs maintenance on a virtual machine in a VM scale set.", + "description": "Shuts down the virtual machine in a VMScaleSet, moves it to a already updated node, and powers it back on during the self-service phase of planned maintenance.", "parameters": [ { "name": "resourceGroupName", diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/ConvertToManagedDisks.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/ConvertToManagedDisks.json new file mode 100644 index 000000000000..8078bc757ed1 --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/ConvertToManagedDisks.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "api-version": "2019-07-01", + "vmName": "myVMName" + }, + "responses": { + "200": {} + } +} diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-12-01/compute.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-12-01/compute.json index 95abf0f6e66c..8d88dde4d7ec 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-12-01/compute.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-12-01/compute.json @@ -2894,7 +2894,7 @@ "VirtualMachines" ], "operationId": "VirtualMachines_ConvertToManagedDisks", - "description": "Converts virtual machine disks from blob-based to managed disks. Virtual machine must be stop-deallocated before invoking this operation.", + "description": "Converts virtual machine disks from blob-based to managed disks. Virtual machine must be stop-deallocated before invoking this operation.
For Windows, please refer to [Convert a virtual machine from unmanaged disks to managed disks.](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/convert-unmanaged-to-managed-disks).
For Linux, please refer to [Convert a virtual machine from unmanaged disks to managed disks.](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/convert-unmanaged-to-managed-disks).", "parameters": [ { "name": "resourceGroupName", @@ -2925,6 +2925,11 @@ "description": "Accepted" } }, + "x-ms-examples": { + "Generalize a Virtual Machine.": { + "$ref": "./examples/ConvertToManagedDisks.json" + } + }, "x-ms-long-running-operation": true } }, @@ -3405,7 +3410,7 @@ "VirtualMachines" ], "operationId": "VirtualMachines_PerformMaintenance", - "description": "The operation to perform maintenance on a virtual machine.", + "description": "Shuts down the virtual machine, moves it to a already updated node, and powers it back on during the self-service phase of planned maintenance.", "parameters": [ { "name": "resourceGroupName", @@ -5901,7 +5906,7 @@ "VirtualMachineScaleSetVMs" ], "operationId": "VirtualMachineScaleSetVMs_PerformMaintenance", - "description": "Performs maintenance on a virtual machine in a VM scale set.", + "description": "Shuts down the virtual machine in a VMScaleSet, moves it to a already updated node, and powers it back on during the self-service phase of planned maintenance.", "parameters": [ { "name": "resourceGroupName", diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-12-01/examples/ConvertToManagedDisks.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-12-01/examples/ConvertToManagedDisks.json new file mode 100644 index 000000000000..8078bc757ed1 --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-12-01/examples/ConvertToManagedDisks.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "api-version": "2019-07-01", + "vmName": "myVMName" + }, + "responses": { + "200": {} + } +} From b8364b82483707bc38978666ede904ef7bf9441c Mon Sep 17 00:00:00 2001 From: Sridhar Varma Date: Thu, 2 Apr 2020 16:07:21 -0700 Subject: [PATCH 2/3] Adds 202 httpstatus code to ConvertToManagedDisks.json Adds 202 httpstatus code to ConvertToManagedDisks.json --- .../stable/2019-07-01/examples/ConvertToManagedDisks.json | 3 ++- .../stable/2019-12-01/examples/ConvertToManagedDisks.json | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/ConvertToManagedDisks.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/ConvertToManagedDisks.json index 8078bc757ed1..1fbfea58c94c 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/ConvertToManagedDisks.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/ConvertToManagedDisks.json @@ -6,6 +6,7 @@ "vmName": "myVMName" }, "responses": { - "200": {} + "200": {}, + "202": {} } } diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-12-01/examples/ConvertToManagedDisks.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-12-01/examples/ConvertToManagedDisks.json index 8078bc757ed1..39ec366b8d4d 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-12-01/examples/ConvertToManagedDisks.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-12-01/examples/ConvertToManagedDisks.json @@ -2,10 +2,11 @@ "parameters": { "subscriptionId": "{subscription-id}", "resourceGroupName": "myResourceGroup", - "api-version": "2019-07-01", + "api-version": "2019-12-01", "vmName": "myVMName" }, "responses": { - "200": {} + "200": {}, + "202": {} } } From 1f91f50eff5790375e54f20ff15fbb3d3640be73 Mon Sep 17 00:00:00 2001 From: Feng Zhou <55177366+fengzhou-msft@users.noreply.github.com> Date: Mon, 26 Oct 2020 16:13:17 +0800 Subject: [PATCH 3/3] Apply suggestions from code review --- .../Microsoft.Compute/stable/2019-07-01/compute.json | 4 ++-- .../Microsoft.Compute/stable/2019-12-01/compute.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/compute.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/compute.json index 4aa7aa4865d8..03add8757e93 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/compute.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/compute.json @@ -3113,7 +3113,7 @@ "VirtualMachines" ], "operationId": "VirtualMachines_PerformMaintenance", - "description": "Shuts down the virtual machine, moves it to a already updated node, and powers it back on during the self-service phase of planned maintenance.", + "description": "Shuts down the virtual machine, moves it to an already updated node, and powers it back on during the self-service phase of planned maintenance.", "parameters": [ { "name": "resourceGroupName", @@ -5557,7 +5557,7 @@ "VirtualMachineScaleSetVMs" ], "operationId": "VirtualMachineScaleSetVMs_PerformMaintenance", - "description": "Shuts down the virtual machine in a VMScaleSet, moves it to a already updated node, and powers it back on during the self-service phase of planned maintenance.", + "description": "Shuts down the virtual machine in a VMScaleSet, moves it to an already updated node, and powers it back on during the self-service phase of planned maintenance.", "parameters": [ { "name": "resourceGroupName", diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-12-01/compute.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-12-01/compute.json index 8d88dde4d7ec..d19818361f50 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-12-01/compute.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-12-01/compute.json @@ -3410,7 +3410,7 @@ "VirtualMachines" ], "operationId": "VirtualMachines_PerformMaintenance", - "description": "Shuts down the virtual machine, moves it to a already updated node, and powers it back on during the self-service phase of planned maintenance.", + "description": "Shuts down the virtual machine, moves it to an already updated node, and powers it back on during the self-service phase of planned maintenance.", "parameters": [ { "name": "resourceGroupName", @@ -5906,7 +5906,7 @@ "VirtualMachineScaleSetVMs" ], "operationId": "VirtualMachineScaleSetVMs_PerformMaintenance", - "description": "Shuts down the virtual machine in a VMScaleSet, moves it to a already updated node, and powers it back on during the self-service phase of planned maintenance.", + "description": "Shuts down the virtual machine in a VMScaleSet, moves it to an already updated node, and powers it back on during the self-service phase of planned maintenance.", "parameters": [ { "name": "resourceGroupName",