VirtualMachines class

Class representing a VirtualMachines.

Constructors

VirtualMachines(client)

Create a VirtualMachines.

new VirtualMachines(client)
Parameters
client
undefinedComputeManagementClient

Reference to the service client.

Methods

beginCapture(resourceGroupName, vmName, parameters, options, optionalCallback)

Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar VMs.

function beginCapture(resourceGroupName, vmName, parameters, options, optionalCallback)
Parameters
resourceGroupName
string

The name of the resource group.

vmName
string

The name of the virtual machine.

parameters
object

Parameters supplied to the Capture Virtual Machine operation.

NameRequiredTypeDescription
vhdPrefix true string

The captured virtual hard disk's name prefix.

destinationContainerName true string

The destination container name.

overwriteVhds true boolean

Specifies whether to overwrite the destination virtual hard disk, in case of conflict.

options
object

Optional Parameters.

required: false
NameRequiredTypeDescription
customHeaders object

Headers that will be added to the request

optionalCallback
function

The optional callback.

required: false
NameRequiredTypeDescription
err true ErrorThe Error object if an error occurred, null otherwise.
result objectThe deserialized result object if an error did not occur. See VirtualMachineCaptureResult for more information.
request objectThe HTTP Request object if an error did not occur.
response streamThe HTTP Response stream if an error did not occur.
Returns
Promise<VirtualMachineCaptureResult>

If a callback was passed as the last parameter then it returns the callback else returns a Promise.

beginCaptureWithHttpOperationResponse(resourceGroupName, vmName, parameters, options)

Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar VMs.

function beginCaptureWithHttpOperationResponse(resourceGroupName, vmName, parameters, options)
Parameters
resourceGroupName
string

The name of the resource group.

vmName
string

The name of the virtual machine.

parameters
object

Parameters supplied to the Capture Virtual Machine operation.

NameRequiredTypeDescription
vhdPrefix true string

The captured virtual hard disk's name prefix.

destinationContainerName true string

The destination container name.

overwriteVhds true boolean

Specifies whether to overwrite the destination virtual hard disk, in case of conflict.

options
object

Optional Parameters.

required: false
NameRequiredTypeDescription
customHeaders object

Headers that will be added to the request

Returns
Promise<HttpOperationResponse>

A promise is returned

beginConvertToManagedDisks(resourceGroupName, vmName, options, optionalCallback)

Converts virtual machine disks from blob-based to managed disks. Virtual machine must be stop-deallocated before invoking this operation.

function beginConvertToManagedDisks(resourceGroupName, vmName, options, optionalCallback)
Parameters
resourceGroupName
string

The name of the resource group.

vmName
string

The name of the virtual machine.

options
object

Optional Parameters.

required: false
NameRequiredTypeDescription
customHeaders object

Headers that will be added to the request

optionalCallback
function

The optional callback.

required: false
NameRequiredTypeDescription
err true ErrorThe Error object if an error occurred, null otherwise.
result objectThe deserialized result object if an error did not occur. See OperationStatusResponse for more information.
request objectThe HTTP Request object if an error did not occur.
response streamThe HTTP Response stream if an error did not occur.
Returns
Promise<OperationStatusResponse>

If a callback was passed as the last parameter then it returns the callback else returns a Promise.

beginConvertToManagedDisksWithHttpOperationResponse(resourceGroupName, vmName, options)

Converts virtual machine disks from blob-based to managed disks. Virtual machine must be stop-deallocated before invoking this operation.

function beginConvertToManagedDisksWithHttpOperationResponse(resourceGroupName, vmName, options)
Parameters
resourceGroupName
string

The name of the resource group.

vmName
string

The name of the virtual machine.

options
object

Optional Parameters.

required: false
NameRequiredTypeDescription
customHeaders object

Headers that will be added to the request

Returns
Promise<HttpOperationResponse>

A promise is returned

beginCreateOrUpdate(resourceGroupName, vmName, parameters, options, optionalCallback)

The operation to create or update a virtual machine.

function beginCreateOrUpdate(resourceGroupName, vmName, parameters, options, optionalCallback)
Parameters
resourceGroupName
string

The name of the resource group.

vmName
string

The name of the virtual machine.

parameters
object

Parameters supplied to the Create Virtual Machine operation.

NameRequiredTypeDescription
plan object

Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click Want to deploy programmatically, Get Started ->. Enter any required information and then click Save.

hardwareProfile object

Specifies the hardware settings for the virtual machine.

storageProfile object

Specifies the storage settings for the virtual machine disks.

osProfile object

Specifies the operating system settings for the virtual machine.

networkProfile object

Specifies the network interfaces of the virtual machine.

diagnosticsProfile object

Specifies the boot diagnostic settings state.

Minimum api-version: 2015-06-15.

availabilitySet object

Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see Manage the availability of virtual machines.

For more information on Azure planned maintainance, see Planned maintenance for virtual machines in Azure

Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set.

licenseType string

Specifies that the image or disk that is being used was licensed on-premises. This element is only used for images that contain the Windows Server operating system.

Possible values are:

Windows_Client

Windows_Server

If this element is included in a request for an update, the value must match the initial value. This value cannot be updated.

For more information, see Azure Hybrid Use Benefit for Windows Server

Minimum api-version: 2015-06-15

identity object

The identity of the virtual machine, if configured.

zones array

The virtual machine zones.

location true string

Resource location

tags object

Resource tags

plan
object

Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click Want to deploy programmatically, Get Started ->. Enter any required information and then click Save.

NameRequiredTypeDescription
name string

The plan ID.

publisher string

The publisher ID.

product string

Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element.

promotionCode string

The promotion code.

hardwareProfile
object

Specifies the hardware settings for the virtual machine.

NameRequiredTypeDescription
vmSize string

Specifies the size of the virtual machine. For more information about virtual machine sizes, see Sizes for virtual machines.

The available VM sizes depend on region and availability set. For a list of available sizes use these APIs:

List all available virtual machine sizes in an availability set

List all available virtual machine sizes in a region

List all available virtual machine sizes for resizing. Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2_v2', 'Standard_A4_v2', 'Standard_A8_v2', 'Standard_A2m_v2', 'Standard_A4m_v2', 'Standard_A8m_v2', 'Standard_B1s', 'Standard_B1ms', 'Standard_B2s', 'Standard_B2ms', 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D2', 'Standard_D3', 'Standard_D4', 'Standard_D11', 'Standard_D12', 'Standard_D13', 'Standard_D14', 'Standard_D1_v2', 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', 'Standard_D2_v3', 'Standard_D4_v3', 'Standard_D8_v3', 'Standard_D16_v3', 'Standard_D32_v3', 'Standard_D64_v3', 'Standard_D2s_v3', 'Standard_D4s_v3', 'Standard_D8s_v3', 'Standard_D16s_v3', 'Standard_D32s_v3', 'Standard_D64s_v3', 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', 'Standard_D14_v2', 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', 'Standard_DS13', 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', 'Standard_DS3_v2', 'Standard_DS4_v2', 'Standard_DS5_v2', 'Standard_DS11_v2', 'Standard_DS12_v2', 'Standard_DS13_v2', 'Standard_DS14_v2', 'Standard_DS15_v2', 'Standard_DS13-4_v2', 'Standard_DS13-2_v2', 'Standard_DS14-8_v2', 'Standard_DS14-4_v2', 'Standard_E2_v3', 'Standard_E4_v3', 'Standard_E8_v3', 'Standard_E16_v3', 'Standard_E32_v3', 'Standard_E64_v3', 'Standard_E2s_v3', 'Standard_E4s_v3', 'Standard_E8s_v3', 'Standard_E16s_v3', 'Standard_E32s_v3', 'Standard_E64s_v3', 'Standard_E32-16_v3', 'Standard_E32-8s_v3', 'Standard_E64-32s_v3', 'Standard_E64-16s_v3', 'Standard_F1', 'Standard_F2', 'Standard_F4', 'Standard_F8', 'Standard_F16', 'Standard_F1s', 'Standard_F2s', 'Standard_F4s', 'Standard_F8s', 'Standard_F16s', 'Standard_F2s_v2', 'Standard_F4s_v2', 'Standard_F8s_v2', 'Standard_F16s_v2', 'Standard_F32s_v2', 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5', 'Standard_GS4-8', 'Standard_GS4-4', 'Standard_GS5-16', 'Standard_GS5-8', 'Standard_H8', 'Standard_H16', 'Standard_H8m', 'Standard_H16m', 'Standard_H16r', 'Standard_H16mr', 'Standard_L4s', 'Standard_L8s', 'Standard_L16s', 'Standard_L32s', 'Standard_M64s', 'Standard_M64ms', 'Standard_M128s', 'Standard_M128ms', 'Standard_M64-32ms', 'Standard_M64-16ms', 'Standard_M128-64ms', 'Standard_M128-32ms', 'Standard_NC6', 'Standard_NC12', 'Standard_NC24', 'Standard_NC24r', 'Standard_NC6s_v2', 'Standard_NC12s_v2', 'Standard_NC24s_v2', 'Standard_NC24rs_v2', 'Standard_NC6s_v3', 'Standard_NC12s_v3', 'Standard_NC24s_v3', 'Standard_NC24rs_v3', 'Standard_ND6s', 'Standard_ND12s', 'Standard_ND24s', 'Standard_ND24rs', 'Standard_NV6', 'Standard_NV12', 'Standard_NV24'

storageProfile
object

Specifies the storage settings for the virtual machine disks.

NameRequiredTypeDescription
imageReference object

Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations.

osDisk object

Specifies information about the operating system disk used by the virtual machine.

For more information about disks, see About disks and VHDs for Azure virtual machines.

dataDisks array

Specifies the parameters that are used to add a data disk to a virtual machine.

For more information about disks, see About disks and VHDs for Azure virtual machines.

imageReference
object

Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations.

NameRequiredTypeDescription
publisher string

The image publisher.

offer string

Specifies the offer of the platform image or marketplace image used to create the virtual machine.

sku string

The image SKU.

version string

Specifies the version of the platform image or marketplace image used to create the virtual machine. The allowed formats are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal numbers. Specify 'latest' to use the latest version of an image available at deploy time. Even if you use 'latest', the VM image will not automatically update after deploy time even if a new version becomes available.

id string

Resource Id

osDisk
object

Specifies information about the operating system disk used by the virtual machine.

For more information about disks, see About disks and VHDs for Azure virtual machines.

NameRequiredTypeDescription
osType string

This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD.

Possible values are:

Windows

Linux. Possible values include: 'Windows', 'Linux'

encryptionSettings object

Specifies the encryption settings for the OS Disk.

Minimum api-version: 2015-06-15

name string

The disk name.

vhd object

The virtual hard disk.

image object

The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist.

caching string

Specifies the caching requirements.

Possible values are:

None

ReadOnly

ReadWrite

Default: None for Standard storage. ReadOnly for Premium storage. Possible values include: 'None', 'ReadOnly', 'ReadWrite'

writeAcceleratorEnabled boolean

Specifies whether writeAccelerator should be enabled or disabled on the disk.

createOption true string

Specifies how the virtual machine should be created.

Possible values are:

Attach \u2013 This value is used when you are using a specialized disk to create the virtual machine.

FromImage \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Possible values include: 'FromImage', 'Empty', 'Attach'

diskSizeGB number

Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image.

This value cannot be larger than 1023 GB

managedDisk object

The managed disk parameters.

encryptionSettings
object

Specifies the encryption settings for the OS Disk.

Minimum api-version: 2015-06-15

NameRequiredTypeDescription
diskEncryptionKey object

Specifies the location of the disk encryption key, which is a Key Vault Secret.

keyEncryptionKey object

Specifies the location of the key encryption key in Key Vault.

enabled boolean

Specifies whether disk encryption should be enabled on the virtual machine.

diskEncryptionKey
object

Specifies the location of the disk encryption key, which is a Key Vault Secret.

NameRequiredTypeDescription
secretUrl true string

The URL referencing a secret in a Key Vault.

sourceVault true object

The relative URL of the Key Vault containing the secret.

keyEncryptionKey
object

Specifies the location of the key encryption key in Key Vault.

NameRequiredTypeDescription
keyUrl true string

The URL referencing a key encryption key in Key Vault.

sourceVault true object

The relative URL of the Key Vault containing the key.

image
object

The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist.

NameRequiredTypeDescription
uri string

Specifies the virtual hard disk's uri.

managedDisk
object

The managed disk parameters.

NameRequiredTypeDescription
storageAccountType string

Specifies the storage account type for the managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS'

id string

Resource Id

osProfile
object

Specifies the operating system settings for the virtual machine.

NameRequiredTypeDescription
computerName string

Specifies the host OS name of the virtual machine.

Max-length (Windows): 15 characters

Max-length (Linux): 64 characters.

For naming conventions and restrictions see Azure infrastructure services implementation guidelines.

adminUsername string

Specifies the name of the administrator account.

Windows-only restriction: Cannot end in "."

Disallowed values: "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5".

Minimum-length (Linux): 1 character

Max-length (Linux): 64 characters

