Virtual Machines - List Available Sizes
Lists all available virtual machine sizes to which the specified virtual machine can be resized.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/vmSizes?api-version=2024-07-01
Name | In | Required | Type | Description |
---|---|---|---|---|
resource
|
path | True |
string |
The name of the resource group. |
subscription
|
path | True |
string |
Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. |
vm
|
path | True |
string |
The name of the virtual machine. |
api-version
|
query | True |
string |
Client Api Version. |
Name | Type | Description |
---|---|---|
200 OK |
OK |
|
Other Status Codes |
Error response describing why the operation failed. |
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Name | Description |
---|---|
user_impersonation | impersonate your user account |
Sample request
Sample response
{
"value": [
{
"name": "Standard_A1_V2",
"numberOfCores": 1,
"osDiskSizeInMB": 1047552,
"resourceDiskSizeInMB": 10240,
"memoryInMB": 2048,
"maxDataDiskCount": 2
},
{
"name": "Standard_A2_V2",
"numberOfCores": 2,
"osDiskSizeInMB": 1047552,
"resourceDiskSizeInMB": 20480,
"memoryInMB": 4096,
"maxDataDiskCount": 4
}
]
}
Name | Description |
---|---|
Api |
Api error. |
Api |
Api error base. |
Cloud |
An error response from the Compute service. |
Inner |
Inner error details. |
Virtual |
The list of virtual machine sizes. |
Virtual |
The List Virtual Machine operation response. |
Api error.
Name | Type | Description |
---|---|---|
code |
string |
The error code. |
details |
The Api error details |
|
innererror |
The Api inner error |
|
message |
string |
The error message. |
target |
string |
The target of the particular error. |
Api error base.
Name | Type | Description |
---|---|---|
code |
string |
The error code. |
message |
string |
The error message. |
target |
string |
The target of the particular error. |
An error response from the Compute service.
Name | Type | Description |
---|---|---|
error |
Api error. |
Inner error details.
Name | Type | Description |
---|---|---|
errordetail |
string |
The internal error message or exception dump. |
exceptiontype |
string |
The exception type. |
The list of virtual machine sizes.
Name | Type | Description |
---|---|---|
maxDataDiskCount |
integer |
The maximum number of data disks that can be attached to the virtual machine size. |
memoryInMB |
integer |
The amount of memory, in MB, supported by the virtual machine size. |
name |
string |
The name of the virtual machine size. |
numberOfCores |
integer |
The number of cores supported by the virtual machine size. For Constrained vCPU capable VM sizes, this number represents the total vCPUs of quota that the VM uses. For accurate vCPU count, please refer to https://docs.microsoft.com/azure/virtual-machines/constrained-vcpu or https://docs.microsoft.com/rest/api/compute/resourceskus/list |
osDiskSizeInMB |
integer |
The OS disk size, in MB, allowed by the virtual machine size. |
resourceDiskSizeInMB |
integer |
The resource disk size, in MB, allowed by the virtual machine size. |
The List Virtual Machine operation response.
Name | Type | Description |
---|---|---|
value |
The list of virtual machine sizes. |