Virtual Machines - List Available Sizes

Listor alla tillgängliga storlekar på virtuella datorer som den angivna virtuella datorn kan ändras till.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/vmSizes?api-version=2024-03-01

URI-parametrar

Name I Obligatorisk Typ Description
resourceGroupName
path True

string

Namnet på resursgruppen.

subscriptionId
path True

string

Autentiseringsuppgifter för prenumeration som unikt identifierar Microsoft Azure-prenumeration. Prenumerations-ID:t utgör en del av URI:n för varje tjänstanrop.

vmName
path True

string

Namnet på den virtuella datorn.

api-version
query True

string

Klient-API-version.

Svar

Name Typ Description
200 OK

VirtualMachineSizeListResult

OK

Other Status Codes

CloudError

Felsvar som beskriver varför åtgärden misslyckades.

Säkerhet

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 personifiera ditt användarkonto

Exempel

Lists all available virtual machine sizes to which the specified virtual machine can be resized

Sample Request

GET https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVmName/vmSizes?api-version=2024-03-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
    }
  ]
}

Definitioner

Name Description
ApiError

API-fel.

ApiErrorBase

Api-felbas.

CloudError

Ett felsvar från Beräkningstjänsten.

InnerError

Inre felinformation.

VirtualMachineSize

Listan över storlekar på virtuella datorer.

VirtualMachineSizeListResult

Åtgärdssvaret Lista virtuell dator.

ApiError

API-fel.

Name Typ Description
code

string

Felkoden.

details

ApiErrorBase[]

Api-felinformationen

innererror

InnerError

Api:ets inre fel

message

string

Felmeddelandet.

target

string

Målet för det specifika felet.

ApiErrorBase

Api-felbas.

Name Typ Description
code

string

Felkoden.

message

string

Felmeddelandet.

target

string

Målet för det specifika felet.

CloudError

Ett felsvar från Beräkningstjänsten.

Name Typ Description
error

ApiError

API-fel.

InnerError

Inre felinformation.

Name Typ Description
errordetail

string

Det interna felmeddelandet eller undantagsdumpen.

exceptiontype

string

Undantagstypen.

VirtualMachineSize

Listan över storlekar på virtuella datorer.

Name Typ Description
maxDataDiskCount

integer

Det maximala antalet datadiskar som kan kopplas till den virtuella datorns storlek.

memoryInMB

integer

Mängden minne i MB som stöds av storleken på den virtuella datorn.

name

string

Namnet på den virtuella datorns storlek.

numberOfCores

integer

Antalet kärnor som stöds av storleken på den virtuella datorn. För begränsade vCPU-kompatibla VM-storlekar representerar det här talet det totala antalet vCPU:er för kvoten som den virtuella datorn använder. För korrekt vCPU-antal, se https://docs.microsoft.com/azure/virtual-machines/constrained-vcpu eller https://docs.microsoft.com/rest/api/compute/resourceskus/list

osDiskSizeInMB

integer

Operativsystemets diskstorlek i MB tillåts av storleken på den virtuella datorn.

resourceDiskSizeInMB

integer

Resursdiskens storlek, i MB, tillåts av storleken på den virtuella datorn.

VirtualMachineSizeListResult

Åtgärdssvaret Lista virtuell dator.

Name Typ Description
value

VirtualMachineSize[]

Listan över storlekar på virtuella datorer.