Max-length (Windows): 20 characters

  • For root access to the Linux VM, see Using root privileges on Linux virtual machines in Azure
  • For a list of built-in system users on Linux that should not be used in this field, see Selecting User Names for Linux on Azure

  • adminPassword string

    Specifies the password of the administrator account.

    Minimum-length (Windows): 8 characters

    Minimum-length (Linux): 6 characters

    Max-length (Windows): 123 characters

    Max-length (Linux): 72 characters

    Complexity requirements: 3 out of 4 conditions below need to be fulfilled
    Has lower characters
    Has upper characters
    Has a digit
    Has a special character (Regex match [\W_])

    Disallowed values: "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!"

    For resetting the password, see How to reset the Remote Desktop service or its login password in a Windows VM

    For resetting root password, see Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension

    customData string

    Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes.

    For using cloud-init for your VM, see Using cloud-init to customize a Linux VM during creation

    windowsConfiguration object

    Specifies Windows operating system settings on the virtual machine.

    linuxConfiguration object

    Specifies the Linux operating system settings on the virtual machine.

    For a list of supported Linux distributions, see Linux on Azure-Endorsed Distributions

    For running non-endorsed distributions, see Information for Non-Endorsed Distributions.

    secrets array

    Specifies set of certificates that should be installed onto the virtual machine.

    windowsConfiguration
    object

    Specifies Windows operating system settings on the virtual machine.

    NameRequiredTypeDescription
    provisionVMAgent boolean

    Indicates whether virtual machine agent should be provisioned on the virtual machine.

    When this property is not specified in the request body, default behavior is to set it to true. This will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later.

    enableAutomaticUpdates boolean

    Indicates whether virtual machine is enabled for automatic updates.

    timeZone string

    Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time"

    additionalUnattendContent array

    Specifies additional base-64 encoded XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup.

    winRM object

    Specifies the Windows Remote Management listeners. This enables remote Windows PowerShell.

    winRM
    object

    Specifies the Windows Remote Management listeners. This enables remote Windows PowerShell.

    NameRequiredTypeDescription
    listeners array

    The list of Windows Remote Management listeners

    linuxConfiguration
    object

    Specifies the Linux operating system settings on the virtual machine.

    For a list of supported Linux distributions, see Linux on Azure-Endorsed Distributions

    For running non-endorsed distributions, see Information for Non-Endorsed Distributions.

    NameRequiredTypeDescription
    disablePasswordAuthentication boolean

    Specifies whether password authentication should be disabled.

    ssh object

    Specifies the ssh key configuration for a Linux OS.

    ssh
    object

    Specifies the ssh key configuration for a Linux OS.

    NameRequiredTypeDescription
    publicKeys array

    The list of SSH public keys used to authenticate with linux based VMs.

    networkProfile
    object

    Specifies the network interfaces of the virtual machine.

    NameRequiredTypeDescription
    networkInterfaces array

    Specifies the list of resource Ids for the network interfaces associated with the virtual machine.

    diagnosticsProfile
    object

    Specifies the boot diagnostic settings state.

    Minimum api-version: 2015-06-15.

    NameRequiredTypeDescription
    bootDiagnostics object

    Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.

    For Linux Virtual Machines, you can easily view the output of your console log.

    For both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from the hypervisor.

    bootDiagnostics
    object

    Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.

    For Linux Virtual Machines, you can easily view the output of your console log.

    For both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from the hypervisor.

    NameRequiredTypeDescription
    enabled boolean

    Whether boot diagnostics should be enabled on the Virtual Machine.

    storageUri string

    Uri of the storage account to use for placing the console output and screenshot.

    availabilitySet
    object

    Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see Manage the availability of virtual machines.

    For more information on Azure planned maintainance, see Planned maintenance for virtual machines in Azure

    Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set.

    NameRequiredTypeDescription
    id string

    Resource Id

    identity
    object

    The identity of the virtual machine, if configured.

    NameRequiredTypeDescription
    type string

    The type of identity used for the virtual machine. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the virtual machine. Possible values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None'

    identityIds array

    The list of user identities associated with the Virtual Machine. The user identity references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'.

    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    customHeaders object

    Headers that will be added to the request

    optionalCallback
    function

    The optional callback.

    required: false
    NameRequiredTypeDescription
    err true ErrorThe Error object if an error occurred, null otherwise.
    result objectThe deserialized result object if an error did not occur. See VirtualMachine for more information.
    request objectThe HTTP Request object if an error did not occur.
    response streamThe HTTP Response stream if an error did not occur.
    Returns
    Promise<VirtualMachine>

    If a callback was passed as the last parameter then it returns the callback else returns a Promise.

    beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName, vmName, parameters, options)

    The operation to create or update a virtual machine.

    function beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName, vmName, parameters, options)
    Parameters
    resourceGroupName
    string

    The name of the resource group.

    vmName
    string

    The name of the virtual machine.

    parameters
    object

    Parameters supplied to the Create Virtual Machine operation.

    NameRequiredTypeDescription
    plan object

    Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click Want to deploy programmatically, Get Started ->. Enter any required information and then click Save.

    hardwareProfile object

    Specifies the hardware settings for the virtual machine.

    storageProfile object

    Specifies the storage settings for the virtual machine disks.

    osProfile object

    Specifies the operating system settings for the virtual machine.

    networkProfile object

    Specifies the network interfaces of the virtual machine.

    diagnosticsProfile object

    Specifies the boot diagnostic settings state.

    Minimum api-version: 2015-06-15.

    availabilitySet object

    Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see Manage the availability of virtual machines.

    For more information on Azure planned maintainance, see Planned maintenance for virtual machines in Azure

    Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set.

    licenseType string

    Specifies that the image or disk that is being used was licensed on-premises. This element is only used for images that contain the Windows Server operating system.

    Possible values are:

    Windows_Client

    Windows_Server

    If this element is included in a request for an update, the value must match the initial value. This value cannot be updated.

    For more information, see Azure Hybrid Use Benefit for Windows Server

    Minimum api-version: 2015-06-15

    identity object

    The identity of the virtual machine, if configured.

    zones array

    The virtual machine zones.

    location true string

    Resource location

    tags object

    Resource tags

    plan
    object

    Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click Want to deploy programmatically, Get Started ->. Enter any required information and then click Save.

    NameRequiredTypeDescription
    name string

    The plan ID.

    publisher string

    The publisher ID.

    product string

    Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element.

    promotionCode string

    The promotion code.

    hardwareProfile
    object

    Specifies the hardware settings for the virtual machine.

    NameRequiredTypeDescription
    vmSize string

    Specifies the size of the virtual machine. For more information about virtual machine sizes, see Sizes for virtual machines.

    The available VM sizes depend on region and availability set. For a list of available sizes use these APIs:

    List all available virtual machine sizes in an availability set

    List all available virtual machine sizes in a region

    List all available virtual machine sizes for resizing. Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2_v2', 'Standard_A4_v2', 'Standard_A8_v2', 'Standard_A2m_v2', 'Standard_A4m_v2', 'Standard_A8m_v2', 'Standard_B1s', 'Standard_B1ms', 'Standard_B2s', 'Standard_B2ms', 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D2', 'Standard_D3', 'Standard_D4', 'Standard_D11', 'Standard_D12', 'Standard_D13', 'Standard_D14', 'Standard_D1_v2', 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', 'Standard_D2_v3', 'Standard_D4_v3', 'Standard_D8_v3', 'Standard_D16_v3', 'Standard_D32_v3', 'Standard_D64_v3', 'Standard_D2s_v3', 'Standard_D4s_v3', 'Standard_D8s_v3', 'Standard_D16s_v3', 'Standard_D32s_v3', 'Standard_D64s_v3', 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', 'Standard_D14_v2', 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', 'Standard_DS13', 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', 'Standard_DS3_v2', 'Standard_DS4_v2', 'Standard_DS5_v2', 'Standard_DS11_v2', 'Standard_DS12_v2', 'Standard_DS13_v2', 'Standard_DS14_v2', 'Standard_DS15_v2', 'Standard_DS13-4_v2', 'Standard_DS13-2_v2', 'Standard_DS14-8_v2', 'Standard_DS14-4_v2', 'Standard_E2_v3', 'Standard_E4_v3', 'Standard_E8_v3', 'Standard_E16_v3', 'Standard_E32_v3', 'Standard_E64_v3', 'Standard_E2s_v3', 'Standard_E4s_v3', 'Standard_E8s_v3', 'Standard_E16s_v3', 'Standard_E32s_v3', 'Standard_E64s_v3', 'Standard_E32-16_v3', 'Standard_E32-8s_v3', 'Standard_E64-32s_v3', 'Standard_E64-16s_v3', 'Standard_F1', 'Standard_F2', 'Standard_F4', 'Standard_F8', 'Standard_F16', 'Standard_F1s', 'Standard_F2s', 'Standard_F4s', 'Standard_F8s', 'Standard_F16s', 'Standard_F2s_v2', 'Standard_F4s_v2', 'Standard_F8s_v2', 'Standard_F16s_v2', 'Standard_F32s_v2', 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5', 'Standard_GS4-8', 'Standard_GS4-4', 'Standard_GS5-16', 'Standard_GS5-8', 'Standard_H8', 'Standard_H16', 'Standard_H8m', 'Standard_H16m', 'Standard_H16r', 'Standard_H16mr', 'Standard_L4s', 'Standard_L8s', 'Standard_L16s', 'Standard_L32s', 'Standard_M64s', 'Standard_M64ms', 'Standard_M128s', 'Standard_M128ms', 'Standard_M64-32ms', 'Standard_M64-16ms', 'Standard_M128-64ms', 'Standard_M128-32ms', 'Standard_NC6', 'Standard_NC12', 'Standard_NC24', 'Standard_NC24r', 'Standard_NC6s_v2', 'Standard_NC12s_v2', 'Standard_NC24s_v2', 'Standard_NC24rs_v2', 'Standard_NC6s_v3', 'Standard_NC12s_v3', 'Standard_NC24s_v3', 'Standard_NC24rs_v3', 'Standard_ND6s', 'Standard_ND12s', 'Standard_ND24s', 'Standard_ND24rs', 'Standard_NV6', 'Standard_NV12', 'Standard_NV24'

    storageProfile
    object

    Specifies the storage settings for the virtual machine disks.

    NameRequiredTypeDescription
    imageReference object

    Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations.

    osDisk object

    Specifies information about the operating system disk used by the virtual machine.

    For more information about disks, see About disks and VHDs for Azure virtual machines.

    dataDisks array

    Specifies the parameters that are used to add a data disk to a virtual machine.

    For more information about disks, see About disks and VHDs for Azure virtual machines.

    imageReference
    object

    Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations.

    NameRequiredTypeDescription
    publisher string

    The image publisher.

    offer string

    Specifies the offer of the platform image or marketplace image used to create the virtual machine.

    sku string

    The image SKU.

    version string

    Specifies the version of the platform image or marketplace image used to create the virtual machine. The allowed formats are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal numbers. Specify 'latest' to use the latest version of an image available at deploy time. Even if you use 'latest', the VM image will not automatically update after deploy time even if a new version becomes available.

    id string

    Resource Id

    osDisk
    object

    Specifies information about the operating system disk used by the virtual machine.

    For more information about disks, see About disks and VHDs for Azure virtual machines.

    NameRequiredTypeDescription
    osType string

    This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD.

    Possible values are:

    Windows

    Linux. Possible values include: 'Windows', 'Linux'

    encryptionSettings object

    Specifies the encryption settings for the OS Disk.

    Minimum api-version: 2015-06-15

    name string

    The disk name.

    vhd object

    The virtual hard disk.

    image object

    The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist.

    caching string

    Specifies the caching requirements.

    Possible values are:

    None

    ReadOnly

    ReadWrite

    Default: None for Standard storage. ReadOnly for Premium storage. Possible values include: 'None', 'ReadOnly', 'ReadWrite'

    writeAcceleratorEnabled boolean

    Specifies whether writeAccelerator should be enabled or disabled on the disk.

    createOption true string

    Specifies how the virtual machine should be created.

    Possible values are:

    Attach \u2013 This value is used when you are using a specialized disk to create the virtual machine.

    FromImage \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Possible values include: 'FromImage', 'Empty', 'Attach'

    diskSizeGB number

    Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image.

    This value cannot be larger than 1023 GB

    managedDisk object

    The managed disk parameters.

    encryptionSettings
    object

    Specifies the encryption settings for the OS Disk.

    Minimum api-version: 2015-06-15

    NameRequiredTypeDescription
    diskEncryptionKey object

    Specifies the location of the disk encryption key, which is a Key Vault Secret.

    keyEncryptionKey object

    Specifies the location of the key encryption key in Key Vault.

    enabled boolean

    Specifies whether disk encryption should be enabled on the virtual machine.

    diskEncryptionKey
    object

    Specifies the location of the disk encryption key, which is a Key Vault Secret.

    NameRequiredTypeDescription
    secretUrl true string

    The URL referencing a secret in a Key Vault.

    sourceVault true object

    The relative URL of the Key Vault containing the secret.

    keyEncryptionKey
    object

    Specifies the location of the key encryption key in Key Vault.

    NameRequiredTypeDescription
    keyUrl true string

    The URL referencing a key encryption key in Key Vault.

    sourceVault true object

    The relative URL of the Key Vault containing the key.

    image
    object

    The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist.

    NameRequiredTypeDescription
    uri string

    Specifies the virtual hard disk's uri.

    managedDisk
    object

    The managed disk parameters.

    NameRequiredTypeDescription
    storageAccountType string

    Specifies the storage account type for the managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS'

    id string

    Resource Id

    osProfile
    object

    Specifies the operating system settings for the virtual machine.

    NameRequiredTypeDescription
    computerName string

    Specifies the host OS name of the virtual machine.

    Max-length (Windows): 15 characters

    Max-length (Linux): 64 characters.

    For naming conventions and restrictions see Azure infrastructure services implementation guidelines.

    adminUsername string

    Specifies the name of the administrator account.

    Windows-only restriction: Cannot end in "."

    Disallowed values: "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5".

    Minimum-length (Linux): 1 character

    Max-length (Linux): 64 characters

    Max-length (Windows): 20 characters

  • For root access to the Linux VM, see Using root privileges on Linux virtual machines in Azure
  • For a list of built-in system users on Linux that should not be used in this field, see Selecting User Names for Linux on Azure

  • adminPassword string

    Specifies the password of the administrator account.

    Minimum-length (Windows): 8 characters

    Minimum-length (Linux): 6 characters

    Max-length (Windows): 123 characters

    Max-length (Linux): 72 characters

    Complexity requirements: 3 out of 4 conditions below need to be fulfilled
    Has lower characters
    Has upper characters
    Has a digit
    Has a special character (Regex match [\W_])

    Disallowed values: "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!"

    For resetting the password, see How to reset the Remote Desktop service or its login password in a Windows VM

    For resetting root password, see Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension

    customData string

    Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes.

    For using cloud-init for your VM, see Using cloud-init to customize a Linux VM during creation

    windowsConfiguration object

    Specifies Windows operating system settings on the virtual machine.

    linuxConfiguration object

    Specifies the Linux operating system settings on the virtual machine.

    For a list of supported Linux distributions, see Linux on Azure-Endorsed Distributions

    For running non-endorsed distributions, see Information for Non-Endorsed Distributions.

    secrets array

    Specifies set of certificates that should be installed onto the virtual machine.

    windowsConfiguration
    object

    Specifies Windows operating system settings on the virtual machine.

    NameRequiredTypeDescription
    provisionVMAgent boolean

    Indicates whether virtual machine agent should be provisioned on the virtual machine.

    When this property is not specified in the request body, default behavior is to set it to true. This will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later.

    enableAutomaticUpdates boolean

    Indicates whether virtual machine is enabled for automatic updates.

    timeZone string

    Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time"

    additionalUnattendContent array

    Specifies additional base-64 encoded XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup.

    winRM object

    Specifies the Windows Remote Management listeners. This enables remote Windows PowerShell.

    winRM
    object

    Specifies the Windows Remote Management listeners. This enables remote Windows PowerShell.

    NameRequiredTypeDescription
    listeners array

    The list of Windows Remote Management listeners

    linuxConfiguration
    object

    Specifies the Linux operating system settings on the virtual machine.

    For a list of supported Linux distributions, see Linux on Azure-Endorsed Distributions

    For running non-endorsed distributions, see Information for Non-Endorsed Distributions.

    NameRequiredTypeDescription
    disablePasswordAuthentication boolean

    Specifies whether password authentication should be disabled.

    ssh object

    Specifies the ssh key configuration for a Linux OS.

    ssh
    object

    Specifies the ssh key configuration for a Linux OS.

    NameRequiredTypeDescription
    publicKeys array

    The list of SSH public keys used to authenticate with linux based VMs.

    networkProfile
    object

    Specifies the network interfaces of the virtual machine.

    NameRequiredTypeDescription
    networkInterfaces array

    Specifies the list of resource Ids for the network interfaces associated with the virtual machine.

    diagnosticsProfile
    object

    Specifies the boot diagnostic settings state.

    Minimum api-version: 2015-06-15.

    NameRequiredTypeDescription
    bootDiagnostics object

    Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.

    For Linux Virtual Machines, you can easily view the output of your console log.

    For both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from the hypervisor.

    bootDiagnostics
    object

    Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.

    For Linux Virtual Machines, you can easily view the output of your console log.

    For both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from the hypervisor.

    NameRequiredTypeDescription
    enabled boolean

    Whether boot diagnostics should be enabled on the Virtual Machine.

    storageUri string

    Uri of the storage account to use for placing the console output and screenshot.

    availabilitySet
    object

    Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see Manage the availability of virtual machines.

    For more information on Azure planned maintainance, see Planned maintenance for virtual machines in Azure

    Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set.

    NameRequiredTypeDescription
    id string

    Resource Id

    identity
    object

    The identity of the virtual machine, if configured.

    NameRequiredTypeDescription
    type string

    The type of identity used for the virtual machine. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the virtual machine. Possible values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None'

    identityIds array

    The list of user identities associated with the Virtual Machine. The user identity references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'.

    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    customHeaders object

    Headers that will be added to the request

    Returns
    Promise<HttpOperationResponse>

    A promise is returned

    beginDeallocate(resourceGroupName, vmName, options, optionalCallback)

    Shuts down the virtual machine and releases the compute resources. You are not billed for the compute resources that this virtual machine uses.

    function beginDeallocate(resourceGroupName, vmName, options, optionalCallback)
    Parameters
    resourceGroupName
    string

    The name of the resource group.

    vmName
    string

    The name of the virtual machine.

    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    customHeaders object

    Headers that will be added to the request

    optionalCallback
    function

    The optional callback.

    required: false
    NameRequiredTypeDescription
    err true ErrorThe Error object if an error occurred, null otherwise.
    result objectThe deserialized result object if an error did not occur. See OperationStatusResponse for more information.
    request objectThe HTTP Request object if an error did not occur.
    response streamThe HTTP Response stream if an error did not occur.
    Returns
    Promise<OperationStatusResponse>

    If a callback was passed as the last parameter then it returns the callback else returns a Promise.

    beginDeallocateWithHttpOperationResponse(resourceGroupName, vmName, options)

    Shuts down the virtual machine and releases the compute resources. You are not billed for the compute resources that this virtual machine uses.

    function beginDeallocateWithHttpOperationResponse(resourceGroupName, vmName, options)
    Parameters
    resourceGroupName
    string

    The name of the resource group.

    vmName
    string

    The name of the virtual machine.

    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    customHeaders object

    Headers that will be added to the request

    Returns
    Promise<HttpOperationResponse>

    A promise is returned

    beginDeleteMethod(resourceGroupName, vmName, options, optionalCallback)

    The operation to delete a virtual machine.

    function beginDeleteMethod(resourceGroupName, vmName, options, optionalCallback)
    Parameters
    resourceGroupName
    string

    The name of the resource group.

    vmName
    string

    The name of the virtual machine.

    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    customHeaders object

    Headers that will be added to the request

    optionalCallback
    function

    The optional callback.

    required: false
    NameRequiredTypeDescription
    err true ErrorThe Error object if an error occurred, null otherwise.
    result objectThe deserialized result object if an error did not occur. See OperationStatusResponse for more information.
    request objectThe HTTP Request object if an error did not occur.
    response streamThe HTTP Response stream if an error did not occur.
    Returns
    Promise<OperationStatusResponse>

    If a callback was passed as the last parameter then it returns the callback else returns a Promise.

    beginDeleteMethodWithHttpOperationResponse(resourceGroupName, vmName, options)

    The operation to delete a virtual machine.

    function beginDeleteMethodWithHttpOperationResponse(resourceGroupName, vmName, options)
    Parameters
    resourceGroupName
    string

    The name of the resource group.

    vmName
    string

    The name of the virtual machine.

    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    customHeaders object

    Headers that will be added to the request

    Returns
    Promise<HttpOperationResponse>

    A promise is returned

    beginPerformMaintenance(resourceGroupName, vmName, options, optionalCallback)

    The operation to perform maintenance on a virtual machine.

    function beginPerformMaintenance(resourceGroupName, vmName, options, optionalCallback)
    Parameters
    resourceGroupName
    string

    The name of the resource group.

    vmName
    string

    The name of the virtual machine.

    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    customHeaders object

    Headers that will be added to the request

    optionalCallback
    function

    The optional callback.

    required: false
    NameRequiredTypeDescription
    err true ErrorThe Error object if an error occurred, null otherwise.
    result objectThe deserialized result object if an error did not occur. See OperationStatusResponse for more information.
    request objectThe HTTP Request object if an error did not occur.
    response streamThe HTTP Response stream if an error did not occur.
    Returns
    Promise<OperationStatusResponse>

    If a callback was passed as the last parameter then it returns the callback else returns a Promise.

    beginPerformMaintenanceWithHttpOperationResponse(resourceGroupName, vmName, options)

    The operation to perform maintenance on a virtual machine.

    function beginPerformMaintenanceWithHttpOperationResponse(resourceGroupName, vmName, options)
    Parameters
    resourceGroupName
    string

    The name of the resource group.

    vmName
    string

    The name of the virtual machine.

    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    customHeaders object

    Headers that will be added to the request

    Returns
    Promise<HttpOperationResponse>

    A promise is returned

    beginPowerOff(resourceGroupName, vmName, options, optionalCallback)

    The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine.

    function beginPowerOff(resourceGroupName, vmName, options, optionalCallback)
    Parameters
    resourceGroupName
    string

    The name of the resource group.

    vmName
    string

    The name of the virtual machine.

    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    customHeaders object

    Headers that will be added to the request

    optionalCallback
    function

    The optional callback.

    required: false
    NameRequiredTypeDescription
    err true ErrorThe Error object if an error occurred, null otherwise.
    result objectThe deserialized result object if an error did not occur. See OperationStatusResponse for more information.
    request objectThe HTTP Request object if an error did not occur.
    response streamThe HTTP Response stream if an error did not occur.
    Returns
    Promise<OperationStatusResponse>

    If a callback was passed as the last parameter then it returns the callback else returns a Promise.

    beginPowerOffWithHttpOperationResponse(resourceGroupName, vmName, options)

    The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine.

    function beginPowerOffWithHttpOperationResponse(resourceGroupName, vmName, options)
    Parameters
    resourceGroupName
    string

    The name of the resource group.

    vmName
    string

    The name of the virtual machine.

    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    customHeaders object

    Headers that will be added to the request

    Returns
    Promise<HttpOperationResponse>

    A promise is returned

    beginRedeploy(resourceGroupName, vmName, options, optionalCallback)

    The operation to redeploy a virtual machine.

    function beginRedeploy(resourceGroupName, vmName, options, optionalCallback)
    Parameters
    resourceGroupName
    string

    The name of the resource group.

    vmName
    string

    The name of the virtual machine.

    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    customHeaders object

    Headers that will be added to the request

    optionalCallback
    function

    The optional callback.

    required: false
    NameRequiredTypeDescription
    err true ErrorThe Error object if an error occurred, null otherwise.
    result objectThe deserialized result object if an error did not occur. See OperationStatusResponse for more information.
    request objectThe HTTP Request object if an error did not occur.
    response streamThe HTTP Response stream if an error did not occur.
    Returns
    Promise<OperationStatusResponse>

    If a callback was passed as the last parameter then it returns the callback else returns a Promise.

    beginRedeployWithHttpOperationResponse(resourceGroupName, vmName, options)

    The operation to redeploy a virtual machine.

    function beginRedeployWithHttpOperationResponse(resourceGroupName, vmName, options)
    Parameters
    resourceGroupName
    string

    The name of the resource group.

    vmName
    string

    The name of the virtual machine.

    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    customHeaders object

    Headers that will be added to the request

    Returns
    Promise<HttpOperationResponse>

    A promise is returned

    beginRestart(resourceGroupName, vmName, options, optionalCallback)

    The operation to restart a virtual machine.

    function beginRestart(resourceGroupName, vmName, options, optionalCallback)
    Parameters
    resourceGroupName
    string

    The name of the resource group.

    vmName
    string

    The name of the virtual machine.

    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    customHeaders object

    Headers that will be added to the request

    optionalCallback
    function

    The optional callback.

    required: false
    NameRequiredTypeDescription
    err true ErrorThe Error object if an error occurred, null otherwise.
    result objectThe deserialized result object if an error did not occur. See OperationStatusResponse for more information.
    request objectThe HTTP Request object if an error did not occur.
    response streamThe HTTP Response stream if an error did not occur.
    Returns
    Promise<OperationStatusResponse>

    If a callback was passed as the last parameter then it returns the callback else returns a Promise.

    beginRestartWithHttpOperationResponse(resourceGroupName, vmName, options)

    The operation to restart a virtual machine.

    function beginRestartWithHttpOperationResponse(resourceGroupName, vmName, options)
    Parameters
    resourceGroupName
    string

    The name of the resource group.

    vmName
    string

    The name of the virtual machine.

    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    customHeaders object

    Headers that will be added to the request

    Returns
    Promise<HttpOperationResponse>

    A promise is returned

    beginRunCommand(resourceGroupName, vmName, parameters, options, optionalCallback)

    Run command on the VM.

    function beginRunCommand(resourceGroupName, vmName, parameters, options, optionalCallback)
    Parameters
    resourceGroupName
    string

    The name of the resource group.

    vmName
    string

    The name of the virtual machine.

    parameters
    object

    Parameters supplied to the Run command operation.

    NameRequiredTypeDescription
    commandId true string

    The run command id.

    script array

    Optional. The script to be executed. When this value is given, the given script will override the default script of the command.

    parameters array

    The run command parameters.

    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    customHeaders object

    Headers that will be added to the request

    optionalCallback
    function

    The optional callback.

    required: false
    NameRequiredTypeDescription
    err true ErrorThe Error object if an error occurred, null otherwise.
    result objectThe deserialized result object if an error did not occur. See RunCommandResult for more information.
    request objectThe HTTP Request object if an error did not occur.
    response streamThe HTTP Response stream if an error did not occur.
    Returns
    Promise<RunCommandResult>

    If a callback was passed as the last parameter then it returns the callback else returns a Promise.

    beginRunCommandWithHttpOperationResponse(resourceGroupName, vmName, parameters, options)

    Run command on the VM.

    function beginRunCommandWithHttpOperationResponse(resourceGroupName, vmName, parameters, options)
    Parameters
    resourceGroupName
    string

    The name of the resource group.

    vmName
    string

    The name of the virtual machine.

    parameters
    object

    Parameters supplied to the Run command operation.

    NameRequiredTypeDescription
    commandId true string

    The run command id.

    script array

    Optional. The script to be executed. When this value is given, the given script will override the default script of the command.

    parameters array

    The run command parameters.

    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    customHeaders object

    Headers that will be added to the request

    Returns
    Promise<HttpOperationResponse>

    A promise is returned

    beginStart(resourceGroupName, vmName, options, optionalCallback)

    The operation to start a virtual machine.

    function beginStart(resourceGroupName, vmName, options, optionalCallback)
    Parameters
    resourceGroupName
    string

    The name of the resource group.

    vmName
    string

    The name of the virtual machine.

    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    customHeaders object

    Headers that will be added to the request

    optionalCallback
    function

    The optional callback.

    required: false
    NameRequiredTypeDescription
    err true ErrorThe Error object if an error occurred, null otherwise.
    result objectThe deserialized result object if an error did not occur. See OperationStatusResponse for more information.
    request objectThe HTTP Request object if an error did not occur.
    response streamThe HTTP Response stream if an error did not occur.
    Returns
    Promise<OperationStatusResponse>

    If a callback was passed as the last parameter then it returns the callback else returns a Promise.

    beginStartWithHttpOperationResponse(resourceGroupName, vmName, options)

    The operation to start a virtual machine.

    function beginStartWithHttpOperationResponse(resourceGroupName, vmName, options)
    Parameters
    resourceGroupName
    string

    The name of the resource group.

    vmName
    string

    The name of the virtual machine.

    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    customHeaders object

    Headers that will be added to the request

    Returns
    Promise<HttpOperationResponse>

    A promise is returned

    beginUpdate(resourceGroupName, vmName, parameters, options, optionalCallback)

    The operation to update a virtual machine.

    function beginUpdate(resourceGroupName, vmName, parameters, options, optionalCallback)
    Parameters
    resourceGroupName
    string

    The name of the resource group.

    vmName
    string

    The name of the virtual machine.

    parameters
    object

    Parameters supplied to the Update Virtual Machine operation.

    NameRequiredTypeDescription
    plan object

    Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click Want to deploy programmatically, Get Started ->. Enter any required information and then click Save.

    hardwareProfile object

    Specifies the hardware settings for the virtual machine.

    storageProfile object

    Specifies the storage settings for the virtual machine disks.

    osProfile object

    Specifies the operating system settings for the virtual machine.

    networkProfile object

    Specifies the network interfaces of the virtual machine.

    diagnosticsProfile object

    Specifies the boot diagnostic settings state.

    Minimum api-version: 2015-06-15.

    availabilitySet object

    Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see Manage the availability of virtual machines.

    For more information on Azure planned maintainance, see Planned maintenance for virtual machines in Azure

    Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set.

    licenseType string

    Specifies that the image or disk that is being used was licensed on-premises. This element is only used for images that contain the Windows Server operating system.

    Possible values are:

    Windows_Client

    Windows_Server

    If this element is included in a request for an update, the value must match the initial value. This value cannot be updated.

    For more information, see Azure Hybrid Use Benefit for Windows Server

    Minimum api-version: 2015-06-15

    identity object

    The identity of the virtual machine, if configured.

    zones array

    The virtual machine zones.

    tags object

    Resource tags

    plan
    object

    Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click Want to deploy programmatically, Get Started ->. Enter any required information and then click Save.

    NameRequiredTypeDescription
    name string

    The plan ID.

    publisher string

    The publisher ID.

    product string

    Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element.

    promotionCode string

    The promotion code.

    hardwareProfile
    object

    Specifies the hardware settings for the virtual machine.

    NameRequiredTypeDescription
    vmSize string

    Specifies the size of the virtual machine. For more information about virtual machine sizes, see Sizes for virtual machines.

    The available VM sizes depend on region and availability set. For a list of available sizes use these APIs:

    List all available virtual machine sizes in an availability set

    List all available virtual machine sizes in a region

    List all available virtual machine sizes for resizing. Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2_v2', 'Standard_A4_v2', 'Standard_A8_v2', 'Standard_A2m_v2', 'Standard_A4m_v2', 'Standard_A8m_v2', 'Standard_B1s', 'Standard_B1ms', 'Standard_B2s', 'Standard_B2ms', 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D2', 'Standard_D3', 'Standard_D4', 'Standard_D11', 'Standard_D12', 'Standard_D13', 'Standard_D14', 'Standard_D1_v2', 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', 'Standard_D2_v3', 'Standard_D4_v3', 'Standard_D8_v3', 'Standard_D16_v3', 'Standard_D32_v3', 'Standard_D64_v3', 'Standard_D2s_v3', 'Standard_D4s_v3', 'Standard_D8s_v3', 'Standard_D16s_v3', 'Standard_D32s_v3', 'Standard_D64s_v3', 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', 'Standard_D14_v2', 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', 'Standard_DS13', 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', 'Standard_DS3_v2', 'Standard_DS4_v2', 'Standard_DS5_v2', 'Standard_DS11_v2', 'Standard_DS12_v2', 'Standard_DS13_v2', 'Standard_DS14_v2', 'Standard_DS15_v2', 'Standard_DS13-4_v2', 'Standard_DS13-2_v2', 'Standard_DS14-8_v2', 'Standard_DS14-4_v2', 'Standard_E2_v3', 'Standard_E4_v3', 'Standard_E8_v3', 'Standard_E16_v3', 'Standard_E32_v3', 'Standard_E64_v3', 'Standard_E2s_v3', 'Standard_E4s_v3', 'Standard_E8s_v3', 'Standard_E16s_v3', 'Standard_E32s_v3', 'Standard_E64s_v3', 'Standard_E32-16_v3', 'Standard_E32-8s_v3', 'Standard_E64-32s_v3', 'Standard_E64-16s_v3', 'Standard_F1', 'Standard_F2', 'Standard_F4', 'Standard_F8', 'Standard_F16', 'Standard_F1s', 'Standard_F2s', 'Standard_F4s', 'Standard_F8s', 'Standard_F16s', 'Standard_F2s_v2', 'Standard_F4s_v2', 'Standard_F8s_v2', 'Standard_F16s_v2', 'Standard_F32s_v2', 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5', 'Standard_GS4-8', 'Standard_GS4-4', 'Standard_GS5-16', 'Standard_GS5-8', 'Standard_H8', 'Standard_H16', 'Standard_H8m', 'Standard_H16m', 'Standard_H16r', 'Standard_H16mr', 'Standard_L4s', 'Standard_L8s', 'Standard_L16s', 'Standard_L32s', 'Standard_M64s', 'Standard_M64ms', 'Standard_M128s', 'Standard_M128ms', 'Standard_M64-32ms', 'Standard_M64-16ms', 'Standard_M128-64ms', 'Standard_M128-32ms', 'Standard_NC6', 'Standard_NC12', 'Standard_NC24', 'Standard_NC24r', 'Standard_NC6s_v2', 'Standard_NC12s_v2', 'Standard_NC24s_v2', 'Standard_NC24rs_v2', 'Standard_NC6s_v3', 'Standard_NC12s_v3', 'Standard_NC24s_v3', 'Standard_NC24rs_v3', 'Standard_ND6s', 'Standard_ND12s', 'Standard_ND24s', 'Standard_ND24rs', 'Standard_NV6', 'Standard_NV12', 'Standard_NV24'

    storageProfile
    object

    Specifies the storage settings for the virtual machine disks.

    NameRequiredTypeDescription
    imageReference object

    Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations.

    osDisk object

    Specifies information about the operating system disk used by the virtual machine.

    For more information about disks, see About disks and VHDs for Azure virtual machines.

    dataDisks array

    Specifies the parameters that are used to add a data disk to a virtual machine.

    For more information about disks, see About disks and VHDs for Azure virtual machines.

    imageReference
    object

    Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations.

    NameRequiredTypeDescription
    publisher string

    The image publisher.

    offer string

    Specifies the offer of the platform image or marketplace image used to create the virtual machine.

    sku string

    The image SKU.

    version string

    Specifies the version of the platform image or marketplace image used to create the virtual machine. The allowed formats are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal numbers. Specify 'latest' to use the latest version of an image available at deploy time. Even if you use 'latest', the VM image will not automatically update after deploy time even if a new version becomes available.

    id string

    Resource Id

    osDisk
    object

    Specifies information about the operating system disk used by the virtual machine.

    For more information about disks, see About disks and VHDs for Azure virtual machines.

    NameRequiredTypeDescription
    osType string

    This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD.

    Possible values are:

    Windows

    Linux. Possible values include: 'Windows', 'Linux'

    encryptionSettings object

    Specifies the encryption settings for the OS Disk.

    Minimum api-version: 2015-06-15

    name string

    The disk name.

    vhd object

    The virtual hard disk.

    image object

    The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist.

    caching string

    Specifies the caching requirements.

    Possible values are:

    None

    ReadOnly

    ReadWrite

    Default: None for Standard storage. ReadOnly for Premium storage. Possible values include: 'None', 'ReadOnly', 'ReadWrite'

    writeAcceleratorEnabled boolean

    Specifies whether writeAccelerator should be enabled or disabled on the disk.

    createOption true string

    Specifies how the virtual machine should be created.

    Possible values are:

    Attach \u2013 This value is used when you are using a specialized disk to create the virtual machine.

    FromImage \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Possible values include: 'FromImage', 'Empty', 'Attach'

    diskSizeGB number

    Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image.

    This value cannot be larger than 1023 GB

    managedDisk object

    The managed disk parameters.

    encryptionSettings
    object

    Specifies the encryption settings for the OS Disk.

    Minimum api-version: 2015-06-15

    NameRequiredTypeDescription
    diskEncryptionKey object

    Specifies the location of the disk encryption key, which is a Key Vault Secret.

    keyEncryptionKey object

    Specifies the location of the key encryption key in Key Vault.

    enabled boolean

    Specifies whether disk encryption should be enabled on the virtual machine.

    diskEncryptionKey
    object

    Specifies the location of the disk encryption key, which is a Key Vault Secret.

    NameRequiredTypeDescription
    secretUrl true string

    The URL referencing a secret in a Key Vault.

    sourceVault true object

    The relative URL of the Key Vault containing the secret.

    keyEncryptionKey
    object

    Specifies the location of the key encryption key in Key Vault.

    NameRequiredTypeDescription
    keyUrl true string

    The URL referencing a key encryption key in Key Vault.

    sourceVault true object

    The relative URL of the Key Vault containing the key.

    image
    object

    The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist.

    NameRequiredTypeDescription
    uri string

    Specifies the virtual hard disk's uri.

    managedDisk
    object

    The managed disk parameters.

    NameRequiredTypeDescription
    storageAccountType string

    Specifies the storage account type for the managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS'

    id string

    Resource Id

    osProfile
    object

    Specifies the operating system settings for the virtual machine.

    NameRequiredTypeDescription
    computerName string

    Specifies the host OS name of the virtual machine.

    Max-length (Windows): 15 characters

    Max-length (Linux): 64 characters.

    For naming conventions and restrictions see Azure infrastructure services implementation guidelines.

    adminUsername string

    Specifies the name of the administrator account.

    Windows-only restriction: Cannot end in "."

    Disallowed values: "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5".

    Minimum-length (Linux): 1 character

    Max-length (Linux): 64 characters

    Max-length (Windows): 20 characters

  • For root access to the Linux VM, see Using root privileges on Linux virtual machines in Azure
  • For a list of built-in system users on Linux that should not be used in this field, see Selecting User Names for Linux on Azure

  • adminPassword string

    Specifies the password of the administrator account.

    Minimum-length (Windows): 8 characters

    Minimum-length (Linux): 6 characters

    Max-length (Windows): 123 characters

    Max-length (Linux): 72 characters

    Complexity requirements: 3 out of 4 conditions below need to be fulfilled
    Has lower characters
    Has upper characters
    Has a digit
    Has a special character (Regex match [\W_])

    Disallowed values: "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!"

    For resetting the password, see How to reset the Remote Desktop service or its login password in a Windows VM

    For resetting root password, see Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension

    customData string

    Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes.

    For using cloud-init for your VM, see Using cloud-init to customize a Linux VM during creation

    windowsConfiguration object

    Specifies Windows operating system settings on the virtual machine.

    linuxConfiguration object

    Specifies the Linux operating system settings on the virtual machine.

    For a list of supported Linux distributions, see Linux on Azure-Endorsed Distributions

    For running non-endorsed distributions, see Information for Non-Endorsed Distributions.

    secrets array

    Specifies set of certificates that should be installed onto the virtual machine.

    windowsConfiguration
    object

    Specifies Windows operating system settings on the virtual machine.

    NameRequiredTypeDescription
    provisionVMAgent boolean

    Indicates whether virtual machine agent should be provisioned on the virtual machine.

    When this property is not specified in the request body, default behavior is to set it to true. This will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later.

    enableAutomaticUpdates boolean

    Indicates whether virtual machine is enabled for automatic updates.

    timeZone string

    Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time"

    additionalUnattendContent array

    Specifies additional base-64 encoded XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup.

    winRM object

    Specifies the Windows Remote Management listeners. This enables remote Windows PowerShell.

    winRM
    object

    Specifies the Windows Remote Management listeners. This enables remote Windows PowerShell.

    NameRequiredTypeDescription
    listeners array

    The list of Windows Remote Management listeners

    linuxConfiguration
    object

    Specifies the Linux operating system settings on the virtual machine.

    For a list of supported Linux distributions, see Linux on Azure-Endorsed Distributions

    For running non-endorsed distributions, see Information for Non-Endorsed Distributions.

    NameRequiredTypeDescription
    disablePasswordAuthentication boolean

    Specifies whether password authentication should be disabled.

    ssh object

    Specifies the ssh key configuration for a Linux OS.

    ssh
    object

    Specifies the ssh key configuration for a Linux OS.

    NameRequiredTypeDescription
    publicKeys array

    The list of SSH public keys used to authenticate with linux based VMs.

    networkProfile
    object

    Specifies the network interfaces of the virtual machine.

    NameRequiredTypeDescription
    networkInterfaces array

    Specifies the list of resource Ids for the network interfaces associated with the virtual machine.

    diagnosticsProfile
    object

    Specifies the boot diagnostic settings state.

    Minimum api-version: 2015-06-15.

    NameRequiredTypeDescription
    bootDiagnostics object

    Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.

    For Linux Virtual Machines, you can easily view the output of your console log.

    For both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from the hypervisor.

    bootDiagnostics
    object

    Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.

    For Linux Virtual Machines, you can easily view the output of your console log.

    For both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from the hypervisor.

    NameRequiredTypeDescription
    enabled boolean

    Whether boot diagnostics should be enabled on the Virtual Machine.

    storageUri string

    Uri of the storage account to use for placing the console output and screenshot.

    availabilitySet
    object

    Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see Manage the availability of virtual machines.

    For more information on Azure planned maintainance, see Planned maintenance for virtual machines in Azure

    Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set.

    NameRequiredTypeDescription
    id string

    Resource Id

    identity
    object

    The identity of the virtual machine, if configured.

    NameRequiredTypeDescription
    type string

    The type of identity used for the virtual machine. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the virtual machine. Possible values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None'

    identityIds array

    The list of user identities associated with the Virtual Machine. The user identity references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'.

    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    customHeaders object

    Headers that will be added to the request

    optionalCallback
    function

    The optional callback.

    required: false
    NameRequiredTypeDescription
    err true ErrorThe Error object if an error occurred, null otherwise.
    result objectThe deserialized result object if an error did not occur. See VirtualMachine for more information.
    request objectThe HTTP Request object if an error did not occur.
    response streamThe HTTP Response stream if an error did not occur.
    Returns
    Promise<VirtualMachine>

    If a callback was passed as the last parameter then it returns the callback else returns a Promise.

    beginUpdateWithHttpOperationResponse(resourceGroupName, vmName, parameters, options)

    The operation to update a virtual machine.

    function beginUpdateWithHttpOperationResponse(resourceGroupName, vmName, parameters, options)
    Parameters
    resourceGroupName
    string

    The name of the resource group.

    vmName
    string

    The name of the virtual machine.

    parameters
    object

    Parameters supplied to the Update Virtual Machine operation.

    NameRequiredTypeDescription
    plan object

    Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click Want to deploy programmatically, Get Started ->. Enter any required information and then click Save.

    hardwareProfile object

    Specifies the hardware settings for the virtual machine.

    storageProfile object

    Specifies the storage settings for the virtual machine disks.

    osProfile object

    Specifies the operating system settings for the virtual machine.

    networkProfile object

    Specifies the network interfaces of the virtual machine.

    diagnosticsProfile object

    Specifies the boot diagnostic settings state.

    Minimum api-version: 2015-06-15.

    availabilitySet object

    Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see Manage the availability of virtual machines.

    For more information on Azure planned maintainance, see Planned maintenance for virtual machines in Azure

    Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set.

    licenseType string

    Specifies that the image or disk that is being used was licensed on-premises. This element is only used for images that contain the Windows Server operating system.

    Possible values are:

    Windows_Client

    Windows_Server

    If this element is included in a request for an update, the value must match the initial value. This value cannot be updated.

    For more information, see Azure Hybrid Use Benefit for Windows Server

    Minimum api-version: 2015-06-15

    identity object

    The identity of the virtual machine, if configured.

    zones array

    The virtual machine zones.

    tags object

    Resource tags

    plan
    object

    Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click Want to deploy programmatically, Get Started ->. Enter any required information and then click Save.

    NameRequiredTypeDescription
    name string

    The plan ID.

    publisher string

    The publisher ID.

    product string

    Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element.

    promotionCode string

    The promotion code.

    hardwareProfile
    object

    Specifies the hardware settings for the virtual machine.

    NameRequiredTypeDescription
    vmSize string

    Specifies the size of the virtual machine. For more information about virtual machine sizes, see Sizes for virtual machines.

    The available VM sizes depend on region and availability set. For a list of available sizes use these APIs:

    List all available virtual machine sizes in an availability set

    List all available virtual machine sizes in a region

    List all available virtual machine sizes for resizing. Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2_v2', 'Standard_A4_v2', 'Standard_A8_v2', 'Standard_A2m_v2', 'Standard_A4m_v2', 'Standard_A8m_v2', 'Standard_B1s', 'Standard_B1ms', 'Standard_B2s', 'Standard_B2ms', 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D2', 'Standard_D3', 'Standard_D4', 'Standard_D11', 'Standard_D12', 'Standard_D13', 'Standard_D14', 'Standard_D1_v2', 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', 'Standard_D2_v3', 'Standard_D4_v3', 'Standard_D8_v3', 'Standard_D16_v3', 'Standard_D32_v3', 'Standard_D64_v3', 'Standard_D2s_v3', 'Standard_D4s_v3', 'Standard_D8s_v3', 'Standard_D16s_v3', 'Standard_D32s_v3', 'Standard_D64s_v3', 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', 'Standard_D14_v2', 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', 'Standard_DS13', 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', 'Standard_DS3_v2', 'Standard_DS4_v2', 'Standard_DS5_v2', 'Standard_DS11_v2', 'Standard_DS12_v2', 'Standard_DS13_v2', 'Standard_DS14_v2', 'Standard_DS15_v2', 'Standard_DS13-4_v2', 'Standard_DS13-2_v2', 'Standard_DS14-8_v2', 'Standard_DS14-4_v2', 'Standard_E2_v3', 'Standard_E4_v3', 'Standard_E8_v3', 'Standard_E16_v3', 'Standard_E32_v3', 'Standard_E64_v3', 'Standard_E2s_v3', 'Standard_E4s_v3', 'Standard_E8s_v3', 'Standard_E16s_v3', 'Standard_E32s_v3', 'Standard_E64s_v3', 'Standard_E32-16_v3', 'Standard_E32-8s_v3', 'Standard_E64-32s_v3', 'Standard_E64-16s_v3', 'Standard_F1', 'Standard_F2', 'Standard_F4', 'Standard_F8', 'Standard_F16', 'Standard_F1s', 'Standard_F2s', 'Standard_F4s', 'Standard_F8s', 'Standard_F16s', 'Standard_F2s_v2', 'Standard_F4s_v2', 'Standard_F8s_v2', 'Standard_F16s_v2', 'Standard_F32s_v2', 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5', 'Standard_GS4-8', 'Standard_GS4-4', 'Standard_GS5-16', 'Standard_GS5-8', 'Standard_H8', 'Standard_H16', 'Standard_H8m', 'Standard_H16m', 'Standard_H16r', 'Standard_H16mr', 'Standard_L4s', 'Standard_L8s', 'Standard_L16s', 'Standard_L32s', 'Standard_M64s', 'Standard_M64ms', 'Standard_M128s', 'Standard_M128ms', 'Standard_M64-32ms', 'Standard_M64-16ms', 'Standard_M128-64ms', 'Standard_M128-32ms', 'Standard_NC6', 'Standard_NC12', 'Standard_NC24', 'Standard_NC24r', 'Standard_NC6s_v2', 'Standard_NC12s_v2', 'Standard_NC24s_v2', 'Standard_NC24rs_v2', 'Standard_NC6s_v3', 'Standard_NC12s_v3', 'Standard_NC24s_v3', 'Standard_NC24rs_v3', 'Standard_ND6s', 'Standard_ND12s', 'Standard_ND24s', 'Standard_ND24rs', 'Standard_NV6', 'Standard_NV12', 'Standard_NV24'

    storageProfile
    object

    Specifies the storage settings for the virtual machine disks.

    NameRequiredTypeDescription
    imageReference object

    Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations.

    osDisk object

    Specifies information about the operating system disk used by the virtual machine.

    For more information about disks, see About disks and VHDs for Azure virtual machines.

    dataDisks array

    Specifies the parameters that are used to add a data disk to a virtual machine.

    For more information about disks, see About disks and VHDs for Azure virtual machines.

    imageReference
    object

    Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations.

    NameRequiredTypeDescription
    publisher string

    The image publisher.

    offer string

    Specifies the offer of the platform image or marketplace image used to create the virtual machine.

    sku string

    The image SKU.

    version string

    Specifies the version of the platform image or marketplace image used to create the virtual machine. The allowed formats are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal numbers. Specify 'latest' to use the latest version of an image available at deploy time. Even if you use 'latest', the VM image will not automatically update after deploy time even if a new version becomes available.

    id string

    Resource Id

    osDisk
    object

    Specifies information about the operating system disk used by the virtual machine.

    For more information about disks, see About disks and VHDs for Azure virtual machines.

    NameRequiredTypeDescription
    osType string

    This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD.

    Possible values are:

    Windows

    Linux. Possible values include: 'Windows', 'Linux'

    encryptionSettings object

    Specifies the encryption settings for the OS Disk.

    Minimum api-version: 2015-06-15

    name string

    The disk name.

    vhd object

    The virtual hard disk.

    image object

    The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist.

    caching string

    Specifies the caching requirements.

    Possible values are:

    None

    ReadOnly

    ReadWrite

    Default: None for Standard storage. ReadOnly for Premium storage. Possible values include: 'None', 'ReadOnly', 'ReadWrite'

    writeAcceleratorEnabled boolean

    Specifies whether writeAccelerator should be enabled or disabled on the disk.

    createOption true string

    Specifies how the virtual machine should be created.

    Possible values are:

    Attach \u2013 This value is used when you are using a specialized disk to create the virtual machine.

    FromImage \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Possible values include: 'FromImage', 'Empty', 'Attach'

    diskSizeGB number

    Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image.

    This value cannot be larger than 1023 GB

    managedDisk object

    The managed disk parameters.

    encryptionSettings
    object

    Specifies the encryption settings for the OS Disk.

    Minimum api-version: 2015-06-15

    NameRequiredTypeDescription
    diskEncryptionKey object

    Specifies the location of the disk encryption key, which is a Key Vault Secret.

    keyEncryptionKey object

    Specifies the location of the key encryption key in Key Vault.

    enabled boolean

    Specifies whether disk encryption should be enabled on the virtual machine.

    diskEncryptionKey
    object

    Specifies the location of the disk encryption key, which is a Key Vault Secret.

    NameRequiredTypeDescription
    secretUrl true string

    The URL referencing a secret in a Key Vault.

    sourceVault true object

    The relative URL of the Key Vault containing the secret.

    keyEncryptionKey
    object

    Specifies the location of the key encryption key in Key Vault.

    NameRequiredTypeDescription
    keyUrl true string

    The URL referencing a key encryption key in Key Vault.

    sourceVault true object

    The relative URL of the Key Vault containing the key.

    image
    object

    The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist.

    NameRequiredTypeDescription
    uri string

    Specifies the virtual hard disk's uri.

    managedDisk
    object

    The managed disk parameters.

    NameRequiredTypeDescription
    storageAccountType string

    Specifies the storage account type for the managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS'

    id string

    Resource Id

    osProfile
    object

    Specifies the operating system settings for the virtual machine.

    NameRequiredTypeDescription
    computerName string

    Specifies the host OS name of the virtual machine.

    Max-length (Windows): 15 characters

    Max-length (Linux): 64 characters.

    For naming conventions and restrictions see Azure infrastructure services implementation guidelines.

    adminUsername string

    Specifies the name of the administrator account.

    Windows-only restriction: Cannot end in "."

    Disallowed values: "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5".

    Minimum-length (Linux): 1 character

    Max-length (Linux): 64 characters

    Max-length (Windows): 20 characters

  • For root access to the Linux VM, see Using root privileges on Linux virtual machines in Azure
  • For a list of built-in system users on Linux that should not be used in this field, see Selecting User Names for Linux on Azure

  • adminPassword string

    Specifies the password of the administrator account.

    Minimum-length (Windows): 8 characters

    Minimum-length (Linux): 6 characters

    Max-length (Windows): 123 characters

    Max-length (Linux): 72 characters

    Complexity requirements: 3 out of 4 conditions below need to be fulfilled
    Has lower characters
    Has upper characters
    Has a digit
    Has a special character (Regex match [\W_])

    Disallowed values: "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!"

    For resetting the password, see How to reset the Remote Desktop service or its login password in a Windows VM

    For resetting root password, see Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension

    customData string

    Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes.

    For using cloud-init for your VM, see Using cloud-init to customize a Linux VM during creation

    windowsConfiguration object

    Specifies Windows operating system settings on the virtual machine.

    linuxConfiguration object

    Specifies the Linux operating system settings on the virtual machine.

    For a list of supported Linux distributions, see Linux on Azure-Endorsed Distributions

    For running non-endorsed distributions, see Information for Non-Endorsed Distributions.

    secrets array

    Specifies set of certificates that should be installed onto the virtual machine.

    windowsConfiguration
    object

    Specifies Windows operating system settings on the virtual machine.

    NameRequiredTypeDescription
    provisionVMAgent boolean

    Indicates whether virtual machine agent should be provisioned on the virtual machine.

    When this property is not specified in the request body, default behavior is to set it to true. This will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later.

    enableAutomaticUpdates boolean

    Indicates whether virtual machine is enabled for automatic updates.

    timeZone string

    Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time"

    additionalUnattendContent array

    Specifies additional base-64 encoded XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup.

    winRM object

    Specifies the Windows Remote Management listeners. This enables remote Windows PowerShell.

    winRM
    object

    Specifies the Windows Remote Management listeners. This enables remote Windows PowerShell.

    NameRequiredTypeDescription
    listeners array

    The list of Windows Remote Management listeners

    linuxConfiguration
    object

    Specifies the Linux operating system settings on the virtual machine.

    For a list of supported Linux distributions, see Linux on Azure-Endorsed Distributions

    For running non-endorsed distributions, see Information for Non-Endorsed Distributions.

    NameRequiredTypeDescription
    disablePasswordAuthentication boolean

    Specifies whether password authentication should be disabled.

    ssh object

    Specifies the ssh key configuration for a Linux OS.

    ssh
    object

    Specifies the ssh key configuration for a Linux OS.

    NameRequiredTypeDescription
    publicKeys array

    The list of SSH public keys used to authenticate with linux based VMs.

    networkProfile
    object

    Specifies the network interfaces of the virtual machine.

    NameRequiredTypeDescription
    networkInterfaces array

    Specifies the list of resource Ids for the network interfaces associated with the virtual machine.

    diagnosticsProfile
    object

    Specifies the boot diagnostic settings state.

    Minimum api-version: 2015-06-15.

    NameRequiredTypeDescription
    bootDiagnostics object

    Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.

    For Linux Virtual Machines, you can easily view the output of your console log.

    For both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from the hypervisor.

    bootDiagnostics
    object

    Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.

    For Linux Virtual Machines, you can easily view the output of your console log.

    For both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from the hypervisor.

    NameRequiredTypeDescription
    enabled boolean

    Whether boot diagnostics should be enabled on the Virtual Machine.

    storageUri string

    Uri of the storage account to use for placing the console output and screenshot.

    availabilitySet
    object

    Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see Manage the availability of virtual machines.

    For more information on Azure planned maintainance, see Planned maintenance for virtual machines in Azure

    Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set.

    NameRequiredTypeDescription
    id string

    Resource Id

    identity
    object

    The identity of the virtual machine, if configured.

    NameRequiredTypeDescription
    type string

    The type of identity used for the virtual machine. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the virtual machine. Possible values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None'

    identityIds array

    The list of user identities associated with the Virtual Machine. The user identity references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'.

    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    customHeaders object

    Headers that will be added to the request

    Returns
    Promise<HttpOperationResponse>

    A promise is returned

    capture(resourceGroupName, vmName, parameters, options, optionalCallback)

    Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar VMs.

    function capture(resourceGroupName, vmName, parameters, options, optionalCallback)
    Parameters
    resourceGroupName
    string

    The name of the resource group.

    vmName
    string

    The name of the virtual machine.

    parameters
    object

    Parameters supplied to the Capture Virtual Machine operation.

    NameRequiredTypeDescription
    vhdPrefix true string

    The captured virtual hard disk's name prefix.

    destinationContainerName true string

    The destination container name.

    overwriteVhds true boolean

    Specifies whether to overwrite the destination virtual hard disk, in case of conflict.

    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    customHeaders object

    Headers that will be added to the request

    optionalCallback
    function

    The optional callback.

    required: false
    NameRequiredTypeDescription
    err true ErrorThe Error object if an error occurred, null otherwise.
    result objectThe deserialized result object if an error did not occur. See VirtualMachineCaptureResult for more information.
    request objectThe HTTP Request object if an error did not occur.
    response streamThe HTTP Response stream if an error did not occur.
    Returns
    Promise<VirtualMachineCaptureResult>

    If a callback was passed as the last parameter then it returns the callback else returns a Promise.

    captureWithHttpOperationResponse(resourceGroupName, vmName, parameters, options)

    Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar VMs.

    function captureWithHttpOperationResponse(resourceGroupName, vmName, parameters, options)
    Parameters
    resourceGroupName
    string

    The name of the resource group.

    vmName
    string

    The name of the virtual machine.

    parameters
    object

    Parameters supplied to the Capture Virtual Machine operation.

    NameRequiredTypeDescription
    vhdPrefix true string

    The captured virtual hard disk's name prefix.

    destinationContainerName true string

    The destination container name.

    overwriteVhds true boolean

    Specifies whether to overwrite the destination virtual hard disk, in case of conflict.

    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    customHeaders object

    Headers that will be added to the request

    Returns
    Promise<HttpOperationResponse>

    A promise is returned

    convertToManagedDisks(resourceGroupName, vmName, options, optionalCallback)

    Converts virtual machine disks from blob-based to managed disks. Virtual machine must be stop-deallocated before invoking this operation.

    function convertToManagedDisks(resourceGroupName, vmName, options, optionalCallback)
    Parameters
    resourceGroupName
    string

    The name of the resource group.

    vmName
    string

    The name of the virtual machine.

    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    customHeaders object

    Headers that will be added to the request

    optionalCallback
    function

    The optional callback.

    required: false
    NameRequiredTypeDescription
    err true ErrorThe Error object if an error occurred, null otherwise.
    result objectThe deserialized result object if an error did not occur. See OperationStatusResponse for more information.
    request objectThe HTTP Request object if an error did not occur.
    response streamThe HTTP Response stream if an error did not occur.
    Returns
    Promise<OperationStatusResponse>

    If a callback was passed as the last parameter then it returns the callback else returns a Promise.

    convertToManagedDisksWithHttpOperationResponse(resourceGroupName, vmName, options)

    Converts virtual machine disks from blob-based to managed disks. Virtual machine must be stop-deallocated before invoking this operation.

    function convertToManagedDisksWithHttpOperationResponse(resourceGroupName, vmName, options)
    Parameters
    resourceGroupName
    string

    The name of the resource group.

    vmName
    string

    The name of the virtual machine.

    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    customHeaders object

    Headers that will be added to the request

    Returns
    Promise<HttpOperationResponse>

    A promise is returned

    createOrUpdate(resourceGroupName, vmName, parameters, options, optionalCallback)

    The operation to create or update a virtual machine.

    function createOrUpdate(resourceGroupName, vmName, parameters, options, optionalCallback)
    Parameters
    resourceGroupName
    string

    The name of the resource group.

    vmName
    string

    The name of the virtual machine.

    parameters
    object

    Parameters supplied to the Create Virtual Machine operation.

    NameRequiredTypeDescription
    plan object

    Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click Want to deploy programmatically, Get Started ->. Enter any required information and then click Save.

    hardwareProfile object

    Specifies the hardware settings for the virtual machine.

    storageProfile object

    Specifies the storage settings for the virtual machine disks.

    osProfile object

    Specifies the operating system settings for the virtual machine.

    networkProfile object

    Specifies the network interfaces of the virtual machine.

    diagnosticsProfile object

    Specifies the boot diagnostic settings state.

    Minimum api-version: 2015-06-15.

    availabilitySet object

    Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see Manage the availability of virtual machines.

    For more information on Azure planned maintainance, see Planned maintenance for virtual machines in Azure

    Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set.

    licenseType string

    Specifies that the image or disk that is being used was licensed on-premises. This element is only used for images that contain the Windows Server operating system.

    Possible values are:

    Windows_Client

    Windows_Server

    If this element is included in a request for an update, the value must match the initial value. This value cannot be updated.

    For more information, see Azure Hybrid Use Benefit for Windows Server

    Minimum api-version: 2015-06-15

    identity object

    The identity of the virtual machine, if configured.

    zones array

    The virtual machine zones.

    location true string

    Resource location

    tags object

    Resource tags

    plan
    object

    Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click Want to deploy programmatically, Get Started ->. Enter any required information and then click Save.

    NameRequiredTypeDescription
    name string

    The plan ID.

    publisher string

    The publisher ID.

    product string

    Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element.

    promotionCode string

    The promotion code.

    hardwareProfile
    object

    Specifies the hardware settings for the virtual machine.

    NameRequiredTypeDescription
    vmSize string

    Specifies the size of the virtual machine. For more information about virtual machine sizes, see Sizes for virtual machines.

    The available VM sizes depend on region and availability set. For a list of available sizes use these APIs:

    List all available virtual machine sizes in an availability set

    List all available virtual machine sizes in a region

    List all available virtual machine sizes for resizing. Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2_v2', 'Standard_A4_v2', 'Standard_A8_v2', 'Standard_A2m_v2', 'Standard_A4m_v2', 'Standard_A8m_v2', 'Standard_B1s', 'Standard_B1ms', 'Standard_B2s', 'Standard_B2ms', 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D2', 'Standard_D3', 'Standard_D4', 'Standard_D11', 'Standard_D12', 'Standard_D13', 'Standard_D14', 'Standard_D1_v2', 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', 'Standard_D2_v3', 'Standard_D4_v3', 'Standard_D8_v3', 'Standard_D16_v3', 'Standard_D32_v3', 'Standard_D64_v3', 'Standard_D2s_v3', 'Standard_D4s_v3', 'Standard_D8s_v3', 'Standard_D16s_v3', 'Standard_D32s_v3', 'Standard_D64s_v3', 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', 'Standard_D14_v2', 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', 'Standard_DS13', 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', 'Standard_DS3_v2', 'Standard_DS4_v2', 'Standard_DS5_v2', 'Standard_DS11_v2', 'Standard_DS12_v2', 'Standard_DS13_v2', 'Standard_DS14_v2', 'Standard_DS15_v2', 'Standard_DS13-4_v2', 'Standard_DS13-2_v2', 'Standard_DS14-8_v2', 'Standard_DS14-4_v2', 'Standard_E2_v3', 'Standard_E4_v3', 'Standard_E8_v3', 'Standard_E16_v3', 'Standard_E32_v3', 'Standard_E64_v3', 'Standard_E2s_v3', 'Standard_E4s_v3', 'Standard_E8s_v3', 'Standard_E16s_v3', 'Standard_E32s_v3', 'Standard_E64s_v3', 'Standard_E32-16_v3', 'Standard_E32-8s_v3', 'Standard_E64-32s_v3', 'Standard_E64-16s_v3', 'Standard_F1', 'Standard_F2', 'Standard_F4', 'Standard_F8', 'Standard_F16', 'Standard_F1s', 'Standard_F2s', 'Standard_F4s', 'Standard_F8s', 'Standard_F16s', 'Standard_F2s_v2', 'Standard_F4s_v2', 'Standard_F8s_v2', 'Standard_F16s_v2', 'Standard_F32s_v2', 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5', 'Standard_GS4-8', 'Standard_GS4-4', 'Standard_GS5-16', 'Standard_GS5-8', 'Standard_H8', 'Standard_H16', 'Standard_H8m', 'Standard_H16m', 'Standard_H16r', 'Standard_H16mr', 'Standard_L4s', 'Standard_L8s', 'Standard_L16s', 'Standard_L32s', 'Standard_M64s', 'Standard_M64ms', 'Standard_M128s', 'Standard_M128ms', 'Standard_M64-32ms', 'Standard_M64-16ms', 'Standard_M128-64ms', 'Standard_M128-32ms', 'Standard_NC6', 'Standard_NC12', 'Standard_NC24', 'Standard_NC24r', 'Standard_NC6s_v2', 'Standard_NC12s_v2', 'Standard_NC24s_v2', 'Standard_NC24rs_v2', 'Standard_NC6s_v3', 'Standard_NC12s_v3', 'Standard_NC24s_v3', 'Standard_NC24rs_v3', 'Standard_ND6s', 'Standard_ND12s', 'Standard_ND24s', 'Standard_ND24rs', 'Standard_NV6', 'Standard_NV12', 'Standard_NV24'

    storageProfile
    object

    Specifies the storage settings for the virtual machine disks.

    NameRequiredTypeDescription
    imageReference object

    Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations.

    osDisk object

    Specifies information about the operating system disk used by the virtual machine.

    For more information about disks, see About disks and VHDs for Azure virtual machines.

    dataDisks array

    Specifies the parameters that are used to add a data disk to a virtual machine.

    For more information about disks, see About disks and VHDs for Azure virtual machines.

    imageReference
    object

    Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations.

    NameRequiredTypeDescription
    publisher string

    The image publisher.

    offer string

    Specifies the offer of the platform image or marketplace image used to create the virtual machine.

    sku string

    The image SKU.

    version string

    Specifies the version of the platform image or marketplace image used to create the virtual machine. The allowed formats are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal numbers. Specify 'latest' to use the latest version of an image available at deploy time. Even if you use 'latest', the VM image will not automatically update after deploy time even if a new version becomes available.

    id string

    Resource Id

    osDisk
    object

    Specifies information about the operating system disk used by the virtual machine.

    For more information about disks, see About disks and VHDs for Azure virtual machines.

    NameRequiredTypeDescription
    osType string

    This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD.

    Possible values are:

    Windows

    Linux. Possible values include: 'Windows', 'Linux'

    encryptionSettings object

    Specifies the encryption settings for the OS Disk.

    Minimum api-version: 2015-06-15

    name string

    The disk name.

    vhd object

    The virtual hard disk.

    image object

    The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist.

    caching string

    Specifies the caching requirements.

    Possible values are:

    None

    ReadOnly

    ReadWrite

    Default: None for Standard storage. ReadOnly for Premium storage. Possible values include: 'None', 'ReadOnly', 'ReadWrite'

    writeAcceleratorEnabled boolean

    Specifies whether writeAccelerator should be enabled or disabled on the disk.

    createOption true string

    Specifies how the virtual machine should be created.

    Possible values are:

    Attach \u2013 This value is used when you are using a specialized disk to create the virtual machine.

    FromImage \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Possible values include: 'FromImage', 'Empty', 'Attach'

    diskSizeGB number

    Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image.

    This value cannot be larger than 1023 GB

    managedDisk object

    The managed disk parameters.

    encryptionSettings
    object

    Specifies the encryption settings for the OS Disk.

    Minimum api-version: 2015-06-15

    NameRequiredTypeDescription
    diskEncryptionKey object

    Specifies the location of the disk encryption key, which is a Key Vault Secret.

    keyEncryptionKey object

    Specifies the location of the key encryption key in Key Vault.

    enabled boolean

    Specifies whether disk encryption should be enabled on the virtual machine.

    diskEncryptionKey
    object

    Specifies the location of the disk encryption key, which is a Key Vault Secret.

    NameRequiredTypeDescription
    secretUrl true string

    The URL referencing a secret in a Key Vault.

    sourceVault true object

    The relative URL of the Key Vault containing the secret.

    keyEncryptionKey
    object

    Specifies the location of the key encryption key in Key Vault.

    NameRequiredTypeDescription
    keyUrl true string

    The URL referencing a key encryption key in Key Vault.

    sourceVault true object

    The relative URL of the Key Vault containing the key.

    image
    object

    The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist.

    NameRequiredTypeDescription
    uri string

    Specifies the virtual hard disk's uri.

    managedDisk
    object

    The managed disk parameters.

    NameRequiredTypeDescription
    storageAccountType string

    Specifies the storage account type for the managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS'

    id string

    Resource Id

    osProfile
    object

    Specifies the operating system settings for the virtual machine.

    NameRequiredTypeDescription
    computerName string

    Specifies the host OS name of the virtual machine.

    Max-length (Windows): 15 characters

    Max-length (Linux): 64 characters.

    For naming conventions and restrictions see Azure infrastructure services implementation guidelines.

    adminUsername string

    Specifies the name of the administrator account.

    Windows-only restriction: Cannot end in "."

    Disallowed values: "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5".

    Minimum-length (Linux): 1 character

    Max-length (Linux): 64 characters

    Max-length (Windows): 20 characters

  • For root access to the Linux VM, see Using root privileges on Linux virtual machines in Azure
  • For a list of built-in system users on Linux that should not be used in this field, see Selecting User Names for Linux on Azure

  • adminPassword string

    Specifies the password of the administrator account.

    Minimum-length (Windows): 8 characters

    Minimum-length (Linux): 6 characters

    Max-length (Windows): 123 characters

    Max-length (Linux): 72 characters

    Complexity requirements: 3 out of 4 conditions below need to be fulfilled
    Has lower characters
    Has upper characters
    Has a digit
    Has a special character (Regex match [\W_])

    Disallowed values: "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!"

    For resetting the password, see How to reset the Remote Desktop service or its login password in a Windows VM

    For resetting root password, see Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension

    customData string

    Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes.

    For using cloud-init for your VM, see Using cloud-init to customize a Linux VM during creation

    windowsConfiguration object

    Specifies Windows operating system settings on the virtual machine.

    linuxConfiguration object

    Specifies the Linux operating system settings on the virtual machine.

    For a list of supported Linux distributions, see Linux on Azure-Endorsed Distributions

    For running non-endorsed distributions, see Information for Non-Endorsed Distributions.

    secrets array

    Specifies set of certificates that should be installed onto the virtual machine.

    windowsConfiguration
    object

    Specifies Windows operating system settings on the virtual machine.

    NameRequiredTypeDescription
    provisionVMAgent boolean

    Indicates whether virtual machine agent should be provisioned on the virtual machine.

    When this property is not specified in the request body, default behavior is to set it to true. This will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later.

    enableAutomaticUpdates boolean

    Indicates whether virtual machine is enabled for automatic updates.

    timeZone string

    Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time"

    additionalUnattendContent array

    Specifies additional base-64 encoded XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup.

    winRM object

    Specifies the Windows Remote Management listeners. This enables remote Windows PowerShell.

    winRM
    object

    Specifies the Windows Remote Management listeners. This enables remote Windows PowerShell.

    NameRequiredTypeDescription
    listeners array

    The list of Windows Remote Management listeners

    linuxConfiguration
    object

    Specifies the Linux operating system settings on the virtual machine.

    For a list of supported Linux distributions, see Linux on Azure-Endorsed Distributions

    For running non-endorsed distributions, see Information for Non-Endorsed Distributions.

    NameRequiredTypeDescription
    disablePasswordAuthentication boolean

    Specifies whether password authentication should be disabled.

    ssh object

    Specifies the ssh key configuration for a Linux OS.

    ssh
    object

    Specifies the ssh key configuration for a Linux OS.

    NameRequiredTypeDescription
    publicKeys array

    The list of SSH public keys used to authenticate with linux based VMs.

    networkProfile
    object

    Specifies the network interfaces of the virtual machine.

    NameRequiredTypeDescription
    networkInterfaces array

    Specifies the list of resource Ids for the network interfaces associated with the virtual machine.

    diagnosticsProfile
    object

    Specifies the boot diagnostic settings state.

    Minimum api-version: 2015-06-15.

    NameRequiredTypeDescription
    bootDiagnostics object

    Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.

    For Linux Virtual Machines, you can easily view the output of your console log.

    For both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from the hypervisor.

    bootDiagnostics
    object

    Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.

    For Linux Virtual Machines, you can easily view the output of your console log.

    For both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from the hypervisor.

    NameRequiredTypeDescription
    enabled boolean

    Whether boot diagnostics should be enabled on the Virtual Machine.

    storageUri string

    Uri of the storage account to use for placing the console output and screenshot.

    availabilitySet
    object

    Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see Manage the availability of virtual machines.

    For more information on Azure planned maintainance, see Planned maintenance for virtual machines in Azure

    Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set.

    NameRequiredTypeDescription
    id string

    Resource Id

    identity
    object

    The identity of the virtual machine, if configured.

    NameRequiredTypeDescription
    type string

    The type of identity used for the virtual machine. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the virtual machine. Possible values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None'

    identityIds array

    The list of user identities associated with the Virtual Machine. The user identity references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'.

    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    customHeaders object

    Headers that will be added to the request

    optionalCallback
    function

    The optional callback.

    required: false
    NameRequiredTypeDescription
    err true ErrorThe Error object if an error occurred, null otherwise.
    result objectThe deserialized result object if an error did not occur. See VirtualMachine for more information.
    request objectThe HTTP Request object if an error did not occur.
    response streamThe HTTP Response stream if an error did not occur.
    Returns
    Promise<VirtualMachine>

    If a callback was passed as the last parameter then it returns the callback else returns a Promise.

    createOrUpdateWithHttpOperationResponse(resourceGroupName, vmName, parameters, options)

    The operation to create or update a virtual machine.

    function createOrUpdateWithHttpOperationResponse(resourceGroupName, vmName, parameters, options)
    Parameters
    resourceGroupName
    string

    The name of the resource group.

    vmName
    string

    The name of the virtual machine.

    parameters
    object

    Parameters supplied to the Create Virtual Machine operation.

    NameRequiredTypeDescription
    plan object

    Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click Want to deploy programmatically, Get Started ->. Enter any required information and then click Save.

    hardwareProfile object

    Specifies the hardware settings for the virtual machine.

    storageProfile object

    Specifies the storage settings for the virtual machine disks.

    osProfile object

    Specifies the operating system settings for the virtual machine.

    networkProfile object

    Specifies the network interfaces of the virtual machine.

    diagnosticsProfile object

    Specifies the boot diagnostic settings state.

    Minimum api-version: 2015-06-15.

    availabilitySet object

    Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see Manage the availability of virtual machines.

    For more information on Azure planned maintainance, see Planned maintenance for virtual machines in Azure

    Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set.

    licenseType string

    Specifies that the image or disk that is being used was licensed on-premises. This element is only used for images that contain the Windows Server operating system.

    Possible values are:

    Windows_Client

    Windows_Server

    If this element is included in a request for an update, the value must match the initial value. This value cannot be updated.

    For more information, see Azure Hybrid Use Benefit for Windows Server

    Minimum api-version: 2015-06-15

    identity object

    The identity of the virtual machine, if configured.

    zones array

    The virtual machine zones.

    location true string

    Resource location

    tags object

    Resource tags

    plan
    object

    Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click Want to deploy programmatically, Get Started ->. Enter any required information and then click Save.

    NameRequiredTypeDescription
    name string

    The plan ID.

    publisher string

    The publisher ID.

    product string

    Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element.

    promotionCode string

    The promotion code.

    hardwareProfile
    object

    Specifies the hardware settings for the virtual machine.

    NameRequiredTypeDescription
    vmSize string

    Specifies the size of the virtual machine. For more information about virtual machine sizes, see Sizes for virtual machines.

    The available VM sizes depend on region and availability set. For a list of available sizes use these APIs:

    List all available virtual machine sizes in an availability set

    List all available virtual machine sizes in a region

    List all available virtual machine sizes for resizing. Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2_v2', 'Standard_A4_v2', 'Standard_A8_v2', 'Standard_A2m_v2', 'Standard_A4m_v2', 'Standard_A8m_v2', 'Standard_B1s', 'Standard_B1ms', 'Standard_B2s', 'Standard_B2ms', 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D2', 'Standard_D3', 'Standard_D4', 'Standard_D11', 'Standard_D12', 'Standard_D13', 'Standard_D14', 'Standard_D1_v2', 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', 'Standard_D2_v3', 'Standard_D4_v3', 'Standard_D8_v3', 'Standard_D16_v3', 'Standard_D32_v3', 'Standard_D64_v3', 'Standard_D2s_v3', 'Standard_D4s_v3', 'Standard_D8s_v3', 'Standard_D16s_v3', 'Standard_D32s_v3', 'Standard_D64s_v3', 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', 'Standard_D14_v2', 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', 'Standard_DS13', 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', 'Standard_DS3_v2', 'Standard_DS4_v2', 'Standard_DS5_v2', 'Standard_DS11_v2', 'Standard_DS12_v2', 'Standard_DS13_v2', 'Standard_DS14_v2', 'Standard_DS15_v2', 'Standard_DS13-4_v2', 'Standard_DS13-2_v2', 'Standard_DS14-8_v2', 'Standard_DS14-4_v2', 'Standard_E2_v3', 'Standard_E4_v3', 'Standard_E8_v3', 'Standard_E16_v3', 'Standard_E32_v3', 'Standard_E64_v3', 'Standard_E2s_v3', 'Standard_E4s_v3', 'Standard_E8s_v3', 'Standard_E16s_v3', 'Standard_E32s_v3', 'Standard_E64s_v3', 'Standard_E32-16_v3', 'Standard_E32-8s_v3', 'Standard_E64-32s_v3', 'Standard_E64-16s_v3', 'Standard_F1', 'Standard_F2', 'Standard_F4', 'Standard_F8', 'Standard_F16', 'Standard_F1s', 'Standard_F2s', 'Standard_F4s', 'Standard_F8s', 'Standard_F16s', 'Standard_F2s_v2', 'Standard_F4s_v2', 'Standard_F8s_v2', 'Standard_F16s_v2', 'Standard_F32s_v2', 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5', 'Standard_GS4-8', 'Standard_GS4-4', 'Standard_GS5-16', 'Standard_GS5-8', 'Standard_H8', 'Standard_H16', 'Standard_H8m', 'Standard_H16m', 'Standard_H16r', 'Standard_H16mr', 'Standard_L4s', 'Standard_L8s', 'Standard_L16s', 'Standard_L32s', 'Standard_M64s', 'Standard_M64ms', 'Standard_M128s', 'Standard_M128ms', 'Standard_M64-32ms', 'Standard_M64-16ms', 'Standard_M128-64ms', 'Standard_M128-32ms', 'Standard_NC6', 'Standard_NC12', 'Standard_NC24', 'Standard_NC24r', 'Standard_NC6s_v2', 'Standard_NC12s_v2', 'Standard_NC24s_v2', 'Standard_NC24rs_v2', 'Standard_NC6s_v3', 'Standard_NC12s_v3', 'Standard_NC24s_v3', 'Standard_NC24rs_v3', 'Standard_ND6s', 'Standard_ND12s', 'Standard_ND24s', 'Standard_ND24rs', 'Standard_NV6', 'Standard_NV12', 'Standard_NV24'

    storageProfile
    object

    Specifies the storage settings for the virtual machine disks.

    NameRequiredTypeDescription
    imageReference object

    Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations.

    osDisk object

    Specifies information about the operating system disk used by the virtual machine.

    For more information about disks, see About disks and VHDs for Azure virtual machines.

    dataDisks array

    Specifies the parameters that are used to add a data disk to a virtual machine.

    For more information about disks, see About disks and VHDs for Azure virtual machines.

    imageReference
    object

    Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations.

    NameRequiredTypeDescription
    publisher string

    The image publisher.

    offer string

    Specifies the offer of the platform image or marketplace image used to create the virtual machine.

    sku string

    The image SKU.

    version string

    Specifies the version of the platform image or marketplace image used to create the virtual machine. The allowed formats are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal numbers. Specify 'latest' to use the latest version of an image available at deploy time. Even if you use 'latest', the VM image will not automatically update after deploy time even if a new version becomes available.

    id string

    Resource Id

    osDisk
    object

    Specifies information about the operating system disk used by the virtual machine.

    For more information about disks, see About disks and VHDs for Azure virtual machines.

    NameRequiredTypeDescription
    osType string

    This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD.

    Possible values are:

    Windows

    Linux. Possible values include: 'Windows', 'Linux'

    encryptionSettings object

    Specifies the encryption settings for the OS Disk.

    Minimum api-version: 2015-06-15

    name string

    The disk name.

    vhd object

    The virtual hard disk.

    image object

    The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist.

    caching string

    Specifies the caching requirements.

    Possible values are:

    None

    ReadOnly

    ReadWrite

    Default: None for Standard storage. ReadOnly for Premium storage. Possible values include: 'None', 'ReadOnly', 'ReadWrite'

    writeAcceleratorEnabled boolean

    Specifies whether writeAccelerator should be enabled or disabled on the disk.

    createOption true string

    Specifies how the virtual machine should be created.

    Possible values are:

    Attach \u2013 This value is used when you are using a specialized disk to create the virtual machine.

    FromImage \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Possible values include: 'FromImage', 'Empty', 'Attach'

    diskSizeGB number

    Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image.

    This value cannot be larger than 1023 GB

    managedDisk object

    The managed disk parameters.

    encryptionSettings
    object

    Specifies the encryption settings for the OS Disk.

    Minimum api-version: 2015-06-15

    NameRequiredTypeDescription
    diskEncryptionKey object

    Specifies the location of the disk encryption key, which is a Key Vault Secret.

    keyEncryptionKey object

    Specifies the location of the key encryption key in Key Vault.

    enabled boolean

    Specifies whether disk encryption should be enabled on the virtual machine.

    diskEncryptionKey
    object

    Specifies the location of the disk encryption key, which is a Key Vault Secret.

    NameRequiredTypeDescription
    secretUrl true string

    The URL referencing a secret in a Key Vault.

    sourceVault true object

    The relative URL of the Key Vault containing the secret.

    keyEncryptionKey
    object

    Specifies the location of the key encryption key in Key Vault.

    NameRequiredTypeDescription
    keyUrl true string

    The URL referencing a key encryption key in Key Vault.

    sourceVault true object

    The relative URL of the Key Vault containing the key.

    image
    object

    The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist.

    NameRequiredTypeDescription
    uri string

    Specifies the virtual hard disk's uri.

    managedDisk
    object

    The managed disk parameters.

    NameRequiredTypeDescription
    storageAccountType string

    Specifies the storage account type for the managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS'

    id string

    Resource Id

    osProfile
    object

    Specifies the operating system settings for the virtual machine.

    NameRequiredTypeDescription
    computerName string

    Specifies the host OS name of the virtual machine.

    Max-length (Windows): 15 characters

    Max-length (Linux): 64 characters.

    For naming conventions and restrictions see Azure infrastructure services implementation guidelines.

    adminUsername string

    Specifies the name of the administrator account.

    Windows-only restriction: Cannot end in "."

    Disallowed values: "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5".

    Minimum-length (Linux): 1 character

    Max-length (Linux): 64 characters

    Max-length (Windows): 20 characters

  • For root access to the Linux VM, see Using root privileges on Linux virtual machines in Azure
  • For a list of built-in system users on Linux that should not be used in this field, see Selecting User Names for Linux on Azure

  • adminPassword string

    Specifies the password of the administrator account.

    Minimum-length (Windows): 8 characters

    Minimum-length (Linux): 6 characters

    Max-length (Windows): 123 characters

    Max-length (Linux): 72 characters

    Complexity requirements: 3 out of 4 conditions below need to be fulfilled
    Has lower characters
    Has upper characters
    Has a digit
    Has a special character (Regex match [\W_])

    Disallowed values: "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!"

    For resetting the password, see How to reset the Remote Desktop service or its login password in a Windows VM

    For resetting root password, see Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension

    customData string

    Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes.

    For using cloud-init for your VM, see Using cloud-init to customize a Linux VM during creation

    windowsConfiguration object

    Specifies Windows operating system settings on the virtual machine.

    linuxConfiguration object

    Specifies the Linux operating system settings on the virtual machine.

    For a list of supported Linux distributions, see Linux on Azure-Endorsed Distributions

    For running non-endorsed distributions, see Information for Non-Endorsed Distributions.

    secrets array

    Specifies set of certificates that should be installed onto the virtual machine.

    windowsConfiguration
    object

    Specifies Windows operating system settings on the virtual machine.

    NameRequiredTypeDescription
    provisionVMAgent boolean

    Indicates whether virtual machine agent should be provisioned on the virtual machine.

    When this property is not specified in the request body, default behavior is to set it to true. This will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later.

    enableAutomaticUpdates boolean

    Indicates whether virtual machine is enabled for automatic updates.

    timeZone string

    Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time"

    additionalUnattendContent array

    Specifies additional base-64 encoded XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup.

    winRM object

    Specifies the Windows Remote Management listeners. This enables remote Windows PowerShell.

    winRM
    object

    Specifies the Windows Remote Management listeners. This enables remote Windows PowerShell.

    NameRequiredTypeDescription
    listeners array

    The list of Windows Remote Management listeners

    linuxConfiguration
    object

    Specifies the Linux operating system settings on the virtual machine.

    For a list of supported Linux distributions, see Linux on Azure-Endorsed Distributions

    For running non-endorsed distributions, see Information for Non-Endorsed Distributions.

    NameRequiredTypeDescription
    disablePasswordAuthentication boolean

    Specifies whether password authentication should be disabled.

    ssh object

    Specifies the ssh key configuration for a Linux OS.

    ssh
    object

    Specifies the ssh key configuration for a Linux OS.

    NameRequiredTypeDescription
    publicKeys array

    The list of SSH public keys used to authenticate with linux based VMs.

    networkProfile
    object

    Specifies the network interfaces of the virtual machine.

    NameRequiredTypeDescription
    networkInterfaces array

    Specifies the list of resource Ids for the network interfaces associated with the virtual machine.

    diagnosticsProfile
    object

    Specifies the boot diagnostic settings state.

    Minimum api-version: 2015-06-15.

    NameRequiredTypeDescription
    bootDiagnostics object

    Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.

    For Linux Virtual Machines, you can easily view the output of your console log.

    For both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from the hypervisor.

    bootDiagnostics
    object

    Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.

    For Linux Virtual Machines, you can easily view the output of your console log.

    For both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from the hypervisor.

    NameRequiredTypeDescription
    enabled boolean

    Whether boot diagnostics should be enabled on the Virtual Machine.

    storageUri string

    Uri of the storage account to use for placing the console output and screenshot.

    availabilitySet
    object

    Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see Manage the availability of virtual machines.

    For more information on Azure planned maintainance, see Planned maintenance for virtual machines in Azure

    Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set.

    NameRequiredTypeDescription
    id string

    Resource Id

    identity
    object

    The identity of the virtual machine, if configured.

    NameRequiredTypeDescription
    type string

    The type of identity used for the virtual machine. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the virtual machine. Possible values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None'

    identityIds array

    The list of user identities associated with the Virtual Machine. The user identity references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'.

    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    customHeaders object

    Headers that will be added to the request

    Returns
    Promise<HttpOperationResponse>

    A promise is returned

    deallocate(resourceGroupName, vmName, options, optionalCallback)

    Shuts down the virtual machine and releases the compute resources. You are not billed for the compute resources that this virtual machine uses.

    function deallocate(resourceGroupName, vmName, options, optionalCallback)
    Parameters
    resourceGroupName
    string

    The name of the resource group.

    vmName
    string

    The name of the virtual machine.

    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    customHeaders object

    Headers that will be added to the request

    optionalCallback
    function

    The optional callback.

    required: false
    NameRequiredTypeDescription
    err true ErrorThe Error object if an error occurred, null otherwise.
    result objectThe deserialized result object if an error did not occur. See OperationStatusResponse for more information.
    request objectThe HTTP Request object if an error did not occur.
    response streamThe HTTP Response stream if an error did not occur.
    Returns
    Promise<OperationStatusResponse>

    If a callback was passed as the last parameter then it returns the callback else returns a Promise.

    deallocateWithHttpOperationResponse(resourceGroupName, vmName, options)

    Shuts down the virtual machine and releases the compute resources. You are not billed for the compute resources that this virtual machine uses.

    function deallocateWithHttpOperationResponse(resourceGroupName, vmName, options)
    Parameters
    resourceGroupName
    string

    The name of the resource group.

    vmName
    string

    The name of the virtual machine.

    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    customHeaders object

    Headers that will be added to the request

    Returns
    Promise<HttpOperationResponse>

    A promise is returned

    deleteMethod(resourceGroupName, vmName, options, optionalCallback)

    The operation to delete a virtual machine.

    function deleteMethod(resourceGroupName, vmName, options, optionalCallback)
    Parameters
    resourceGroupName
    string

    The name of the resource group.

    vmName
    string

    The name of the virtual machine.

    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    customHeaders object

    Headers that will be added to the request

    optionalCallback
    function

    The optional callback.

    required: false
    NameRequiredTypeDescription
    err true ErrorThe Error object if an error occurred, null otherwise.
    result objectThe deserialized result object if an error did not occur. See OperationStatusResponse for more information.
    request objectThe HTTP Request object if an error did not occur.
    response streamThe HTTP Response stream if an error did not occur.
    Returns
    Promise<OperationStatusResponse>

    If a callback was passed as the last parameter then it returns the callback else returns a Promise.

    deleteMethodWithHttpOperationResponse(resourceGroupName, vmName, options)

    The operation to delete a virtual machine.

    function deleteMethodWithHttpOperationResponse(resourceGroupName, vmName, options)
    Parameters
    resourceGroupName
    string

    The name of the resource group.

    vmName
    string

    The name of the virtual machine.

    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    customHeaders object

    Headers that will be added to the request

    Returns
    Promise<HttpOperationResponse>

    A promise is returned

    generalize(resourceGroupName, vmName, options, optionalCallback)

    Sets the state of the virtual machine to generalized.

    function generalize(resourceGroupName, vmName, options, optionalCallback)
    Parameters
    resourceGroupName
    string

    The name of the resource group.

    vmName
    string

    The name of the virtual machine.

    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    customHeaders object

    Headers that will be added to the request

    optionalCallback
    function

    The optional callback.

    required: false
    NameRequiredTypeDescription
    err true ErrorThe Error object if an error occurred, null otherwise.
    result objectThe deserialized result object if an error did not occur. See OperationStatusResponse for more information.
    request objectThe HTTP Request object if an error did not occur.
    response streamThe HTTP Response stream if an error did not occur.
    Returns
    Promise<OperationStatusResponse>

    If a callback was passed as the last parameter then it returns the callback else returns a Promise.

    generalizeWithHttpOperationResponse(resourceGroupName, vmName, options)

    Sets the state of the virtual machine to generalized.

    function generalizeWithHttpOperationResponse(resourceGroupName, vmName, options)
    Parameters
    resourceGroupName
    string

    The name of the resource group.

    vmName
    string

    The name of the virtual machine.

    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    customHeaders object

    Headers that will be added to the request

    Returns
    Promise<HttpOperationResponse>

    A promise is returned

    get(resourceGroupName, vmName, options, optionalCallback)

    Retrieves information about the model view or the instance view of a virtual machine.

    function get(resourceGroupName, vmName, options, optionalCallback)
    Parameters
    resourceGroupName
    string

    The name of the resource group.

    vmName
    string

    The name of the virtual machine.

    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    expand string

    The expand expression to apply on the operation. Possible values include: 'instanceView'

    customHeaders object

    Headers that will be added to the request

    optionalCallback
    function

    The optional callback.

    required: false
    NameRequiredTypeDescription
    err true ErrorThe Error object if an error occurred, null otherwise.
    result objectThe deserialized result object if an error did not occur. See VirtualMachine for more information.
    request objectThe HTTP Request object if an error did not occur.
    response streamThe HTTP Response stream if an error did not occur.
    Returns
    Promise<VirtualMachine>

    If a callback was passed as the last parameter then it returns the callback else returns a Promise.

    getExtensions(resourceGroupName, vmName, options, optionalCallback)

    The operation to get all extensions of a Virtual Machine.

    function getExtensions(resourceGroupName, vmName, options, optionalCallback)
    Parameters
    resourceGroupName
    string

    The name of the resource group.

    vmName
    string

    The name of the virtual machine containing the extension.

    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    expand string

    The expand expression to apply on the operation.

    customHeaders object

    Headers that will be added to the request

    optionalCallback
    function

    The optional callback.

    required: false
    NameRequiredTypeDescription
    err true ErrorThe Error object if an error occurred, null otherwise.
    result objectThe deserialized result object if an error did not occur. See VirtualMachineExtensionsListResult for more information.
    request objectThe HTTP Request object if an error did not occur.
    response streamThe HTTP Response stream if an error did not occur.
    Returns
    Promise<VirtualMachineExtensionsListResult>

    If a callback was passed as the last parameter then it returns the callback else returns a Promise.

    getExtensionsWithHttpOperationResponse(resourceGroupName, vmName, options)

    The operation to get all extensions of a Virtual Machine.

    function getExtensionsWithHttpOperationResponse(resourceGroupName, vmName, options)
    Parameters
    resourceGroupName
    string

    The name of the resource group.

    vmName
    string

    The name of the virtual machine containing the extension.

    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    expand string

    The expand expression to apply on the operation.

    customHeaders object

    Headers that will be added to the request

    Returns
    Promise<HttpOperationResponse>

    A promise is returned

    getWithHttpOperationResponse(resourceGroupName, vmName, options)

    Retrieves information about the model view or the instance view of a virtual machine.

    function getWithHttpOperationResponse(resourceGroupName, vmName, options)
    Parameters
    resourceGroupName
    string

    The name of the resource group.

    vmName
    string

    The name of the virtual machine.

    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    expand string

    The expand expression to apply on the operation. Possible values include: 'instanceView'

    customHeaders object

    Headers that will be added to the request

    Returns
    Promise<HttpOperationResponse>

    A promise is returned

    instanceView(resourceGroupName, vmName, options, optionalCallback)

    Retrieves information about the run-time state of a virtual machine.

    function instanceView(resourceGroupName, vmName, options, optionalCallback)
    Parameters
    resourceGroupName
    string

    The name of the resource group.

    vmName
    string

    The name of the virtual machine.

    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    customHeaders object

    Headers that will be added to the request

    optionalCallback
    function

    The optional callback.

    required: false
    NameRequiredTypeDescription
    err true ErrorThe Error object if an error occurred, null otherwise.
    result objectThe deserialized result object if an error did not occur. See VirtualMachineInstanceView for more information.
    request objectThe HTTP Request object if an error did not occur.
    response streamThe HTTP Response stream if an error did not occur.
    Returns
    Promise<VirtualMachineInstanceView>

    If a callback was passed as the last parameter then it returns the callback else returns a Promise.

    instanceViewWithHttpOperationResponse(resourceGroupName, vmName, options)

    Retrieves information about the run-time state of a virtual machine.

    function instanceViewWithHttpOperationResponse(resourceGroupName, vmName, options)
    Parameters
    resourceGroupName
    string

    The name of the resource group.

    vmName
    string

    The name of the virtual machine.

    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    customHeaders object

    Headers that will be added to the request

    Returns
    Promise<HttpOperationResponse>

    A promise is returned

    list(resourceGroupName, options, optionalCallback)

    Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to get the next page of virtual machines.

    function list(resourceGroupName, options, optionalCallback)
    Parameters
    resourceGroupName
    string

    The name of the resource group.

    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    customHeaders object

    Headers that will be added to the request

    optionalCallback
    function

    The optional callback.

    required: false
    NameRequiredTypeDescription
    err true ErrorThe Error object if an error occurred, null otherwise.
    result objectThe deserialized result object if an error did not occur. See VirtualMachineListResult for more information.
    request objectThe HTTP Request object if an error did not occur.
    response streamThe HTTP Response stream if an error did not occur.
    Returns
    Promise<VirtualMachineListResult>

    If a callback was passed as the last parameter then it returns the callback else returns a Promise.

    listAll(options, optionalCallback)

    Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines.

    function listAll(options, optionalCallback)
    Parameters
    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    customHeaders object

    Headers that will be added to the request

    optionalCallback
    function

    The optional callback.

    required: false
    NameRequiredTypeDescription
    err true ErrorThe Error object if an error occurred, null otherwise.
    result objectThe deserialized result object if an error did not occur. See VirtualMachineListResult for more information.
    request objectThe HTTP Request object if an error did not occur.
    response streamThe HTTP Response stream if an error did not occur.
    Returns
    Promise<VirtualMachineListResult>

    If a callback was passed as the last parameter then it returns the callback else returns a Promise.

    Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines.

    function listAllNext(nextPageLink, options, optionalCallback)
    Parameters
    nextPageLink
    string

    The NextLink from the previous successful call to List operation.

    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    customHeaders object

    Headers that will be added to the request

    optionalCallback
    function

    The optional callback.

    required: false
    NameRequiredTypeDescription
    err true ErrorThe Error object if an error occurred, null otherwise.
    result objectThe deserialized result object if an error did not occur. See VirtualMachineListResult for more information.
    request objectThe HTTP Request object if an error did not occur.
    response streamThe HTTP Response stream if an error did not occur.
    Returns
    Promise<VirtualMachineListResult>

    If a callback was passed as the last parameter then it returns the callback else returns a Promise.

    Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines.

    function listAllNextWithHttpOperationResponse(nextPageLink, options)
    Parameters
    nextPageLink
    string

    The NextLink from the previous successful call to List operation.

    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    customHeaders object

    Headers that will be added to the request

    Returns
    Promise<HttpOperationResponse>

    A promise is returned

    listAllWithHttpOperationResponse(options)

    Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines.

    function listAllWithHttpOperationResponse(options)
    Parameters
    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    customHeaders object

    Headers that will be added to the request

    Returns
    Promise<HttpOperationResponse>

    A promise is returned

    listAvailableSizes(resourceGroupName, vmName, options, optionalCallback)

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

    function listAvailableSizes(resourceGroupName, vmName, options, optionalCallback)
    Parameters
    resourceGroupName
    string

    The name of the resource group.

    vmName
    string

    The name of the virtual machine.

    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    customHeaders object

    Headers that will be added to the request

    optionalCallback
    function

    The optional callback.

    required: false
    NameRequiredTypeDescription
    err true ErrorThe Error object if an error occurred, null otherwise.
    result objectThe deserialized result object if an error did not occur. See VirtualMachineSizeListResult for more information.
    request objectThe HTTP Request object if an error did not occur.
    response streamThe HTTP Response stream if an error did not occur.
    Returns
    Promise<VirtualMachineSizeListResult>

    If a callback was passed as the last parameter then it returns the callback else returns a Promise.

    listAvailableSizesWithHttpOperationResponse(resourceGroupName, vmName, options)

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

    function listAvailableSizesWithHttpOperationResponse(resourceGroupName, vmName, options)
    Parameters
    resourceGroupName
    string

    The name of the resource group.

    vmName
    string

    The name of the virtual machine.

    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    customHeaders object

    Headers that will be added to the request

    Returns
    Promise<HttpOperationResponse>

    A promise is returned

    Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to get the next page of virtual machines.

    function listNext(nextPageLink, options, optionalCallback)
    Parameters
    nextPageLink
    string

    The NextLink from the previous successful call to List operation.

    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    customHeaders object

    Headers that will be added to the request

    optionalCallback
    function

    The optional callback.

    required: false
    NameRequiredTypeDescription
    err true ErrorThe Error object if an error occurred, null otherwise.
    result objectThe deserialized result object if an error did not occur. See VirtualMachineListResult for more information.
    request objectThe HTTP Request object if an error did not occur.
    response streamThe HTTP Response stream if an error did not occur.
    Returns
    Promise<VirtualMachineListResult>

    If a callback was passed as the last parameter then it returns the callback else returns a Promise.

    Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to get the next page of virtual machines.

    function listNextWithHttpOperationResponse(nextPageLink, options)
    Parameters
    nextPageLink
    string

    The NextLink from the previous successful call to List operation.

    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    customHeaders object

    Headers that will be added to the request

    Returns
    Promise<HttpOperationResponse>

    A promise is returned

    listWithHttpOperationResponse(resourceGroupName, options)

    Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to get the next page of virtual machines.

    function listWithHttpOperationResponse(resourceGroupName, options)
    Parameters
    resourceGroupName
    string

    The name of the resource group.

    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    customHeaders object

    Headers that will be added to the request

    Returns
    Promise<HttpOperationResponse>

    A promise is returned

    performMaintenance(resourceGroupName, vmName, options, optionalCallback)

    The operation to perform maintenance on a virtual machine.

    function performMaintenance(resourceGroupName, vmName, options, optionalCallback)
    Parameters
    resourceGroupName
    string

    The name of the resource group.

    vmName
    string

    The name of the virtual machine.

    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    customHeaders object

    Headers that will be added to the request

    optionalCallback
    function

    The optional callback.

    required: false
    NameRequiredTypeDescription
    err true ErrorThe Error object if an error occurred, null otherwise.
    result objectThe deserialized result object if an error did not occur. See OperationStatusResponse for more information.
    request objectThe HTTP Request object if an error did not occur.
    response streamThe HTTP Response stream if an error did not occur.
    Returns
    Promise<OperationStatusResponse>

    If a callback was passed as the last parameter then it returns the callback else returns a Promise.

    performMaintenanceWithHttpOperationResponse(resourceGroupName, vmName, options)

    The operation to perform maintenance on a virtual machine.

    function performMaintenanceWithHttpOperationResponse(resourceGroupName, vmName, options)
    Parameters
    resourceGroupName
    string

    The name of the resource group.

    vmName
    string

    The name of the virtual machine.

    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    customHeaders object

    Headers that will be added to the request

    Returns
    Promise<HttpOperationResponse>

    A promise is returned

    powerOff(resourceGroupName, vmName, options, optionalCallback)

    The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine.

    function powerOff(resourceGroupName, vmName, options, optionalCallback)
    Parameters
    resourceGroupName
    string

    The name of the resource group.

    vmName
    string

    The name of the virtual machine.

    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    customHeaders object

    Headers that will be added to the request

    optionalCallback
    function

    The optional callback.

    required: false
    NameRequiredTypeDescription
    err true ErrorThe Error object if an error occurred, null otherwise.
    result objectThe deserialized result object if an error did not occur. See OperationStatusResponse for more information.
    request objectThe HTTP Request object if an error did not occur.
    response streamThe HTTP Response stream if an error did not occur.
    Returns
    Promise<OperationStatusResponse>

    If a callback was passed as the last parameter then it returns the callback else returns a Promise.

    powerOffWithHttpOperationResponse(resourceGroupName, vmName, options)

    The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine.

    function powerOffWithHttpOperationResponse(resourceGroupName, vmName, options)
    Parameters
    resourceGroupName
    string

    The name of the resource group.

    vmName
    string

    The name of the virtual machine.

    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    customHeaders object

    Headers that will be added to the request

    Returns
    Promise<HttpOperationResponse>

    A promise is returned

    redeploy(resourceGroupName, vmName, options, optionalCallback)

    The operation to redeploy a virtual machine.

    function redeploy(resourceGroupName, vmName, options, optionalCallback)
    Parameters
    resourceGroupName
    string

    The name of the resource group.

    vmName
    string

    The name of the virtual machine.

    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    customHeaders object

    Headers that will be added to the request

    optionalCallback
    function

    The optional callback.

    required: false
    NameRequiredTypeDescription
    err true ErrorThe Error object if an error occurred, null otherwise.
    result objectThe deserialized result object if an error did not occur. See OperationStatusResponse for more information.
    request objectThe HTTP Request object if an error did not occur.
    response streamThe HTTP Response stream if an error did not occur.
    Returns
    Promise<OperationStatusResponse>

    If a callback was passed as the last parameter then it returns the callback else returns a Promise.

    redeployWithHttpOperationResponse(resourceGroupName, vmName, options)

    The operation to redeploy a virtual machine.

    function redeployWithHttpOperationResponse(resourceGroupName, vmName, options)
    Parameters
    resourceGroupName
    string

    The name of the resource group.

    vmName
    string

    The name of the virtual machine.

    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    customHeaders object

    Headers that will be added to the request

    Returns
    Promise<HttpOperationResponse>

    A promise is returned

    restart(resourceGroupName, vmName, options, optionalCallback)

    The operation to restart a virtual machine.

    function restart(resourceGroupName, vmName, options, optionalCallback)
    Parameters
    resourceGroupName
    string

    The name of the resource group.

    vmName
    string

    The name of the virtual machine.

    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    customHeaders object

    Headers that will be added to the request

    optionalCallback
    function

    The optional callback.

    required: false
    NameRequiredTypeDescription
    err true ErrorThe Error object if an error occurred, null otherwise.
    result objectThe deserialized result object if an error did not occur. See OperationStatusResponse for more information.
    request objectThe HTTP Request object if an error did not occur.
    response streamThe HTTP Response stream if an error did not occur.
    Returns
    Promise<OperationStatusResponse>

    If a callback was passed as the last parameter then it returns the callback else returns a Promise.

    restartWithHttpOperationResponse(resourceGroupName, vmName, options)

    The operation to restart a virtual machine.

    function restartWithHttpOperationResponse(resourceGroupName, vmName, options)
    Parameters
    resourceGroupName
    string

    The name of the resource group.

    vmName
    string

    The name of the virtual machine.

    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    customHeaders object

    Headers that will be added to the request

    Returns
    Promise<HttpOperationResponse>

    A promise is returned

    runCommand(resourceGroupName, vmName, parameters, options, optionalCallback)

    Run command on the VM.

    function runCommand(resourceGroupName, vmName, parameters, options, optionalCallback)
    Parameters
    resourceGroupName
    string

    The name of the resource group.

    vmName
    string

    The name of the virtual machine.

    parameters
    object

    Parameters supplied to the Run command operation.

    NameRequiredTypeDescription
    commandId true string

    The run command id.

    script array

    Optional. The script to be executed. When this value is given, the given script will override the default script of the command.

    parameters array

    The run command parameters.

    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    customHeaders object

    Headers that will be added to the request

    optionalCallback
    function

    The optional callback.

    required: false
    NameRequiredTypeDescription
    err true ErrorThe Error object if an error occurred, null otherwise.
    result objectThe deserialized result object if an error did not occur. See RunCommandResult for more information.
    request objectThe HTTP Request object if an error did not occur.
    response streamThe HTTP Response stream if an error did not occur.
    Returns
    Promise<RunCommandResult>

    If a callback was passed as the last parameter then it returns the callback else returns a Promise.

    runCommandWithHttpOperationResponse(resourceGroupName, vmName, parameters, options)

    Run command on the VM.

    function runCommandWithHttpOperationResponse(resourceGroupName, vmName, parameters, options)
    Parameters
    resourceGroupName
    string

    The name of the resource group.

    vmName
    string

    The name of the virtual machine.

    parameters
    object

    Parameters supplied to the Run command operation.

    NameRequiredTypeDescription
    commandId true string

    The run command id.

    script array

    Optional. The script to be executed. When this value is given, the given script will override the default script of the command.

    parameters array

    The run command parameters.

    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    customHeaders object

    Headers that will be added to the request

    Returns
    Promise<HttpOperationResponse>

    A promise is returned

    start(resourceGroupName, vmName, options, optionalCallback)

    The operation to start a virtual machine.

    function start(resourceGroupName, vmName, options, optionalCallback)
    Parameters
    resourceGroupName
    string

    The name of the resource group.

    vmName
    string

    The name of the virtual machine.

    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    customHeaders object

    Headers that will be added to the request

    optionalCallback
    function

    The optional callback.

    required: false
    NameRequiredTypeDescription
    err true ErrorThe Error object if an error occurred, null otherwise.
    result objectThe deserialized result object if an error did not occur. See OperationStatusResponse for more information.
    request objectThe HTTP Request object if an error did not occur.
    response streamThe HTTP Response stream if an error did not occur.
    Returns
    Promise<OperationStatusResponse>

    If a callback was passed as the last parameter then it returns the callback else returns a Promise.

    startWithHttpOperationResponse(resourceGroupName, vmName, options)

    The operation to start a virtual machine.

    function startWithHttpOperationResponse(resourceGroupName, vmName, options)
    Parameters
    resourceGroupName
    string

    The name of the resource group.

    vmName
    string

    The name of the virtual machine.

    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    customHeaders object

    Headers that will be added to the request

    Returns
    Promise<HttpOperationResponse>

    A promise is returned

    update(resourceGroupName, vmName, parameters, options, optionalCallback)

    The operation to update a virtual machine.

    function update(resourceGroupName, vmName, parameters, options, optionalCallback)
    Parameters
    resourceGroupName
    string

    The name of the resource group.

    vmName
    string

    The name of the virtual machine.

    parameters
    object

    Parameters supplied to the Update Virtual Machine operation.

    NameRequiredTypeDescription
    plan object

    Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click Want to deploy programmatically, Get Started ->. Enter any required information and then click Save.

    hardwareProfile object

    Specifies the hardware settings for the virtual machine.

    storageProfile object

    Specifies the storage settings for the virtual machine disks.

    osProfile object

    Specifies the operating system settings for the virtual machine.

    networkProfile object

    Specifies the network interfaces of the virtual machine.

    diagnosticsProfile object

    Specifies the boot diagnostic settings state.

    Minimum api-version: 2015-06-15.

    availabilitySet object

    Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see Manage the availability of virtual machines.

    For more information on Azure planned maintainance, see Planned maintenance for virtual machines in Azure

    Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set.

    licenseType string

    Specifies that the image or disk that is being used was licensed on-premises. This element is only used for images that contain the Windows Server operating system.

    Possible values are:

    Windows_Client

    Windows_Server

    If this element is included in a request for an update, the value must match the initial value. This value cannot be updated.

    For more information, see Azure Hybrid Use Benefit for Windows Server

    Minimum api-version: 2015-06-15

    identity object

    The identity of the virtual machine, if configured.

    zones array

    The virtual machine zones.

    tags object

    Resource tags

    plan
    object

    Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click Want to deploy programmatically, Get Started ->. Enter any required information and then click Save.

    NameRequiredTypeDescription
    name string

    The plan ID.

    publisher string

    The publisher ID.

    product string

    Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element.

    promotionCode string

    The promotion code.

    hardwareProfile
    object

    Specifies the hardware settings for the virtual machine.

    NameRequiredTypeDescription
    vmSize string

    Specifies the size of the virtual machine. For more information about virtual machine sizes, see Sizes for virtual machines.

    The available VM sizes depend on region and availability set. For a list of available sizes use these APIs:

    List all available virtual machine sizes in an availability set

    List all available virtual machine sizes in a region

    List all available virtual machine sizes for resizing. Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2_v2', 'Standard_A4_v2', 'Standard_A8_v2', 'Standard_A2m_v2', 'Standard_A4m_v2', 'Standard_A8m_v2', 'Standard_B1s', 'Standard_B1ms', 'Standard_B2s', 'Standard_B2ms', 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D2', 'Standard_D3', 'Standard_D4', 'Standard_D11', 'Standard_D12', 'Standard_D13', 'Standard_D14', 'Standard_D1_v2', 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', 'Standard_D2_v3', 'Standard_D4_v3', 'Standard_D8_v3', 'Standard_D16_v3', 'Standard_D32_v3', 'Standard_D64_v3', 'Standard_D2s_v3', 'Standard_D4s_v3', 'Standard_D8s_v3', 'Standard_D16s_v3', 'Standard_D32s_v3', 'Standard_D64s_v3', 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', 'Standard_D14_v2', 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', 'Standard_DS13', 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', 'Standard_DS3_v2', 'Standard_DS4_v2', 'Standard_DS5_v2', 'Standard_DS11_v2', 'Standard_DS12_v2', 'Standard_DS13_v2', 'Standard_DS14_v2', 'Standard_DS15_v2', 'Standard_DS13-4_v2', 'Standard_DS13-2_v2', 'Standard_DS14-8_v2', 'Standard_DS14-4_v2', 'Standard_E2_v3', 'Standard_E4_v3', 'Standard_E8_v3', 'Standard_E16_v3', 'Standard_E32_v3', 'Standard_E64_v3', 'Standard_E2s_v3', 'Standard_E4s_v3', 'Standard_E8s_v3', 'Standard_E16s_v3', 'Standard_E32s_v3', 'Standard_E64s_v3', 'Standard_E32-16_v3', 'Standard_E32-8s_v3', 'Standard_E64-32s_v3', 'Standard_E64-16s_v3', 'Standard_F1', 'Standard_F2', 'Standard_F4', 'Standard_F8', 'Standard_F16', 'Standard_F1s', 'Standard_F2s', 'Standard_F4s', 'Standard_F8s', 'Standard_F16s', 'Standard_F2s_v2', 'Standard_F4s_v2', 'Standard_F8s_v2', 'Standard_F16s_v2', 'Standard_F32s_v2', 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5', 'Standard_GS4-8', 'Standard_GS4-4', 'Standard_GS5-16', 'Standard_GS5-8', 'Standard_H8', 'Standard_H16', 'Standard_H8m', 'Standard_H16m', 'Standard_H16r', 'Standard_H16mr', 'Standard_L4s', 'Standard_L8s', 'Standard_L16s', 'Standard_L32s', 'Standard_M64s', 'Standard_M64ms', 'Standard_M128s', 'Standard_M128ms', 'Standard_M64-32ms', 'Standard_M64-16ms', 'Standard_M128-64ms', 'Standard_M128-32ms', 'Standard_NC6', 'Standard_NC12', 'Standard_NC24', 'Standard_NC24r', 'Standard_NC6s_v2', 'Standard_NC12s_v2', 'Standard_NC24s_v2', 'Standard_NC24rs_v2', 'Standard_NC6s_v3', 'Standard_NC12s_v3', 'Standard_NC24s_v3', 'Standard_NC24rs_v3', 'Standard_ND6s', 'Standard_ND12s', 'Standard_ND24s', 'Standard_ND24rs', 'Standard_NV6', 'Standard_NV12', 'Standard_NV24'

    storageProfile
    object

    Specifies the storage settings for the virtual machine disks.

    NameRequiredTypeDescription
    imageReference object

    Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations.

    osDisk object

    Specifies information about the operating system disk used by the virtual machine.

    For more information about disks, see About disks and VHDs for Azure virtual machines.

    dataDisks array

    Specifies the parameters that are used to add a data disk to a virtual machine.

    For more information about disks, see About disks and VHDs for Azure virtual machines.

    imageReference
    object

    Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations.

    NameRequiredTypeDescription
    publisher string

    The image publisher.

    offer string

    Specifies the offer of the platform image or marketplace image used to create the virtual machine.

    sku string

    The image SKU.

    version string

    Specifies the version of the platform image or marketplace image used to create the virtual machine. The allowed formats are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal numbers. Specify 'latest' to use the latest version of an image available at deploy time. Even if you use 'latest', the VM image will not automatically update after deploy time even if a new version becomes available.

    id string

    Resource Id

    osDisk
    object

    Specifies information about the operating system disk used by the virtual machine.

    For more information about disks, see About disks and VHDs for Azure virtual machines.

    NameRequiredTypeDescription
    osType string

    This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD.

    Possible values are:

    Windows

    Linux. Possible values include: 'Windows', 'Linux'

    encryptionSettings object

    Specifies the encryption settings for the OS Disk.

    Minimum api-version: 2015-06-15

    name string

    The disk name.

    vhd object

    The virtual hard disk.

    image object

    The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist.

    caching string

    Specifies the caching requirements.

    Possible values are:

    None

    ReadOnly

    ReadWrite

    Default: None for Standard storage. ReadOnly for Premium storage. Possible values include: 'None', 'ReadOnly', 'ReadWrite'

    writeAcceleratorEnabled boolean

    Specifies whether writeAccelerator should be enabled or disabled on the disk.

    createOption true string

    Specifies how the virtual machine should be created.

    Possible values are:

    Attach \u2013 This value is used when you are using a specialized disk to create the virtual machine.

    FromImage \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Possible values include: 'FromImage', 'Empty', 'Attach'

    diskSizeGB number

    Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image.

    This value cannot be larger than 1023 GB

    managedDisk object

    The managed disk parameters.

    encryptionSettings
    object

    Specifies the encryption settings for the OS Disk.

    Minimum api-version: 2015-06-15

    NameRequiredTypeDescription
    diskEncryptionKey object

    Specifies the location of the disk encryption key, which is a Key Vault Secret.

    keyEncryptionKey object

    Specifies the location of the key encryption key in Key Vault.

    enabled boolean

    Specifies whether disk encryption should be enabled on the virtual machine.

    diskEncryptionKey
    object

    Specifies the location of the disk encryption key, which is a Key Vault Secret.

    NameRequiredTypeDescription
    secretUrl true string

    The URL referencing a secret in a Key Vault.

    sourceVault true object

    The relative URL of the Key Vault containing the secret.

    keyEncryptionKey
    object

    Specifies the location of the key encryption key in Key Vault.

    NameRequiredTypeDescription
    keyUrl true string

    The URL referencing a key encryption key in Key Vault.

    sourceVault true object

    The relative URL of the Key Vault containing the key.

    image
    object

    The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist.

    NameRequiredTypeDescription
    uri string

    Specifies the virtual hard disk's uri.

    managedDisk
    object

    The managed disk parameters.

    NameRequiredTypeDescription
    storageAccountType string

    Specifies the storage account type for the managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS'

    id string

    Resource Id

    osProfile
    object

    Specifies the operating system settings for the virtual machine.

    NameRequiredTypeDescription
    computerName string

    Specifies the host OS name of the virtual machine.

    Max-length (Windows): 15 characters

    Max-length (Linux): 64 characters.

    For naming conventions and restrictions see Azure infrastructure services implementation guidelines.

    adminUsername string

    Specifies the name of the administrator account.

    Windows-only restriction: Cannot end in "."

    Disallowed values: "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5".

    Minimum-length (Linux): 1 character

    Max-length (Linux): 64 characters

    Max-length (Windows): 20 characters

  • For root access to the Linux VM, see Using root privileges on Linux virtual machines in Azure
  • For a list of built-in system users on Linux that should not be used in this field, see Selecting User Names for Linux on Azure

  • adminPassword string

    Specifies the password of the administrator account.

    Minimum-length (Windows): 8 characters

    Minimum-length (Linux): 6 characters

    Max-length (Windows): 123 characters

    Max-length (Linux): 72 characters

    Complexity requirements: 3 out of 4 conditions below need to be fulfilled
    Has lower characters
    Has upper characters
    Has a digit
    Has a special character (Regex match [\W_])

    Disallowed values: "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!"

    For resetting the password, see How to reset the Remote Desktop service or its login password in a Windows VM

    For resetting root password, see Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension

    customData string

    Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes.

    For using cloud-init for your VM, see Using cloud-init to customize a Linux VM during creation

    windowsConfiguration object

    Specifies Windows operating system settings on the virtual machine.

    linuxConfiguration object

    Specifies the Linux operating system settings on the virtual machine.

    For a list of supported Linux distributions, see Linux on Azure-Endorsed Distributions

    For running non-endorsed distributions, see Information for Non-Endorsed Distributions.

    secrets array

    Specifies set of certificates that should be installed onto the virtual machine.

    windowsConfiguration
    object

    Specifies Windows operating system settings on the virtual machine.

    NameRequiredTypeDescription
    provisionVMAgent boolean

    Indicates whether virtual machine agent should be provisioned on the virtual machine.

    When this property is not specified in the request body, default behavior is to set it to true. This will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later.

    enableAutomaticUpdates boolean

    Indicates whether virtual machine is enabled for automatic updates.

    timeZone string

    Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time"

    additionalUnattendContent array

    Specifies additional base-64 encoded XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup.

    winRM object

    Specifies the Windows Remote Management listeners. This enables remote Windows PowerShell.

    winRM
    object

    Specifies the Windows Remote Management listeners. This enables remote Windows PowerShell.

    NameRequiredTypeDescription
    listeners array

    The list of Windows Remote Management listeners

    linuxConfiguration
    object

    Specifies the Linux operating system settings on the virtual machine.

    For a list of supported Linux distributions, see Linux on Azure-Endorsed Distributions

    For running non-endorsed distributions, see Information for Non-Endorsed Distributions.

    NameRequiredTypeDescription
    disablePasswordAuthentication boolean

    Specifies whether password authentication should be disabled.

    ssh object

    Specifies the ssh key configuration for a Linux OS.

    ssh
    object

    Specifies the ssh key configuration for a Linux OS.

    NameRequiredTypeDescription
    publicKeys array

    The list of SSH public keys used to authenticate with linux based VMs.

    networkProfile
    object

    Specifies the network interfaces of the virtual machine.

    NameRequiredTypeDescription
    networkInterfaces array

    Specifies the list of resource Ids for the network interfaces associated with the virtual machine.

    diagnosticsProfile
    object

    Specifies the boot diagnostic settings state.

    Minimum api-version: 2015-06-15.

    NameRequiredTypeDescription
    bootDiagnostics object

    Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.

    For Linux Virtual Machines, you can easily view the output of your console log.

    For both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from the hypervisor.

    bootDiagnostics
    object

    Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.

    For Linux Virtual Machines, you can easily view the output of your console log.

    For both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from the hypervisor.

    NameRequiredTypeDescription
    enabled boolean

    Whether boot diagnostics should be enabled on the Virtual Machine.

    storageUri string

    Uri of the storage account to use for placing the console output and screenshot.

    availabilitySet
    object

    Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see Manage the availability of virtual machines.

    For more information on Azure planned maintainance, see Planned maintenance for virtual machines in Azure

    Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set.

    NameRequiredTypeDescription
    id string

    Resource Id

    identity
    object

    The identity of the virtual machine, if configured.

    NameRequiredTypeDescription
    type string

    The type of identity used for the virtual machine. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the virtual machine. Possible values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None'

    identityIds array

    The list of user identities associated with the Virtual Machine. The user identity references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'.

    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    customHeaders object

    Headers that will be added to the request

    optionalCallback
    function

    The optional callback.

    required: false
    NameRequiredTypeDescription
    err true ErrorThe Error object if an error occurred, null otherwise.
    result objectThe deserialized result object if an error did not occur. See VirtualMachine for more information.
    request objectThe HTTP Request object if an error did not occur.
    response streamThe HTTP Response stream if an error did not occur.
    Returns
    Promise<VirtualMachine>

    If a callback was passed as the last parameter then it returns the callback else returns a Promise.

    updateWithHttpOperationResponse(resourceGroupName, vmName, parameters, options)

    The operation to update a virtual machine.

    function updateWithHttpOperationResponse(resourceGroupName, vmName, parameters, options)
    Parameters
    resourceGroupName
    string

    The name of the resource group.

    vmName
    string

    The name of the virtual machine.

    parameters
    object

    Parameters supplied to the Update Virtual Machine operation.

    NameRequiredTypeDescription
    plan object

    Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click Want to deploy programmatically, Get Started ->. Enter any required information and then click Save.

    hardwareProfile object

    Specifies the hardware settings for the virtual machine.

    storageProfile object

    Specifies the storage settings for the virtual machine disks.

    osProfile object

    Specifies the operating system settings for the virtual machine.

    networkProfile object

    Specifies the network interfaces of the virtual machine.

    diagnosticsProfile object

    Specifies the boot diagnostic settings state.

    Minimum api-version: 2015-06-15.

    availabilitySet object

    Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see Manage the availability of virtual machines.

    For more information on Azure planned maintainance, see Planned maintenance for virtual machines in Azure

    Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set.

    licenseType string

    Specifies that the image or disk that is being used was licensed on-premises. This element is only used for images that contain the Windows Server operating system.

    Possible values are:

    Windows_Client

    Windows_Server

    If this element is included in a request for an update, the value must match the initial value. This value cannot be updated.

    For more information, see Azure Hybrid Use Benefit for Windows Server

    Minimum api-version: 2015-06-15

    identity object

    The identity of the virtual machine, if configured.

    zones array

    The virtual machine zones.

    tags object

    Resource tags

    plan
    object

    Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click Want to deploy programmatically, Get Started ->. Enter any required information and then click Save.

    NameRequiredTypeDescription
    name string

    The plan ID.

    publisher string

    The publisher ID.

    product string

    Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element.

    promotionCode string

    The promotion code.

    hardwareProfile
    object

    Specifies the hardware settings for the virtual machine.

    NameRequiredTypeDescription
    vmSize string

    Specifies the size of the virtual machine. For more information about virtual machine sizes, see Sizes for virtual machines.

    The available VM sizes depend on region and availability set. For a list of available sizes use these APIs:

    List all available virtual machine sizes in an availability set

    List all available virtual machine sizes in a region

    List all available virtual machine sizes for resizing. Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2_v2', 'Standard_A4_v2', 'Standard_A8_v2', 'Standard_A2m_v2', 'Standard_A4m_v2', 'Standard_A8m_v2', 'Standard_B1s', 'Standard_B1ms', 'Standard_B2s', 'Standard_B2ms', 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D2', 'Standard_D3', 'Standard_D4', 'Standard_D11', 'Standard_D12', 'Standard_D13', 'Standard_D14', 'Standard_D1_v2', 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', 'Standard_D2_v3', 'Standard_D4_v3', 'Standard_D8_v3', 'Standard_D16_v3', 'Standard_D32_v3', 'Standard_D64_v3', 'Standard_D2s_v3', 'Standard_D4s_v3', 'Standard_D8s_v3', 'Standard_D16s_v3', 'Standard_D32s_v3', 'Standard_D64s_v3', 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', 'Standard_D14_v2', 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', 'Standard_DS13', 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', 'Standard_DS3_v2', 'Standard_DS4_v2', 'Standard_DS5_v2', 'Standard_DS11_v2', 'Standard_DS12_v2', 'Standard_DS13_v2', 'Standard_DS14_v2', 'Standard_DS15_v2', 'Standard_DS13-4_v2', 'Standard_DS13-2_v2', 'Standard_DS14-8_v2', 'Standard_DS14-4_v2', 'Standard_E2_v3', 'Standard_E4_v3', 'Standard_E8_v3', 'Standard_E16_v3', 'Standard_E32_v3', 'Standard_E64_v3', 'Standard_E2s_v3', 'Standard_E4s_v3', 'Standard_E8s_v3', 'Standard_E16s_v3', 'Standard_E32s_v3', 'Standard_E64s_v3', 'Standard_E32-16_v3', 'Standard_E32-8s_v3', 'Standard_E64-32s_v3', 'Standard_E64-16s_v3', 'Standard_F1', 'Standard_F2', 'Standard_F4', 'Standard_F8', 'Standard_F16', 'Standard_F1s', 'Standard_F2s', 'Standard_F4s', 'Standard_F8s', 'Standard_F16s', 'Standard_F2s_v2', 'Standard_F4s_v2', 'Standard_F8s_v2', 'Standard_F16s_v2', 'Standard_F32s_v2', 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_G1', 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5', 'Standard_GS4-8', 'Standard_GS4-4', 'Standard_GS5-16', 'Standard_GS5-8', 'Standard_H8', 'Standard_H16', 'Standard_H8m', 'Standard_H16m', 'Standard_H16r', 'Standard_H16mr', 'Standard_L4s', 'Standard_L8s', 'Standard_L16s', 'Standard_L32s', 'Standard_M64s', 'Standard_M64ms', 'Standard_M128s', 'Standard_M128ms', 'Standard_M64-32ms', 'Standard_M64-16ms', 'Standard_M128-64ms', 'Standard_M128-32ms', 'Standard_NC6', 'Standard_NC12', 'Standard_NC24', 'Standard_NC24r', 'Standard_NC6s_v2', 'Standard_NC12s_v2', 'Standard_NC24s_v2', 'Standard_NC24rs_v2', 'Standard_NC6s_v3', 'Standard_NC12s_v3', 'Standard_NC24s_v3', 'Standard_NC24rs_v3', 'Standard_ND6s', 'Standard_ND12s', 'Standard_ND24s', 'Standard_ND24rs', 'Standard_NV6', 'Standard_NV12', 'Standard_NV24'

    storageProfile
    object

    Specifies the storage settings for the virtual machine disks.

    NameRequiredTypeDescription
    imageReference object

    Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations.

    osDisk object

    Specifies information about the operating system disk used by the virtual machine.

    For more information about disks, see About disks and VHDs for Azure virtual machines.

    dataDisks array

    Specifies the parameters that are used to add a data disk to a virtual machine.

    For more information about disks, see About disks and VHDs for Azure virtual machines.

    imageReference
    object

    Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations.

    NameRequiredTypeDescription
    publisher string

    The image publisher.

    offer string

    Specifies the offer of the platform image or marketplace image used to create the virtual machine.

    sku string

    The image SKU.

    version string

    Specifies the version of the platform image or marketplace image used to create the virtual machine. The allowed formats are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal numbers. Specify 'latest' to use the latest version of an image available at deploy time. Even if you use 'latest', the VM image will not automatically update after deploy time even if a new version becomes available.

    id string

    Resource Id

    osDisk
    object

    Specifies information about the operating system disk used by the virtual machine.

    For more information about disks, see About disks and VHDs for Azure virtual machines.

    NameRequiredTypeDescription
    osType string

    This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD.

    Possible values are:

    Windows

    Linux. Possible values include: 'Windows', 'Linux'

    encryptionSettings object

    Specifies the encryption settings for the OS Disk.

    Minimum api-version: 2015-06-15

    name string

    The disk name.

    vhd object

    The virtual hard disk.

    image object

    The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist.

    caching string

    Specifies the caching requirements.

    Possible values are:

    None

    ReadOnly

    ReadWrite

    Default: None for Standard storage. ReadOnly for Premium storage. Possible values include: 'None', 'ReadOnly', 'ReadWrite'

    writeAcceleratorEnabled boolean

    Specifies whether writeAccelerator should be enabled or disabled on the disk.

    createOption true string

    Specifies how the virtual machine should be created.

    Possible values are:

    Attach \u2013 This value is used when you are using a specialized disk to create the virtual machine.

    FromImage \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Possible values include: 'FromImage', 'Empty', 'Attach'

    diskSizeGB number

    Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image.

    This value cannot be larger than 1023 GB

    managedDisk object

    The managed disk parameters.

    encryptionSettings
    object

    Specifies the encryption settings for the OS Disk.

    Minimum api-version: 2015-06-15

    NameRequiredTypeDescription
    diskEncryptionKey object

    Specifies the location of the disk encryption key, which is a Key Vault Secret.

    keyEncryptionKey object

    Specifies the location of the key encryption key in Key Vault.

    enabled boolean

    Specifies whether disk encryption should be enabled on the virtual machine.

    diskEncryptionKey
    object

    Specifies the location of the disk encryption key, which is a Key Vault Secret.

    NameRequiredTypeDescription
    secretUrl true string

    The URL referencing a secret in a Key Vault.

    sourceVault true object

    The relative URL of the Key Vault containing the secret.

    keyEncryptionKey
    object

    Specifies the location of the key encryption key in Key Vault.

    NameRequiredTypeDescription
    keyUrl true string

    The URL referencing a key encryption key in Key Vault.

    sourceVault true object

    The relative URL of the Key Vault containing the key.

    image
    object

    The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist.

    NameRequiredTypeDescription
    uri string

    Specifies the virtual hard disk's uri.

    managedDisk
    object

    The managed disk parameters.

    NameRequiredTypeDescription
    storageAccountType string

    Specifies the storage account type for the managed disk. Possible values are: Standard_LRS or Premium_LRS. Possible values include: 'Standard_LRS', 'Premium_LRS'

    id string

    Resource Id

    osProfile
    object

    Specifies the operating system settings for the virtual machine.

    NameRequiredTypeDescription
    computerName string

    Specifies the host OS name of the virtual machine.

    Max-length (Windows): 15 characters

    Max-length (Linux): 64 characters.

    For naming conventions and restrictions see Azure infrastructure services implementation guidelines.

    adminUsername string

    Specifies the name of the administrator account.

    Windows-only restriction: Cannot end in "."

    Disallowed values: "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5".

    Minimum-length (Linux): 1 character

    Max-length (Linux): 64 characters

    Max-length (Windows): 20 characters

  • For root access to the Linux VM, see Using root privileges on Linux virtual machines in Azure
  • For a list of built-in system users on Linux that should not be used in this field, see Selecting User Names for Linux on Azure

  • adminPassword string

    Specifies the password of the administrator account.

    Minimum-length (Windows): 8 characters

    Minimum-length (Linux): 6 characters

    Max-length (Windows): 123 characters

    Max-length (Linux): 72 characters

    Complexity requirements: 3 out of 4 conditions below need to be fulfilled
    Has lower characters
    Has upper characters
    Has a digit
    Has a special character (Regex match [\W_])

    Disallowed values: "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!"

    For resetting the password, see How to reset the Remote Desktop service or its login password in a Windows VM

    For resetting root password, see Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension

    customData string

    Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes.

    For using cloud-init for your VM, see Using cloud-init to customize a Linux VM during creation

    windowsConfiguration object

    Specifies Windows operating system settings on the virtual machine.

    linuxConfiguration object

    Specifies the Linux operating system settings on the virtual machine.

    For a list of supported Linux distributions, see Linux on Azure-Endorsed Distributions

    For running non-endorsed distributions, see Information for Non-Endorsed Distributions.

    secrets array

    Specifies set of certificates that should be installed onto the virtual machine.

    windowsConfiguration
    object

    Specifies Windows operating system settings on the virtual machine.

    NameRequiredTypeDescription
    provisionVMAgent boolean

    Indicates whether virtual machine agent should be provisioned on the virtual machine.

    When this property is not specified in the request body, default behavior is to set it to true. This will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later.

    enableAutomaticUpdates boolean

    Indicates whether virtual machine is enabled for automatic updates.

    timeZone string

    Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time"

    additionalUnattendContent array

    Specifies additional base-64 encoded XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup.

    winRM object

    Specifies the Windows Remote Management listeners. This enables remote Windows PowerShell.

    winRM
    object

    Specifies the Windows Remote Management listeners. This enables remote Windows PowerShell.

    NameRequiredTypeDescription
    listeners array

    The list of Windows Remote Management listeners

    linuxConfiguration
    object

    Specifies the Linux operating system settings on the virtual machine.

    For a list of supported Linux distributions, see Linux on Azure-Endorsed Distributions

    For running non-endorsed distributions, see Information for Non-Endorsed Distributions.

    NameRequiredTypeDescription
    disablePasswordAuthentication boolean

    Specifies whether password authentication should be disabled.

    ssh object

    Specifies the ssh key configuration for a Linux OS.

    ssh
    object

    Specifies the ssh key configuration for a Linux OS.

    NameRequiredTypeDescription
    publicKeys array

    The list of SSH public keys used to authenticate with linux based VMs.

    networkProfile
    object

    Specifies the network interfaces of the virtual machine.

    NameRequiredTypeDescription
    networkInterfaces array

    Specifies the list of resource Ids for the network interfaces associated with the virtual machine.

    diagnosticsProfile
    object

    Specifies the boot diagnostic settings state.

    Minimum api-version: 2015-06-15.

    NameRequiredTypeDescription
    bootDiagnostics object

    Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.

    For Linux Virtual Machines, you can easily view the output of your console log.

    For both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from the hypervisor.

    bootDiagnostics
    object

    Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.

    For Linux Virtual Machines, you can easily view the output of your console log.

    For both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from the hypervisor.

    NameRequiredTypeDescription
    enabled boolean

    Whether boot diagnostics should be enabled on the Virtual Machine.

    storageUri string

    Uri of the storage account to use for placing the console output and screenshot.

    availabilitySet
    object

    Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see Manage the availability of virtual machines.

    For more information on Azure planned maintainance, see Planned maintenance for virtual machines in Azure

    Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set.

    NameRequiredTypeDescription
    id string

    Resource Id

    identity
    object

    The identity of the virtual machine, if configured.

    NameRequiredTypeDescription
    type string

    The type of identity used for the virtual machine. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the virtual machine. Possible values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None'

    identityIds array

    The list of user identities associated with the Virtual Machine. The user identity references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'.

    options
    object

    Optional Parameters.

    required: false
    NameRequiredTypeDescription
    customHeaders object

    Headers that will be added to the request

    Returns
    Promise<HttpOperationResponse>

    A promise is returned