Skip to content

Commit

Permalink
Location based routing for VMSS (newest API version) (#12145)
Browse files Browse the repository at this point in the history
* add by location for VMSS

* minor changes

* add default response.

Co-authored-by: Sachin Doddaiah Shylaja <sadoddai@microsoft.com>
  • Loading branch information
sds6 and Sachin Doddaiah Shylaja authored Dec 30, 2020
1 parent 480dd7b commit a87bfd6
Show file tree
Hide file tree
Showing 2 changed files with 216 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2534,6 +2534,53 @@
}
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/virtualMachineScaleSets": {
"get": {
"tags": [
"VirtualMachineScaleSets"
],
"operationId": "VirtualMachineScaleSets_ListByLocation",
"description": "Gets all the VM scale sets under the specified subscription for the specified location.",
"parameters": [
{
"name": "location",
"in": "path",
"required": true,
"type": "string",
"description": "The location for which VM scale sets under the subscription are queried.",
"pattern": "^[-\\w\\._]+$"
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/VirtualMachineScaleSetListResult"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/CloudError"
}
}
},
"x-ms-examples": {
"Lists all the VM scale sets under the specified subscription for the specified location.": {
"$ref": "./examples/ListVirtualMachineScaleSetsInASubscriptionByLocation.json"
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/vmSizes": {
"get": {
"tags": [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
{
"parameters": {
"subscriptionId": "{subscription-id}",
"location": "eastus",
"api-version": "2020-06-01"
},
"responses": {
"200": {
"body": {
"value": [
{
"name": "{virtualMachineScaleSetName}",
"id": "/subscriptions/{subscription-id}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}",
"type": "Microsoft.Compute/virtualMachineScaleSets",
"location": "eastus",
"tags": {
"myTag1": "tagValue1"
},
"sku": {
"name": "Standard_D2s_v3",
"tier": "Standard",
"capacity": 4
},
"properties": {
"singlePlacementGroup": false,
"upgradePolicy": {
"mode": "Automatic",
"automaticOSUpgradePolicy": {
"enableAutomaticOSUpgrade": false
}
},
"virtualMachineProfile": {
"storageProfile": {
"osDisk": {
"createOption": "FromImage",
"caching": "ReadWrite",
"managedDisk": {
"storageAccountType": "Premium_LRS"
},
"diskSizeGB": 30
},
"imageReference": {
"publisher": "azuredatabricks",
"offer": "databricks",
"sku": "databricksworker",
"version": "3.15.2"
},
"dataDisks": []
},
"osProfile": {
"computerNamePrefix": "{virtualMachineScaleSetName}",
"adminUsername": "admin",
"linuxConfiguration": {
"disablePasswordAuthentication": false
}
},
"networkProfile": {
"networkInterfaceConfigurations": [
{
"name": "myNic",
"properties": {
"primary": true,
"ipConfigurations": [
{
"name": "myIPConfig",
"properties": {
"primary": true,
"subnet": {
"id": "/subscriptions/{subscription-id}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/myVNet/subnets/mySubnet"
}
}
}
],
"networkSecurityGroup": {
"id": "/subscriptions/{subscription-id}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/myNetworkSecurityGroup"
}
}
}
]
}
},
"provisioningState": "succeeded",
"overprovision": false,
"doNotRunExtensionsOnOverprovisionedVMs": false,
"platformFaultDomainCount": 1
}
},
{
"name": "{virtualMachineScaleSetName}",
"id": "/subscriptions/{subscription-id}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}1",
"type": "Microsoft.Compute/virtualMachineScaleSets",
"location": "eastus",
"tags": {
"myTag1": "tagValue2"
},
"sku": {
"name": "Standard_D2s_v3",
"tier": "Standard",
"capacity": 4
},
"properties": {
"singlePlacementGroup": false,
"upgradePolicy": {
"mode": "Automatic",
"automaticOSUpgradePolicy": {
"enableAutomaticOSUpgrade": false
}
},
"virtualMachineProfile": {
"storageProfile": {
"osDisk": {
"createOption": "FromImage",
"caching": "ReadWrite",
"managedDisk": {
"storageAccountType": "Premium_LRS"
},
"diskSizeGB": 30
},
"imageReference": {
"publisher": "azuredatabricks",
"offer": "databricks",
"sku": "databricksworker",
"version": "3.15.2"
},
"dataDisks": []
},
"osProfile": {
"computerNamePrefix": "{virtualMachineScaleSetName}",
"adminUsername": "admin",
"linuxConfiguration": {
"disablePasswordAuthentication": false
}
},
"networkProfile": {
"networkInterfaceConfigurations": [
{
"name": "myNic1",
"properties": {
"primary": true,
"ipConfigurations": [
{
"name": "myIPConfig",
"properties": {
"primary": true,
"subnet": {
"id": "/subscriptions/{subscription-id}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/myVNet/subnets/mySubnet"
}
}
}
],
"networkSecurityGroup": {
"id": "/subscriptions/{subscription-id}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/myNetworkSecurityGroup"
}
}
}
]
}
},
"provisioningState": "succeeded",
"overprovision": false,
"doNotRunExtensionsOnOverprovisionedVMs": false,
"platformFaultDomainCount": 1
}
}
]
}
}
}
}

0 comments on commit a87bfd6

Please sign in to comment.