From c53a579332bf0239ccd9a152bd37e2e96ac63362 Mon Sep 17 00:00:00 2001 From: robhat Date: Mon, 14 Oct 2019 18:58:29 -0700 Subject: [PATCH 1/3] Swagger changes for IOPS, Bulk InstanceView, documentation for GETVM and InstanceView --- .../stable/2019-07-01/compute.json | 44 ++++++- .../examples/GetVirtualMachine.json | 121 ++++++++++++++++++ .../GetVirtualMachineInstanceView.json | 91 +++++++++++++ 3 files changed, 253 insertions(+), 3 deletions(-) create mode 100644 specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/GetVirtualMachine.json create mode 100644 specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/GetVirtualMachineInstanceView.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 a8eb59a0600d..3800503b833d 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 @@ -2528,8 +2528,12 @@ "$ref": "#/definitions/VirtualMachine" } } + }, + "x-ms-examples": { + "Get a Virtual Machine.": { + "$ref": "./examples/GetVirtualMachine.json" + } } - } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/instanceView": { "get": { @@ -2567,7 +2571,12 @@ "$ref": "#/definitions/VirtualMachineInstanceView" } } - } + }, + "x-ms-examples": { + "Get Virtual Machine Instance View.": { + "$ref": "./examples/GetVirtualMachineInstanceView.json" + } + } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/convertToManagedDisks": { @@ -2734,6 +2743,13 @@ }, { "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "name": "statusOnly", + "in": "query", + "required": false, + "type": "string", + "description": "statusOnly=true enables fetching run time status of all Virtual Machines in the subscription." } ], "responses": { @@ -7092,7 +7108,19 @@ "toBeDetached": { "type": "boolean", "description": "Specifies whether the data disk is in process of detachment from the VirtualMachine/VirtualMachineScaleset" - } + }, + "diskIOPSReadWrite": { + "type": "integer", + "readOnly": true, + "format": "int64", + "description": "Specifies the Read-Write IOPS for the managed disk when StorageAccountType is UltraSSD_LRS. Returned only for VirtualMachine ScaleSet VM disks. Can be updated only via updates to the VirtualMachine Scale Set." + }, + "diskMBpsReadWrite": { + "type": "integer", + "readOnly": true, + "format": "int64", + "description": "Specifies the bandwidth in MB per second for the managed disk when StorageAccountType is UltraSSD_LRS. Returned only for VirtualMachine ScaleSet VM disks. Can be updated only via updates to the VirtualMachine Scale Set." + } }, "required": [ "lun", @@ -8383,6 +8411,16 @@ "managedDisk": { "description": "The managed disk parameters.", "$ref": "#/definitions/VirtualMachineScaleSetManagedDiskParameters" + }, + "diskIOPSReadWrite": { + "type": "integer", + "format": "int64", + "description": "Specifies the Read-Write IOPS for the managed disk. Should be used only when StorageAccountType is UltraSSD_LRS. If not specified, a default value would be assigned based on diskSizeGB." + }, + "diskMBpsReadWrite": { + "type": "integer", + "format": "int64", + "description": "Specifies the bandwidth in MB per second for the managed disk. Should be used only when StorageAccountType is UltraSSD_LRS. If not specified, a default value would be assigned based on diskSizeGB." } }, "required": [ diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/GetVirtualMachine.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/GetVirtualMachine.json new file mode 100644 index 000000000000..3569ea91db59 --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/GetVirtualMachine.json @@ -0,0 +1,121 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "api-version": "2019-07-01", + "vmName": "myVM", + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "id" : "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "type" : "Microsoft.Compute/virtualMachines", + "location": "West US", + "tags" : { + "myTag1" : "tagValue1" + }, + "properties": { + "vmId" : "0f47b100-583c-48e3-a4c0-aefc2c9bbcc1", + "availabilitySet" : { + "id" : "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/availabilitySets/my-AvailabilitySet" + }, + "proximityPlacementGroup" : { + "id" : "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/proximityPlacementGroups/my-ppg01" + }, + "hardwareProfile" : { + "vmSize" : "Standard_DS3_V2" + }, + "storageProfile" : { + "imageReference" : { + "publisher" : "MicrosoftWindowsServer", + "offer" : "WindowsServer", + "sku" : "2016-Datacenter", + "version" : "latest", + "exactVersion" : "14393.3274.1910061629" + }, + "osDisk" : { + "osType": "Windows", + "name": "myOsDisk", + "createOption": "FromImage", + "caching": "ReadWrite", + "managedDisk": { + "storageAccountType": "Premium_LRS", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myOsDisk" + }, + "diskSizeGB": 30 + } + "dataDisks" : [ + { + "lun": 0, + "name": "myDataDisk0", + "createOption": "Empty", + "caching": "ReadWrite", + "managedDisk": { + "storageAccountType": "Premium_LRS", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDataDisk0" + }, + "diskSizeGB": 30 + }, + { + "lun": 1, + "name": "myDataDisk1", + "createOption": "Attach", + "caching": "ReadWrite", + "managedDisk": { + "storageAccountType": "Premium_LRS", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDataDisk1" + }, + "diskSizeGB": 100 + } + ] + }, + "osProfile" : { + "computerName" : "myVM", + "adminUsername" : "admin", + "windowsConfiguration" : { + "provisionVMAgent" : true, + "enableAutomaticUpdates" : false + }, + "secrets" : [ + ] + }, + "networkProfile" : { + "networkInterfaces" : [{ + "id" : "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{myNIC}" + } + ] + }, + "diagnosticsProfile" : { + "bootDiagnostics" : { + "enabled" : true, + "storageUri" : "http://{myStorageAccount}.blob.core.windows.net" + } + }, + "provisioningState" : "Succeeded" + }, + "resources" : [{ + "name" : "CustomScriptExtension-DSC", + "id" : "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/extensions/CustomScriptExtension-DSC", + "type" : "Microsoft.Compute/virtualMachines/extensions", + "location" : "west us", + "tags" : { + "displayName" : "CustomScriptExtension-DSC" + }, + "properties" : { + "autoUpgradeMinorVersion" : true, + "provisioningState" : "Succeeded", + "publisher" : "Microsoft.Compute", + "type" : "CustomScriptExtension", + "typeHandlerVersion" : "1.9", + "settings" : { + } + } + }] + } + } + } +} + + + diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/GetVirtualMachineInstanceView.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/GetVirtualMachineInstanceView.json new file mode 100644 index 000000000000..a74155c8c166 --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/GetVirtualMachineInstanceView.json @@ -0,0 +1,91 @@ +{ + "parameters" : { + "subscriptionId" : "{subscription-id}", + "resourceGroupName" : "myResourceGroup", + "api-version" : "2019-07-01", + "vmName" : "myVM", + }, + "responses" : { + "200" : { + "body" : { + "platformUpdateDomain" : 1, + "platformFaultDomain" : 1, + "computerName" : "myVM", + "osName" : "Windows Server 2016 Datacenter", + "osVersion" : "Microsoft Windows NT 10.0.14393.0", + "vmAgent" : { + "vmAgentVersion" : "2.7.41491.949", + "statuses" : [{ + "code" : "ProvisioningState/succeeded", + "level" : "Info", + "displayStatus" : "Ready", + "message" : "GuestAgent is running and accepting new configurations.", + "time" : "2019-10-14T23:11:22+00:00" + } + ], + "extensionHandlers" : [{ + "type" : "Microsoft.Azure.Security.IaaSAntimalware", + "typeHandlerVersion" : "1.5.5.9", + "status" : { + "code" : "ProvisioningState/succeeded", + "level" : "Info", + "displayStatus" : "Ready" + } + }, + ] + }, + "disks" : [ + { + "name" : "myOsDisk", + "statuses" : [{ + "code" : "ProvisioningState/succeeded", + "level" : "Info", + "displayStatus" : "Provisioning succeeded", + "time" : "2019-10-14T21:29:47.477089+00:00" + } + ] + }, + { + "name" : "myDataDisk0", + "statuses" : [{ + "code" : "ProvisioningState/succeeded", + "level" : "Info", + "displayStatus" : "Provisioning succeeded", + "time" : "2019-10-14T21:29:47.461517+00:00" + } + ] + }, + ], + "bootDiagnostics" : { + "consoleScreenshotBlobUri" : "https://{myStorageAccount}.blob.core.windows.net/bootdiagnostics-myOsDisk/myOsDisk.screenshot.bmp", + "serialConsoleLogBlobUri" : "https://{myStorageAccount}.blob.core.windows.net/bootdiagnostics-myOsDisk/myOsDisk.serialconsole.log" + }, + "extensions" : [{ + "name" : "IaaSAntiMalware-dev-bgp02", + "type" : "Microsoft.Azure.Security.IaaSAntimalware", + "typeHandlerVersion" : "1.5.5.9", + "statuses" : [{ + "code" : "ProvisioningState/succeeded", + "level" : "Info", + "displayStatus" : "Provisioning succeeded", + "message" : "Microsoft Antimalware enabled" + } + ] + } + ], + "hyperVGeneration" : "V1", + "statuses" : [{ + "code" : "ProvisioningState/succeeded", + "level" : "Info", + "displayStatus" : "Provisioning succeeded", + "time" : "2019-10-14T21:30:12.8051917+00:00" + }, { + "code" : "PowerState/running", + "level" : "Info", + "displayStatus" : "VM running" + } + ] + } + } + } +} \ No newline at end of file From 809411b6307800822981689fb9470e806c5cf391 Mon Sep 17 00:00:00 2001 From: robhat Date: Mon, 14 Oct 2019 19:08:30 -0700 Subject: [PATCH 2/3] Fixed typos --- .../stable/2019-07-01/examples/GetVirtualMachine.json | 4 ++-- .../examples/GetVirtualMachineInstanceView.json | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/GetVirtualMachine.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/GetVirtualMachine.json index 3569ea91db59..33388b5fdbc5 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/GetVirtualMachine.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/GetVirtualMachine.json @@ -3,7 +3,7 @@ "subscriptionId": "{subscription-id}", "resourceGroupName": "myResourceGroup", "api-version": "2019-07-01", - "vmName": "myVM", + "vmName": "myVM" }, "responses": { "200": { @@ -44,7 +44,7 @@ "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myOsDisk" }, "diskSizeGB": 30 - } + }, "dataDisks" : [ { "lun": 0, diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/GetVirtualMachineInstanceView.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/GetVirtualMachineInstanceView.json index a74155c8c166..fff895e335e0 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/GetVirtualMachineInstanceView.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/GetVirtualMachineInstanceView.json @@ -3,7 +3,7 @@ "subscriptionId" : "{subscription-id}", "resourceGroupName" : "myResourceGroup", "api-version" : "2019-07-01", - "vmName" : "myVM", + "vmName" : "myVM" }, "responses" : { "200" : { @@ -31,7 +31,7 @@ "level" : "Info", "displayStatus" : "Ready" } - }, + } ] }, "disks" : [ @@ -54,14 +54,14 @@ "time" : "2019-10-14T21:29:47.461517+00:00" } ] - }, + } ], "bootDiagnostics" : { "consoleScreenshotBlobUri" : "https://{myStorageAccount}.blob.core.windows.net/bootdiagnostics-myOsDisk/myOsDisk.screenshot.bmp", "serialConsoleLogBlobUri" : "https://{myStorageAccount}.blob.core.windows.net/bootdiagnostics-myOsDisk/myOsDisk.serialconsole.log" }, "extensions" : [{ - "name" : "IaaSAntiMalware-dev-bgp02", + "name" : "IaaSAntiMalware-ext0", "type" : "Microsoft.Azure.Security.IaaSAntimalware", "typeHandlerVersion" : "1.5.5.9", "statuses" : [{ From 93c923b2a9d23319008d48f69b001b87e6d972da Mon Sep 17 00:00:00 2001 From: robhat Date: Tue, 15 Oct 2019 08:14:59 -0700 Subject: [PATCH 3/3] Updated samples --- .../Microsoft.Compute/stable/2019-07-01/compute.json | 5 +++-- .../stable/2019-07-01/examples/GetVirtualMachine.json | 11 +++++------ 2 files changed, 8 insertions(+), 8 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 3800503b833d..1bc34a39326d 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 @@ -2529,11 +2529,12 @@ } } }, - "x-ms-examples": { + "x-ms-examples": { "Get a Virtual Machine.": { "$ref": "./examples/GetVirtualMachine.json" } } + } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/instanceView": { "get": { @@ -2572,7 +2573,7 @@ } } }, - "x-ms-examples": { + "x-ms-examples": { "Get Virtual Machine Instance View.": { "$ref": "./examples/GetVirtualMachineInstanceView.json" } diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/GetVirtualMachine.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/GetVirtualMachine.json index 33388b5fdbc5..434d91c22485 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/GetVirtualMachine.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/GetVirtualMachine.json @@ -1,9 +1,9 @@ { "parameters": { "subscriptionId": "{subscription-id}", - "resourceGroupName": "myResourceGroup", - "api-version": "2019-07-01", - "vmName": "myVM" + "resourceGroupName": "myResourceGroup", + "vmName": "myVM", + "api-version": "2019-07-01" }, "responses": { "200": { @@ -24,15 +24,14 @@ "id" : "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/proximityPlacementGroups/my-ppg01" }, "hardwareProfile" : { - "vmSize" : "Standard_DS3_V2" + "vmSize" : "Standard_DS3_v2" }, "storageProfile" : { "imageReference" : { "publisher" : "MicrosoftWindowsServer", "offer" : "WindowsServer", "sku" : "2016-Datacenter", - "version" : "latest", - "exactVersion" : "14393.3274.1910061629" + "version" : "latest" }, "osDisk" : { "osType": "Windows",