Compartilhar via


Virtual Machine Sizes - List

This API is deprecated. Use Resources Skus

GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/vmSizes?api-version=2024-07-01

URI Parameters

Name In Required Type Description
location
path True

string

The location upon which virtual-machine-sizes is queried.

Regex pattern: ^[-\w\._]+$

subscriptionId
path True

string

Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.

api-version
query True

string

Client Api Version.

Responses

Name Type Description
200 OK

VirtualMachineSizeListResult

OK

Other Status Codes

CloudError

Error response describing why the operation failed.

Security

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

VirtualMachineSizes_List_MaximumSet_Gen
VirtualMachineSizes_List_MinimumSet_Gen

VirtualMachineSizes_List_MaximumSet_Gen

Sample request

GET https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.Compute/locations/-e/vmSizes?api-version=2024-07-01

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
    }
  ]
}

VirtualMachineSizes_List_MinimumSet_Gen

Sample request

GET https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.Compute/locations/._../vmSizes?api-version=2024-07-01

Sample response

{}

Definitions

Name Description
ApiError

Api error.

ApiErrorBase

Api error base.

CloudError

An error response from the Compute service.

InnerError

Inner error details.

VirtualMachineSize

Describes the properties of a VM size.

VirtualMachineSizeListResult

The List Virtual Machine operation response.

ApiError

Api error.

Name Type Description
code

string

The error code.

details

ApiErrorBase[]

The Api error details

innererror

InnerError

The Api inner error

message

string

The error message.

target

string

The target of the particular error.

ApiErrorBase

Api error base.

Name Type Description
code

string

The error code.

message

string

The error message.

target

string

The target of the particular error.

CloudError

An error response from the Compute service.

Name Type Description
error

ApiError

Api error.

InnerError

Inner error details.

Name Type Description
errordetail

string

The internal error message or exception dump.

exceptiontype

string

The exception type.

VirtualMachineSize

Describes the properties of a VM size.

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.

VirtualMachineSizeListResult

The List Virtual Machine operation response.

Name Type Description
value

VirtualMachineSize[]

The list of virtual machine sizes.