|
| 1 | +{ |
| 2 | + "parameters": { |
| 3 | + "subscriptionId": "{subscription-id}", |
| 4 | + "resourceGroupName": "myResourceGroup", |
| 5 | + "vmName": "myVM", |
| 6 | + "api-version": "2022-03-01", |
| 7 | + "parameters": { |
| 8 | + "location": "westus", |
| 9 | + "properties": { |
| 10 | + "hardwareProfile": { |
| 11 | + "vmSize": "Standard_D2s_v3" |
| 12 | + }, |
| 13 | + "storageProfile": { |
| 14 | + "imageReference": { |
| 15 | + "sku": "16.04-LTS", |
| 16 | + "publisher": "Canonical", |
| 17 | + "version": "latest", |
| 18 | + "offer": "UbuntuServer" |
| 19 | + }, |
| 20 | + "osDisk": { |
| 21 | + "caching": "ReadWrite", |
| 22 | + "managedDisk": { |
| 23 | + "storageAccountType": "Premium_LRS" |
| 24 | + }, |
| 25 | + "name": "myVMosdisk", |
| 26 | + "createOption": "FromImage" |
| 27 | + } |
| 28 | + }, |
| 29 | + "osProfile": { |
| 30 | + "adminUsername": "{your-username}", |
| 31 | + "computerName": "myVM", |
| 32 | + "adminPassword": "{your-password}", |
| 33 | + "linuxConfiguration": { |
| 34 | + "provisionVMAgent": true, |
| 35 | + "patchSettings": { |
| 36 | + "patchMode": "AutomaticByPlatform", |
| 37 | + "assessmentMode": "AutomaticByPlatform", |
| 38 | + "automaticByPlatformSettings": { |
| 39 | + "rebootSetting": "Never" |
| 40 | + } |
| 41 | + } |
| 42 | + } |
| 43 | + }, |
| 44 | + "networkProfile": { |
| 45 | + "networkInterfaces": [ |
| 46 | + { |
| 47 | + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", |
| 48 | + "properties": { |
| 49 | + "primary": true |
| 50 | + } |
| 51 | + } |
| 52 | + ] |
| 53 | + } |
| 54 | + } |
| 55 | + } |
| 56 | + }, |
| 57 | + "responses": { |
| 58 | + "200": { |
| 59 | + "body": { |
| 60 | + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", |
| 61 | + "type": "Microsoft.Compute/virtualMachines", |
| 62 | + "properties": { |
| 63 | + "osProfile": { |
| 64 | + "adminUsername": "{your-username}", |
| 65 | + "secrets": [], |
| 66 | + "computerName": "myVM", |
| 67 | + "linuxConfiguration": { |
| 68 | + "provisionVMAgent": true, |
| 69 | + "patchSettings": { |
| 70 | + "patchMode": "AutomaticByPlatform", |
| 71 | + "assessmentMode": "AutomaticByPlatform", |
| 72 | + "automaticByPlatformSettings": { |
| 73 | + "rebootSetting": "Never" |
| 74 | + } |
| 75 | + } |
| 76 | + } |
| 77 | + }, |
| 78 | + "networkProfile": { |
| 79 | + "networkInterfaces": [ |
| 80 | + { |
| 81 | + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", |
| 82 | + "properties": { |
| 83 | + "primary": true |
| 84 | + } |
| 85 | + } |
| 86 | + ] |
| 87 | + }, |
| 88 | + "storageProfile": { |
| 89 | + "imageReference": { |
| 90 | + "sku": "16.04-LTS", |
| 91 | + "publisher": "Canonical", |
| 92 | + "version": "latest", |
| 93 | + "offer": "UbuntuServer" |
| 94 | + }, |
| 95 | + "osDisk": { |
| 96 | + "osType": "Linux", |
| 97 | + "caching": "ReadWrite", |
| 98 | + "createOption": "FromImage", |
| 99 | + "name": "myVMosdisk", |
| 100 | + "managedDisk": { |
| 101 | + "storageAccountType": "Premium_LRS" |
| 102 | + } |
| 103 | + }, |
| 104 | + "dataDisks": [] |
| 105 | + }, |
| 106 | + "vmId": "a149cd25-409f-41af-8088-275f5486bc93", |
| 107 | + "hardwareProfile": { |
| 108 | + "vmSize": "Standard_D2s_v3" |
| 109 | + }, |
| 110 | + "provisioningState": "Creating" |
| 111 | + }, |
| 112 | + "name": "myVM", |
| 113 | + "location": "westus" |
| 114 | + } |
| 115 | + }, |
| 116 | + "201": { |
| 117 | + "body": { |
| 118 | + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", |
| 119 | + "type": "Microsoft.Compute/virtualMachines", |
| 120 | + "properties": { |
| 121 | + "osProfile": { |
| 122 | + "adminUsername": "{your-username}", |
| 123 | + "secrets": [], |
| 124 | + "computerName": "myVM", |
| 125 | + "linuxConfiguration": { |
| 126 | + "provisionVMAgent": true, |
| 127 | + "patchSettings": { |
| 128 | + "patchMode": "AutomaticByPlatform", |
| 129 | + "assessmentMode": "AutomaticByPlatform", |
| 130 | + "automaticByPlatformSettings": { |
| 131 | + "rebootSetting": "Never" |
| 132 | + } |
| 133 | + } |
| 134 | + } |
| 135 | + }, |
| 136 | + "networkProfile": { |
| 137 | + "networkInterfaces": [ |
| 138 | + { |
| 139 | + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", |
| 140 | + "properties": { |
| 141 | + "primary": true |
| 142 | + } |
| 143 | + } |
| 144 | + ] |
| 145 | + }, |
| 146 | + "storageProfile": { |
| 147 | + "imageReference": { |
| 148 | + "sku": "16.04-LTS", |
| 149 | + "publisher": "Canonical", |
| 150 | + "version": "latest", |
| 151 | + "offer": "UbuntuServer" |
| 152 | + }, |
| 153 | + "osDisk": { |
| 154 | + "osType": "Linux", |
| 155 | + "caching": "ReadWrite", |
| 156 | + "createOption": "FromImage", |
| 157 | + "name": "myVMosdisk", |
| 158 | + "managedDisk": { |
| 159 | + "storageAccountType": "Premium_LRS" |
| 160 | + } |
| 161 | + }, |
| 162 | + "dataDisks": [] |
| 163 | + }, |
| 164 | + "vmId": "a149cd25-409f-41af-8088-275f5486bc93", |
| 165 | + "hardwareProfile": { |
| 166 | + "vmSize": "Standard_D2s_v3" |
| 167 | + }, |
| 168 | + "provisioningState": "Creating" |
| 169 | + }, |
| 170 | + "name": "myVM", |
| 171 | + "location": "westus" |
| 172 | + } |
| 173 | + } |
| 174 | + } |
| 175 | +} |
0 commit comments