diff --git a/lib/services/computeManagement2/lib/computeManagementClient.d.ts b/lib/services/computeManagement2/lib/computeManagementClient.d.ts index 6726ab14f3..901a0d83cb 100644 --- a/lib/services/computeManagement2/lib/computeManagementClient.d.ts +++ b/lib/services/computeManagement2/lib/computeManagementClient.d.ts @@ -60,9 +60,9 @@ export default class ComputeManagementClient extends AzureServiceClient { virtualMachineExtensions: operations.VirtualMachineExtensions; virtualMachineImages: operations.VirtualMachineImages; usageOperations: operations.UsageOperations; + virtualMachines: operations.VirtualMachines; virtualMachineSizes: operations.VirtualMachineSizes; images: operations.Images; - virtualMachines: operations.VirtualMachines; virtualMachineScaleSets: operations.VirtualMachineScaleSets; virtualMachineScaleSetExtensions: operations.VirtualMachineScaleSetExtensions; virtualMachineScaleSetRollingUpgrades: operations.VirtualMachineScaleSetRollingUpgrades; diff --git a/lib/services/computeManagement2/lib/computeManagementClient.js b/lib/services/computeManagement2/lib/computeManagementClient.js index 57e95a4cf4..b610b4618f 100644 --- a/lib/services/computeManagement2/lib/computeManagementClient.js +++ b/lib/services/computeManagement2/lib/computeManagementClient.js @@ -77,9 +77,9 @@ class ComputeManagementClient extends ServiceClient { this.virtualMachineExtensions = new operations.VirtualMachineExtensions(this); this.virtualMachineImages = new operations.VirtualMachineImages(this); this.usageOperations = new operations.UsageOperations(this); + this.virtualMachines = new operations.VirtualMachines(this); this.virtualMachineSizes = new operations.VirtualMachineSizes(this); this.images = new operations.Images(this); - this.virtualMachines = new operations.VirtualMachines(this); this.virtualMachineScaleSets = new operations.VirtualMachineScaleSets(this); this.virtualMachineScaleSetExtensions = new operations.VirtualMachineScaleSetExtensions(this); this.virtualMachineScaleSetRollingUpgrades = new operations.VirtualMachineScaleSetRollingUpgrades(this); diff --git a/lib/services/computeManagement2/lib/models/index.d.ts b/lib/services/computeManagement2/lib/models/index.d.ts index e6ba395fff..c19fceec38 100644 --- a/lib/services/computeManagement2/lib/models/index.d.ts +++ b/lib/services/computeManagement2/lib/models/index.d.ts @@ -7005,27 +7005,27 @@ export interface ListUsagesResult extends Array { /** * @class - * Initializes a new instance of the ImageListResult class. + * Initializes a new instance of the VirtualMachineListResult class. * @constructor - * The List Image operation response. + * The List Virtual Machine operation response. * - * @member {string} [nextLink] The uri to fetch the next page of Images. Call - * ListNext() with this to fetch the next page of Images. + * @member {string} [nextLink] The URI to fetch the next page of VMs. Call + * ListNext() with this URI to fetch the next page of Virtual Machines. */ -export interface ImageListResult extends Array { +export interface VirtualMachineListResult extends Array { nextLink?: string; } /** * @class - * Initializes a new instance of the VirtualMachineListResult class. + * Initializes a new instance of the ImageListResult class. * @constructor - * The List Virtual Machine operation response. + * The List Image operation response. * - * @member {string} [nextLink] The URI to fetch the next page of VMs. Call - * ListNext() with this URI to fetch the next page of Virtual Machines. + * @member {string} [nextLink] The uri to fetch the next page of Images. Call + * ListNext() with this to fetch the next page of Images. */ -export interface VirtualMachineListResult extends Array { +export interface ImageListResult extends Array { nextLink?: string; } diff --git a/lib/services/computeManagement2/lib/models/index.js b/lib/services/computeManagement2/lib/models/index.js index 0e0ca87e8e..fcbbc7572e 100644 --- a/lib/services/computeManagement2/lib/models/index.js +++ b/lib/services/computeManagement2/lib/models/index.js @@ -205,8 +205,8 @@ exports.ComputeOperationListResult = require('./computeOperationListResult'); exports.AvailabilitySetListResult = require('./availabilitySetListResult'); exports.VirtualMachineSizeListResult = require('./virtualMachineSizeListResult'); exports.ListUsagesResult = require('./listUsagesResult'); -exports.ImageListResult = require('./imageListResult'); exports.VirtualMachineListResult = require('./virtualMachineListResult'); +exports.ImageListResult = require('./imageListResult'); exports.VirtualMachineScaleSetListResult = require('./virtualMachineScaleSetListResult'); exports.VirtualMachineScaleSetListWithLinkResult = require('./virtualMachineScaleSetListWithLinkResult'); exports.VirtualMachineScaleSetListSkusResult = require('./virtualMachineScaleSetListSkusResult'); diff --git a/lib/services/computeManagement2/lib/operations/index.d.ts b/lib/services/computeManagement2/lib/operations/index.d.ts index 548c1235cf..7c080b3d76 100644 --- a/lib/services/computeManagement2/lib/operations/index.d.ts +++ b/lib/services/computeManagement2/lib/operations/index.d.ts @@ -2246,19 +2246,19 @@ export interface UsageOperations { /** * @class - * VirtualMachineSizes + * VirtualMachines * __NOTE__: An instance of this class is automatically created for an * instance of the ComputeManagementClient. */ -export interface VirtualMachineSizes { +export interface VirtualMachines { /** - * This API is deprecated. Use [Resources - * Skus](https://docs.microsoft.com/en-us/rest/api/compute/resourceskus/list) + * Gets all the virtual machines under the specified subscription for the + * specified location. * - * @param {string} location The location upon which virtual-machine-sizes is - * queried. + * @param {string} location The location for which virtual machines under the + * subscription are queried. * * @param {object} [options] Optional Parameters. * @@ -2267,18 +2267,18 @@ export interface VirtualMachineSizes { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listWithHttpOperationResponse(location: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByLocationWithHttpOperationResponse(location: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * This API is deprecated. Use [Resources - * Skus](https://docs.microsoft.com/en-us/rest/api/compute/resourceskus/list) + * Gets all the virtual machines under the specified subscription for the + * specified location. * - * @param {string} location The location upon which virtual-machine-sizes is - * queried. + * @param {string} location The location for which virtual machines under the + * subscription are queried. * * @param {object} [options] Optional Parameters. * @@ -2292,7 +2292,7 @@ export interface VirtualMachineSizes { * * {Promise} A promise is returned. * - * @resolve {VirtualMachineSizeListResult} - The deserialized result object. + * @resolve {VirtualMachineListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -2300,97 +2300,38 @@ export interface VirtualMachineSizes { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {VirtualMachineSizeListResult} [result] - The deserialized result object if an error did not occur. - * See {@link VirtualMachineSizeListResult} for more + * {VirtualMachineListResult} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualMachineListResult} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - list(location: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - list(location: string, callback: ServiceCallback): void; - list(location: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * Images - * __NOTE__: An instance of this class is automatically created for an - * instance of the ComputeManagementClient. - */ -export interface Images { + listByLocation(location: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByLocation(location: string, callback: ServiceCallback): void; + listByLocation(location: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Create or update an image. + * Captures the VM by copying virtual hard disks of the VM and outputs a + * template that can be used to create similar VMs. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} imageName The name of the image. - * - * @param {object} parameters Parameters supplied to the Create Image - * operation. - * - * @param {object} [parameters.sourceVirtualMachine] The source virtual machine - * from which Image is created. - * - * @param {object} [parameters.storageProfile] Specifies the storage settings - * for the virtual machine disks. - * - * @param {object} [parameters.storageProfile.osDisk] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - * - * @param {string} parameters.storageProfile.osDisk.osType This property allows - * you to specify the type of the OS that is included in the disk if creating a - * VM from a custom image.

Possible values are:

**Windows** - *

**Linux**. Possible values include: 'Windows', 'Linux' - * - * @param {string} parameters.storageProfile.osDisk.osState The OS State. - * Possible values include: 'Generalized', 'Specialized' - * - * @param {object} [parameters.storageProfile.osDisk.snapshot] The snapshot. - * - * @param {object} [parameters.storageProfile.osDisk.managedDisk] The - * managedDisk. - * - * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource - * Id - * - * @param {string} [parameters.storageProfile.osDisk.blobUri] The Virtual Hard - * Disk. - * - * @param {string} [parameters.storageProfile.osDisk.caching] 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' - * - * @param {number} [parameters.storageProfile.osDisk.diskSizeGB] Specifies the - * size of empty data disks 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 - * - * @param {string} [parameters.storageProfile.osDisk.storageAccountType] - * Specifies the storage account type for the managed disk. UltraSSD_LRS cannot - * be used with OS Disk. Possible values include: 'Standard_LRS', - * 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' + * @param {string} vmName The name of the virtual machine. * - * @param {array} [parameters.storageProfile.dataDisks] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + * @param {object} parameters Parameters supplied to the Capture Virtual + * Machine operation. * - * @param {boolean} [parameters.storageProfile.zoneResilient] Specifies whether - * an image is zone resilient or not. Default is false. Zone resilient images - * can be created only in regions that provide Zone Redundant Storage (ZRS). + * @param {string} parameters.vhdPrefix The captured virtual hard disk's name + * prefix. * - * @param {string} parameters.location Resource location + * @param {string} parameters.destinationContainerName The destination + * container name. * - * @param {object} [parameters.tags] Resource tags + * @param {boolean} parameters.overwriteVhds Specifies whether to overwrite the + * destination virtual hard disk, in case of conflict. * * @param {object} [options] Optional Parameters. * @@ -2399,81 +2340,31 @@ export interface Images { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, imageName: string, parameters: models.Image, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + captureWithHttpOperationResponse(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineCaptureParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Create or update an image. + * Captures the VM by copying virtual hard disks of the VM and outputs a + * template that can be used to create similar VMs. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} imageName The name of the image. - * - * @param {object} parameters Parameters supplied to the Create Image - * operation. - * - * @param {object} [parameters.sourceVirtualMachine] The source virtual machine - * from which Image is created. - * - * @param {object} [parameters.storageProfile] Specifies the storage settings - * for the virtual machine disks. - * - * @param {object} [parameters.storageProfile.osDisk] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - * - * @param {string} parameters.storageProfile.osDisk.osType This property allows - * you to specify the type of the OS that is included in the disk if creating a - * VM from a custom image.

Possible values are:

**Windows** - *

**Linux**. Possible values include: 'Windows', 'Linux' - * - * @param {string} parameters.storageProfile.osDisk.osState The OS State. - * Possible values include: 'Generalized', 'Specialized' - * - * @param {object} [parameters.storageProfile.osDisk.snapshot] The snapshot. - * - * @param {object} [parameters.storageProfile.osDisk.managedDisk] The - * managedDisk. - * - * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource - * Id - * - * @param {string} [parameters.storageProfile.osDisk.blobUri] The Virtual Hard - * Disk. - * - * @param {string} [parameters.storageProfile.osDisk.caching] 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' - * - * @param {number} [parameters.storageProfile.osDisk.diskSizeGB] Specifies the - * size of empty data disks 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 - * - * @param {string} [parameters.storageProfile.osDisk.storageAccountType] - * Specifies the storage account type for the managed disk. UltraSSD_LRS cannot - * be used with OS Disk. Possible values include: 'Standard_LRS', - * 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' + * @param {string} vmName The name of the virtual machine. * - * @param {array} [parameters.storageProfile.dataDisks] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + * @param {object} parameters Parameters supplied to the Capture Virtual + * Machine operation. * - * @param {boolean} [parameters.storageProfile.zoneResilient] Specifies whether - * an image is zone resilient or not. Default is false. Zone resilient images - * can be created only in regions that provide Zone Redundant Storage (ZRS). + * @param {string} parameters.vhdPrefix The captured virtual hard disk's name + * prefix. * - * @param {string} parameters.location Resource location + * @param {string} parameters.destinationContainerName The destination + * container name. * - * @param {object} [parameters.tags] Resource tags + * @param {boolean} parameters.overwriteVhds Specifies whether to overwrite the + * destination virtual hard disk, in case of conflict. * * @param {object} [options] Optional Parameters. * @@ -2487,7 +2378,7 @@ export interface Images { * * {Promise} A promise is returned. * - * @resolve {Image} - The deserialized result object. + * @resolve {VirtualMachineCaptureResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -2495,138 +2386,192 @@ export interface Images { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Image} [result] - The deserialized result object if an error did not occur. - * See {@link Image} for more information. + * {VirtualMachineCaptureResult} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualMachineCaptureResult} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(resourceGroupName: string, imageName: string, parameters: models.Image, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, imageName: string, parameters: models.Image, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, imageName: string, parameters: models.Image, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + capture(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineCaptureParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + capture(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineCaptureParameters, callback: ServiceCallback): void; + capture(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineCaptureParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Update an image. + * The operation to create or update a virtual machine. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} imageName The name of the image. + * @param {string} vmName The name of the virtual machine. * - * @param {object} parameters Parameters supplied to the Update Image + * @param {object} parameters Parameters supplied to the Create Virtual Machine * operation. * - * @param {object} [parameters.sourceVirtualMachine] The source virtual machine - * from which Image is created. - * - * @param {object} [parameters.storageProfile] Specifies the storage settings - * for the virtual machine disks. - * - * @param {object} [parameters.storageProfile.osDisk] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - * - * @param {string} parameters.storageProfile.osDisk.osType This property allows - * you to specify the type of the OS that is included in the disk if creating a - * VM from a custom image.

Possible values are:

**Windows** - *

**Linux**. Possible values include: 'Windows', 'Linux' - * - * @param {string} parameters.storageProfile.osDisk.osState The OS State. - * Possible values include: 'Generalized', 'Specialized' - * - * @param {object} [parameters.storageProfile.osDisk.snapshot] The snapshot. - * - * @param {object} [parameters.storageProfile.osDisk.managedDisk] The - * managedDisk. + * @param {object} [parameters.plan] 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**. * - * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource - * Id + * @param {string} [parameters.plan.name] The plan ID. * - * @param {string} [parameters.storageProfile.osDisk.blobUri] The Virtual Hard - * Disk. + * @param {string} [parameters.plan.publisher] The publisher ID. * - * @param {string} [parameters.storageProfile.osDisk.caching] 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' + * @param {string} [parameters.plan.product] Specifies the product of the image + * from the marketplace. This is the same value as Offer under the + * imageReference element. * - * @param {number} [parameters.storageProfile.osDisk.diskSizeGB] Specifies the - * size of empty data disks 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 + * @param {string} [parameters.plan.promotionCode] The promotion code. * - * @param {string} [parameters.storageProfile.osDisk.storageAccountType] - * Specifies the storage account type for the managed disk. UltraSSD_LRS cannot - * be used with OS Disk. Possible values include: 'Standard_LRS', - * 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' + * @param {object} [parameters.hardwareProfile] Specifies the hardware settings + * for the virtual machine. * - * @param {array} [parameters.storageProfile.dataDisks] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + * @param {string} [parameters.hardwareProfile.vmSize] Specifies the size of + * the virtual machine. For more information about virtual machine sizes, see + * [Sizes for virtual + * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + *

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](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) + *

[List all available virtual machine sizes in a + * region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) + *

[List all available virtual machine sizes for + * resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). + * 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' * - * @param {boolean} [parameters.storageProfile.zoneResilient] Specifies whether - * an image is zone resilient or not. Default is false. Zone resilient images - * can be created only in regions that provide Zone Redundant Storage (ZRS). + * @param {object} [parameters.storageProfile] Specifies the storage settings + * for the virtual machine disks. * - * @param {object} [parameters.tags] Resource tags + * @param {object} [parameters.storageProfile.imageReference] 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. * - * @param {object} [options] Optional Parameters. + * @param {string} [parameters.storageProfile.imageReference.publisher] The + * image publisher. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {string} [parameters.storageProfile.imageReference.offer] Specifies + * the offer of the platform image or marketplace image used to create the + * virtual machine. * - * @returns {Promise} A promise is returned + * @param {string} [parameters.storageProfile.imageReference.sku] The image + * SKU. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {string} [parameters.storageProfile.imageReference.version] 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. * - * @reject {Error|ServiceError} - The error object. - */ - updateWithHttpOperationResponse(resourceGroupName: string, imageName: string, parameters: models.ImageUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Update an image. + * @param {string} [parameters.storageProfile.imageReference.id] Resource Id * - * @param {string} resourceGroupName The name of the resource group. + * @param {object} [parameters.storageProfile.osDisk] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * - * @param {string} imageName The name of the image. + * @param {string} [parameters.storageProfile.osDisk.osType] 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' * - * @param {object} parameters Parameters supplied to the Update Image - * operation. + * @param {object} [parameters.storageProfile.osDisk.encryptionSettings] + * Specifies the encryption settings for the OS Disk.

Minimum + * api-version: 2015-06-15 * - * @param {object} [parameters.sourceVirtualMachine] The source virtual machine - * from which Image is created. + * @param {object} + * [parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey] + * Specifies the location of the disk encryption key, which is a Key Vault + * Secret. * - * @param {object} [parameters.storageProfile] Specifies the storage settings - * for the virtual machine disks. + * @param {string} + * parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey.secretUrl + * The URL referencing a secret in a Key Vault. * - * @param {object} [parameters.storageProfile.osDisk] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + * @param {object} + * parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey.sourceVault + * The relative URL of the Key Vault containing the secret. * - * @param {string} parameters.storageProfile.osDisk.osType This property allows - * you to specify the type of the OS that is included in the disk if creating a - * VM from a custom image.

Possible values are:

**Windows** - *

**Linux**. Possible values include: 'Windows', 'Linux' + * @param {object} + * [parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey] + * Specifies the location of the key encryption key in Key Vault. * - * @param {string} parameters.storageProfile.osDisk.osState The OS State. - * Possible values include: 'Generalized', 'Specialized' + * @param {string} + * parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey.keyUrl + * The URL referencing a key encryption key in Key Vault. * - * @param {object} [parameters.storageProfile.osDisk.snapshot] The snapshot. + * @param {object} + * parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey.sourceVault + * The relative URL of the Key Vault containing the key. * - * @param {object} [parameters.storageProfile.osDisk.managedDisk] The - * managedDisk. + * @param {boolean} + * [parameters.storageProfile.osDisk.encryptionSettings.enabled] Specifies + * whether disk encryption should be enabled on the virtual machine. * - * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource - * Id + * @param {string} [parameters.storageProfile.osDisk.name] The disk name. * - * @param {string} [parameters.storageProfile.osDisk.blobUri] The Virtual Hard - * Disk. + * @param {object} [parameters.storageProfile.osDisk.vhd] The virtual hard + * disk. + * + * @param {object} [parameters.storageProfile.osDisk.image] 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. + * + * @param {string} [parameters.storageProfile.osDisk.image.uri] Specifies the + * virtual hard disk's uri. * * @param {string} [parameters.storageProfile.osDisk.caching] Specifies the * caching requirements.

Possible values are:

**None** @@ -2634,15 +2579,44 @@ export interface Images { * Standard storage. ReadOnly for Premium storage**. Possible values include: * 'None', 'ReadOnly', 'ReadWrite' * + * @param {boolean} [parameters.storageProfile.osDisk.writeAcceleratorEnabled] + * Specifies whether writeAccelerator should be enabled or disabled on the + * disk. + * + * @param {object} [parameters.storageProfile.osDisk.diffDiskSettings] + * Specifies the differencing Disk Settings for the operating system disk used + * by the virtual machine. + * + * @param {string} [parameters.storageProfile.osDisk.diffDiskSettings.option] + * Specifies the differencing disk settings for operating system disk. Possible + * values include: 'Local' + * + * @param {string} parameters.storageProfile.osDisk.createOption 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' + * * @param {number} [parameters.storageProfile.osDisk.diskSizeGB] Specifies the - * size of empty data disks 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 + * size of an empty data disk in gigabytes. This element can be used to + * overwrite the size of the disk in a virtual machine image.

This + * value cannot be larger than 1023 GB * - * @param {string} [parameters.storageProfile.osDisk.storageAccountType] - * Specifies the storage account type for the managed disk. UltraSSD_LRS cannot - * be used with OS Disk. Possible values include: 'Standard_LRS', - * 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' + * @param {object} [parameters.storageProfile.osDisk.managedDisk] The managed + * disk parameters. + * + * @param {string} + * [parameters.storageProfile.osDisk.managedDisk.storageAccountType] Specifies + * the storage account type for the managed disk. NOTE: UltraSSD_LRS can only + * be used with data disks, it cannot be used with OS Disk. Possible values + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' + * + * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource + * Id * * @param {array} [parameters.storageProfile.dataDisks] Specifies the * parameters that are used to add a data disk to a virtual machine.

@@ -2650,880 +2624,617 @@ export interface Images { * virtual * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * - * @param {boolean} [parameters.storageProfile.zoneResilient] Specifies whether - * an image is zone resilient or not. Default is false. Zone resilient images - * can be created only in regions that provide Zone Redundant Storage (ZRS). - * - * @param {object} [parameters.tags] Resource tags - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {object} [parameters.additionalCapabilities] Specifies additional + * capabilities enabled or disabled on the virtual machine. * - * @param {ServiceCallback} [optionalCallback] - The optional callback. + * @param {boolean} [parameters.additionalCapabilities.ultraSSDEnabled] The + * flag that enables or disables a capability to have one or more managed data + * disks with UltraSSD_LRS storage account type on the VM or VMSS. Managed + * disks with storage account type UltraSSD_LRS can be added to a virtual + * machine or virtual machine scale set only if this property is enabled. * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. + * @param {object} [parameters.osProfile] Specifies the operating system + * settings for the virtual machine. * - * {Promise} A promise is returned. + * @param {string} [parameters.osProfile.computerName] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). * - * @resolve {Image} - The deserialized result object. + * @param {string} [parameters.osProfile.adminUsername] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • + * 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) * - * @reject {Error|ServiceError} - The error object. + * @param {string} [parameters.osProfile.adminPassword] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) + *

    For resetting root password, see [Manage users, SSH, and check or + * repair disks on Azure Linux VMs using the VMAccess + * Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) * - * {ServiceCallback} optionalCallback(err, result, request, response) + * @param {string} [parameters.osProfile.customData] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * @param {object} [parameters.osProfile.windowsConfiguration] Specifies + * Windows operating system settings on the virtual machine. * - * {Image} [result] - The deserialized result object if an error did not occur. - * See {@link Image} for more information. + * @param {boolean} + * [parameters.osProfile.windowsConfiguration.provisionVMAgent] 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. * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @param {boolean} + * [parameters.osProfile.windowsConfiguration.enableAutomaticUpdates] Indicates + * whether virtual machine is enabled for automatic updates. * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - update(resourceGroupName: string, imageName: string, parameters: models.ImageUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - update(resourceGroupName: string, imageName: string, parameters: models.ImageUpdate, callback: ServiceCallback): void; - update(resourceGroupName: string, imageName: string, parameters: models.ImageUpdate, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * Deletes an Image. + * @param {string} [parameters.osProfile.windowsConfiguration.timeZone] + * Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time" * - * @param {string} resourceGroupName The name of the resource group. + * @param {array} + * [parameters.osProfile.windowsConfiguration.additionalUnattendContent] + * Specifies additional base-64 encoded XML formatted information that can be + * included in the Unattend.xml file, which is used by Windows Setup. * - * @param {string} imageName The name of the image. + * @param {object} [parameters.osProfile.windowsConfiguration.winRM] Specifies + * the Windows Remote Management listeners. This enables remote Windows + * PowerShell. * - * @param {object} [options] Optional Parameters. + * @param {array} [parameters.osProfile.windowsConfiguration.winRM.listeners] + * The list of Windows Remote Management listeners * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {object} [parameters.osProfile.linuxConfiguration] Specifies the + * Linux operating system settings on the virtual machine.

    For a list + * of supported Linux distributions, see [Linux on Azure-Endorsed + * Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + *

    For running non-endorsed distributions, see [Information for + * Non-Endorsed + * Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). * - * @returns {Promise} A promise is returned + * @param {boolean} + * [parameters.osProfile.linuxConfiguration.disablePasswordAuthentication] + * Specifies whether password authentication should be disabled. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {object} [parameters.osProfile.linuxConfiguration.ssh] Specifies the + * ssh key configuration for a Linux OS. * - * @reject {Error|ServiceError} - The error object. - */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, imageName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Deletes an Image. + * @param {array} [parameters.osProfile.linuxConfiguration.ssh.publicKeys] The + * list of SSH public keys used to authenticate with linux based VMs. * - * @param {string} resourceGroupName The name of the resource group. + * @param {boolean} [parameters.osProfile.linuxConfiguration.provisionVMAgent] + * 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. * - * @param {string} imageName The name of the image. + * @param {array} [parameters.osProfile.secrets] Specifies set of certificates + * that should be installed onto the virtual machine. * - * @param {object} [options] Optional Parameters. + * @param {boolean} [parameters.osProfile.allowExtensionOperations] Specifies + * whether extension operations should be allowed on the virtual machine. + *

    This may only be set to False when no extensions are present on the + * virtual machine. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {object} [parameters.networkProfile] Specifies the network interfaces + * of the virtual machine. * - * @param {ServiceCallback} [optionalCallback] - The optional callback. + * @param {array} [parameters.networkProfile.networkInterfaces] Specifies the + * list of resource Ids for the network interfaces associated with the virtual + * machine. * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. + * @param {object} [parameters.diagnosticsProfile] Specifies the boot + * diagnostic settings state.

    Minimum api-version: 2015-06-15. * - * {Promise} A promise is returned. + * @param {object} [parameters.diagnosticsProfile.bootDiagnostics] Boot + * Diagnostics is a debugging feature which allows you to view Console Output + * and Screenshot to diagnose VM status.

    You can easily view the + * output of your console log.

    Azure also enables you to see a + * screenshot of the VM from the hypervisor. * - * @resolve {null} - The deserialized result object. + * @param {boolean} [parameters.diagnosticsProfile.bootDiagnostics.enabled] + * Whether boot diagnostics should be enabled on the Virtual Machine. * - * @reject {Error|ServiceError} - The error object. + * @param {string} [parameters.diagnosticsProfile.bootDiagnostics.storageUri] + * Uri of the storage account to use for placing the console output and + * screenshot. * - * {ServiceCallback} optionalCallback(err, result, request, response) + * @param {object} [parameters.availabilitySet] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + *

    For more information on Azure planned maintainance, see [Planned + * maintenance for virtual machines in + * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) + *

    Currently, a VM can only be added to availability set at creation + * time. An existing VM cannot be added to an availability set. * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * @param {string} [parameters.availabilitySet.id] Resource Id * - * {null} [result] - The deserialized result object if an error did not occur. + * @param {string} [parameters.licenseType] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) + *

    Minimum api-version: 2015-06-15 * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @param {object} [parameters.identity] The identity of the virtual machine, + * if configured. * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - deleteMethod(resourceGroupName: string, imageName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, imageName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, imageName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * Gets an image. + * @param {string} [parameters.identity.type] 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' * - * @param {string} resourceGroupName The name of the resource group. + * @param {object} [parameters.identity.userAssignedIdentities] The list of + * user identities associated with the Virtual Machine. The user identity + * dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. * - * @param {string} imageName The name of the image. + * @param {array} [parameters.zones] The virtual machine zones. * - * @param {object} [options] Optional Parameters. + * @param {string} parameters.location Resource location * - * @param {string} [options.expand] The expand expression to apply on the - * operation. + * @param {object} [parameters.tags] Resource tags + * + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, imageName: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, vmName: string, parameters: models.VirtualMachine, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets an image. + * The operation to create or update a virtual machine. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} imageName The name of the image. - * - * @param {object} [options] Optional Parameters. + * @param {string} vmName The name of the virtual machine. * - * @param {string} [options.expand] The expand expression to apply on the + * @param {object} parameters Parameters supplied to the Create Virtual Machine * operation. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned. - * - * @resolve {Image} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - * - * {ServiceCallback} optionalCallback(err, result, request, response) - * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. - * - * {Image} [result] - The deserialized result object if an error did not occur. - * See {@link Image} for more information. - * - * {WebResource} [request] - The HTTP Request object if an error did not occur. - * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - get(resourceGroupName: string, imageName: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, imageName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, imageName: string, options: { expand? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * Gets the list of images under a resource group. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {object} [parameters.plan] 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**. * - * @returns {Promise} A promise is returned + * @param {string} [parameters.plan.name] The plan ID. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {string} [parameters.plan.publisher] The publisher ID. * - * @reject {Error|ServiceError} - The error object. - */ - listByResourceGroupWithHttpOperationResponse(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Gets the list of images under a resource group. + * @param {string} [parameters.plan.product] Specifies the product of the image + * from the marketplace. This is the same value as Offer under the + * imageReference element. * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} [parameters.plan.promotionCode] The promotion code. * - * @param {object} [options] Optional Parameters. + * @param {object} [parameters.hardwareProfile] Specifies the hardware settings + * for the virtual machine. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned. - * - * @resolve {ImageListResult} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - * - * {ServiceCallback} optionalCallback(err, result, request, response) - * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. - * - * {ImageListResult} [result] - The deserialized result object if an error did not occur. - * See {@link ImageListResult} for more information. - * - * {WebResource} [request] - The HTTP Request object if an error did not occur. - * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - listByResourceGroup(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByResourceGroup(resourceGroupName: string, callback: ServiceCallback): void; - listByResourceGroup(resourceGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * Gets the list of Images in the subscription. Use nextLink property in the - * response to get the next page of Images. Do this till nextLink is null to - * fetch all the Images. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - */ - listWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Gets the list of Images in the subscription. Use nextLink property in the - * response to get the next page of Images. Do this till nextLink is null to - * fetch all the Images. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned. - * - * @resolve {ImageListResult} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - * - * {ServiceCallback} optionalCallback(err, result, request, response) - * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. - * - * {ImageListResult} [result] - The deserialized result object if an error did not occur. - * See {@link ImageListResult} for more information. - * - * {WebResource} [request] - The HTTP Request object if an error did not occur. - * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - list(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - list(callback: ServiceCallback): void; - list(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * Create or update an image. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} imageName The name of the image. - * - * @param {object} parameters Parameters supplied to the Create Image - * operation. - * - * @param {object} [parameters.sourceVirtualMachine] The source virtual machine - * from which Image is created. - * - * @param {object} [parameters.storageProfile] Specifies the storage settings - * for the virtual machine disks. - * - * @param {object} [parameters.storageProfile.osDisk] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - * - * @param {string} parameters.storageProfile.osDisk.osType This property allows - * you to specify the type of the OS that is included in the disk if creating a - * VM from a custom image.

    Possible values are:

    **Windows** - *

    **Linux**. Possible values include: 'Windows', 'Linux' - * - * @param {string} parameters.storageProfile.osDisk.osState The OS State. - * Possible values include: 'Generalized', 'Specialized' - * - * @param {object} [parameters.storageProfile.osDisk.snapshot] The snapshot. - * - * @param {object} [parameters.storageProfile.osDisk.managedDisk] The - * managedDisk. - * - * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource - * Id - * - * @param {string} [parameters.storageProfile.osDisk.blobUri] The Virtual Hard - * Disk. - * - * @param {string} [parameters.storageProfile.osDisk.caching] 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' - * - * @param {number} [parameters.storageProfile.osDisk.diskSizeGB] Specifies the - * size of empty data disks 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 - * - * @param {string} [parameters.storageProfile.osDisk.storageAccountType] - * Specifies the storage account type for the managed disk. UltraSSD_LRS cannot - * be used with OS Disk. Possible values include: 'Standard_LRS', - * 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' - * - * @param {array} [parameters.storageProfile.dataDisks] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - * - * @param {boolean} [parameters.storageProfile.zoneResilient] Specifies whether - * an image is zone resilient or not. Default is false. Zone resilient images - * can be created only in regions that provide Zone Redundant Storage (ZRS). - * - * @param {string} parameters.location Resource location - * - * @param {object} [parameters.tags] Resource tags - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - */ - beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, imageName: string, parameters: models.Image, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Create or update an image. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} imageName The name of the image. - * - * @param {object} parameters Parameters supplied to the Create Image - * operation. - * - * @param {object} [parameters.sourceVirtualMachine] The source virtual machine - * from which Image is created. - * - * @param {object} [parameters.storageProfile] Specifies the storage settings - * for the virtual machine disks. - * - * @param {object} [parameters.storageProfile.osDisk] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - * - * @param {string} parameters.storageProfile.osDisk.osType This property allows - * you to specify the type of the OS that is included in the disk if creating a - * VM from a custom image.

    Possible values are:

    **Windows** - *

    **Linux**. Possible values include: 'Windows', 'Linux' - * - * @param {string} parameters.storageProfile.osDisk.osState The OS State. - * Possible values include: 'Generalized', 'Specialized' - * - * @param {object} [parameters.storageProfile.osDisk.snapshot] The snapshot. - * - * @param {object} [parameters.storageProfile.osDisk.managedDisk] The - * managedDisk. - * - * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource - * Id - * - * @param {string} [parameters.storageProfile.osDisk.blobUri] The Virtual Hard - * Disk. - * - * @param {string} [parameters.storageProfile.osDisk.caching] 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' - * - * @param {number} [parameters.storageProfile.osDisk.diskSizeGB] Specifies the - * size of empty data disks 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 - * - * @param {string} [parameters.storageProfile.osDisk.storageAccountType] - * Specifies the storage account type for the managed disk. UltraSSD_LRS cannot - * be used with OS Disk. Possible values include: 'Standard_LRS', - * 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' - * - * @param {array} [parameters.storageProfile.dataDisks] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - * - * @param {boolean} [parameters.storageProfile.zoneResilient] Specifies whether - * an image is zone resilient or not. Default is false. Zone resilient images - * can be created only in regions that provide Zone Redundant Storage (ZRS). - * - * @param {string} parameters.location Resource location - * - * @param {object} [parameters.tags] Resource tags - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned. - * - * @resolve {Image} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - * - * {ServiceCallback} optionalCallback(err, result, request, response) - * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. - * - * {Image} [result] - The deserialized result object if an error did not occur. - * See {@link Image} for more information. - * - * {WebResource} [request] - The HTTP Request object if an error did not occur. - * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - beginCreateOrUpdate(resourceGroupName: string, imageName: string, parameters: models.Image, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginCreateOrUpdate(resourceGroupName: string, imageName: string, parameters: models.Image, callback: ServiceCallback): void; - beginCreateOrUpdate(resourceGroupName: string, imageName: string, parameters: models.Image, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * Update an image. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} imageName The name of the image. - * - * @param {object} parameters Parameters supplied to the Update Image - * operation. - * - * @param {object} [parameters.sourceVirtualMachine] The source virtual machine - * from which Image is created. - * - * @param {object} [parameters.storageProfile] Specifies the storage settings - * for the virtual machine disks. - * - * @param {object} [parameters.storageProfile.osDisk] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - * - * @param {string} parameters.storageProfile.osDisk.osType This property allows - * you to specify the type of the OS that is included in the disk if creating a - * VM from a custom image.

    Possible values are:

    **Windows** - *

    **Linux**. Possible values include: 'Windows', 'Linux' - * - * @param {string} parameters.storageProfile.osDisk.osState The OS State. - * Possible values include: 'Generalized', 'Specialized' - * - * @param {object} [parameters.storageProfile.osDisk.snapshot] The snapshot. - * - * @param {object} [parameters.storageProfile.osDisk.managedDisk] The - * managedDisk. - * - * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource - * Id - * - * @param {string} [parameters.storageProfile.osDisk.blobUri] The Virtual Hard - * Disk. - * - * @param {string} [parameters.storageProfile.osDisk.caching] 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' - * - * @param {number} [parameters.storageProfile.osDisk.diskSizeGB] Specifies the - * size of empty data disks 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 - * - * @param {string} [parameters.storageProfile.osDisk.storageAccountType] - * Specifies the storage account type for the managed disk. UltraSSD_LRS cannot - * be used with OS Disk. Possible values include: 'Standard_LRS', - * 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' - * - * @param {array} [parameters.storageProfile.dataDisks] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - * - * @param {boolean} [parameters.storageProfile.zoneResilient] Specifies whether - * an image is zone resilient or not. Default is false. Zone resilient images - * can be created only in regions that provide Zone Redundant Storage (ZRS). - * - * @param {object} [parameters.tags] Resource tags - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned + * @param {string} [parameters.hardwareProfile.vmSize] Specifies the size of + * the virtual machine. For more information about virtual machine sizes, see + * [Sizes for virtual + * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + *

    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](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) + *

    [List all available virtual machine sizes in a + * region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) + *

    [List all available virtual machine sizes for + * resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). + * 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' * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {object} [parameters.storageProfile] Specifies the storage settings + * for the virtual machine disks. * - * @reject {Error|ServiceError} - The error object. - */ - beginUpdateWithHttpOperationResponse(resourceGroupName: string, imageName: string, parameters: models.ImageUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Update an image. + * @param {object} [parameters.storageProfile.imageReference] 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. * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} [parameters.storageProfile.imageReference.publisher] The + * image publisher. * - * @param {string} imageName The name of the image. + * @param {string} [parameters.storageProfile.imageReference.offer] Specifies + * the offer of the platform image or marketplace image used to create the + * virtual machine. * - * @param {object} parameters Parameters supplied to the Update Image - * operation. + * @param {string} [parameters.storageProfile.imageReference.sku] The image + * SKU. * - * @param {object} [parameters.sourceVirtualMachine] The source virtual machine - * from which Image is created. + * @param {string} [parameters.storageProfile.imageReference.version] 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. * - * @param {object} [parameters.storageProfile] Specifies the storage settings - * for the virtual machine disks. + * @param {string} [parameters.storageProfile.imageReference.id] Resource Id * * @param {object} [parameters.storageProfile.osDisk] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * - * @param {string} parameters.storageProfile.osDisk.osType This property allows - * you to specify the type of the OS that is included in the disk if creating a - * VM from a custom image.

    Possible values are:

    **Windows** - *

    **Linux**. Possible values include: 'Windows', 'Linux' - * - * @param {string} parameters.storageProfile.osDisk.osState The OS State. - * Possible values include: 'Generalized', 'Specialized' - * - * @param {object} [parameters.storageProfile.osDisk.snapshot] The snapshot. - * - * @param {object} [parameters.storageProfile.osDisk.managedDisk] The - * managedDisk. - * - * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource - * Id - * - * @param {string} [parameters.storageProfile.osDisk.blobUri] The Virtual Hard - * Disk. - * - * @param {string} [parameters.storageProfile.osDisk.caching] 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' - * - * @param {number} [parameters.storageProfile.osDisk.diskSizeGB] Specifies the - * size of empty data disks 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 - * - * @param {string} [parameters.storageProfile.osDisk.storageAccountType] - * Specifies the storage account type for the managed disk. UltraSSD_LRS cannot - * be used with OS Disk. Possible values include: 'Standard_LRS', - * 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' - * - * @param {array} [parameters.storageProfile.dataDisks] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - * - * @param {boolean} [parameters.storageProfile.zoneResilient] Specifies whether - * an image is zone resilient or not. Default is false. Zone resilient images - * can be created only in regions that provide Zone Redundant Storage (ZRS). - * - * @param {object} [parameters.tags] Resource tags - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned. - * - * @resolve {Image} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - * - * {ServiceCallback} optionalCallback(err, result, request, response) - * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. - * - * {Image} [result] - The deserialized result object if an error did not occur. - * See {@link Image} for more information. - * - * {WebResource} [request] - The HTTP Request object if an error did not occur. - * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - beginUpdate(resourceGroupName: string, imageName: string, parameters: models.ImageUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginUpdate(resourceGroupName: string, imageName: string, parameters: models.ImageUpdate, callback: ServiceCallback): void; - beginUpdate(resourceGroupName: string, imageName: string, parameters: models.ImageUpdate, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * Deletes an Image. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} imageName The name of the image. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - */ - beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, imageName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Deletes an Image. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} imageName The name of the image. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned. - * - * @resolve {null} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - * - * {ServiceCallback} optionalCallback(err, result, request, response) - * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. - * - * {null} [result] - The deserialized result object if an error did not occur. + * @param {string} [parameters.storageProfile.osDisk.osType] 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' * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @param {object} [parameters.storageProfile.osDisk.encryptionSettings] + * Specifies the encryption settings for the OS Disk.

    Minimum + * api-version: 2015-06-15 * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - beginDeleteMethod(resourceGroupName: string, imageName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeleteMethod(resourceGroupName: string, imageName: string, callback: ServiceCallback): void; - beginDeleteMethod(resourceGroupName: string, imageName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * Gets the list of images under a resource group. + * @param {object} + * [parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey] + * Specifies the location of the disk encryption key, which is a Key Vault + * Secret. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} + * parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey.secretUrl + * The URL referencing a secret in a Key Vault. * - * @param {object} [options] Optional Parameters. + * @param {object} + * parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey.sourceVault + * The relative URL of the Key Vault containing the secret. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {object} + * [parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey] + * Specifies the location of the key encryption key in Key Vault. * - * @returns {Promise} A promise is returned + * @param {string} + * parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey.keyUrl + * The URL referencing a key encryption key in Key Vault. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {object} + * parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey.sourceVault + * The relative URL of the Key Vault containing the key. * - * @reject {Error|ServiceError} - The error object. - */ - listByResourceGroupNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Gets the list of images under a resource group. + * @param {boolean} + * [parameters.storageProfile.osDisk.encryptionSettings.enabled] Specifies + * whether disk encryption should be enabled on the virtual machine. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} [parameters.storageProfile.osDisk.name] The disk name. * - * @param {object} [options] Optional Parameters. + * @param {object} [parameters.storageProfile.osDisk.vhd] The virtual hard + * disk. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {object} [parameters.storageProfile.osDisk.image] 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. * - * @param {ServiceCallback} [optionalCallback] - The optional callback. + * @param {string} [parameters.storageProfile.osDisk.image.uri] Specifies the + * virtual hard disk's uri. * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. + * @param {string} [parameters.storageProfile.osDisk.caching] 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' * - * {Promise} A promise is returned. + * @param {boolean} [parameters.storageProfile.osDisk.writeAcceleratorEnabled] + * Specifies whether writeAccelerator should be enabled or disabled on the + * disk. * - * @resolve {ImageListResult} - The deserialized result object. + * @param {object} [parameters.storageProfile.osDisk.diffDiskSettings] + * Specifies the differencing Disk Settings for the operating system disk used + * by the virtual machine. * - * @reject {Error|ServiceError} - The error object. + * @param {string} [parameters.storageProfile.osDisk.diffDiskSettings.option] + * Specifies the differencing disk settings for operating system disk. Possible + * values include: 'Local' * - * {ServiceCallback} optionalCallback(err, result, request, response) + * @param {string} parameters.storageProfile.osDisk.createOption 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' * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * @param {number} [parameters.storageProfile.osDisk.diskSizeGB] Specifies the + * size of an empty data disk in gigabytes. This element can be used to + * overwrite the size of the disk in a virtual machine image.

    This + * value cannot be larger than 1023 GB * - * {ImageListResult} [result] - The deserialized result object if an error did not occur. - * See {@link ImageListResult} for more information. + * @param {object} [parameters.storageProfile.osDisk.managedDisk] The managed + * disk parameters. * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @param {string} + * [parameters.storageProfile.osDisk.managedDisk.storageAccountType] Specifies + * the storage account type for the managed disk. NOTE: UltraSSD_LRS can only + * be used with data disks, it cannot be used with OS Disk. Possible values + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - listByResourceGroupNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByResourceGroupNext(nextPageLink: string, callback: ServiceCallback): void; - listByResourceGroupNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * Gets the list of Images in the subscription. Use nextLink property in the - * response to get the next page of Images. Do this till nextLink is null to - * fetch all the Images. + * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource + * Id * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {array} [parameters.storageProfile.dataDisks] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * - * @param {object} [options] Optional Parameters. + * @param {object} [parameters.additionalCapabilities] Specifies additional + * capabilities enabled or disabled on the virtual machine. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {boolean} [parameters.additionalCapabilities.ultraSSDEnabled] The + * flag that enables or disables a capability to have one or more managed data + * disks with UltraSSD_LRS storage account type on the VM or VMSS. Managed + * disks with storage account type UltraSSD_LRS can be added to a virtual + * machine or virtual machine scale set only if this property is enabled. * - * @returns {Promise} A promise is returned + * @param {object} [parameters.osProfile] Specifies the operating system + * settings for the virtual machine. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {string} [parameters.osProfile.computerName] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). * - * @reject {Error|ServiceError} - The error object. - */ - listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Gets the list of Images in the subscription. Use nextLink property in the - * response to get the next page of Images. Do this till nextLink is null to - * fetch all the Images. + * @param {string} [parameters.osProfile.adminUsername] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • + * 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} [parameters.osProfile.adminPassword] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) + *

    For resetting root password, see [Manage users, SSH, and check or + * repair disks on Azure Linux VMs using the VMAccess + * Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) * - * @param {object} [options] Optional Parameters. + * @param {string} [parameters.osProfile.customData] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {object} [parameters.osProfile.windowsConfiguration] Specifies + * Windows operating system settings on the virtual machine. * - * @param {ServiceCallback} [optionalCallback] - The optional callback. + * @param {boolean} + * [parameters.osProfile.windowsConfiguration.provisionVMAgent] 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. * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. + * @param {boolean} + * [parameters.osProfile.windowsConfiguration.enableAutomaticUpdates] Indicates + * whether virtual machine is enabled for automatic updates. * - * {Promise} A promise is returned. + * @param {string} [parameters.osProfile.windowsConfiguration.timeZone] + * Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time" * - * @resolve {ImageListResult} - The deserialized result object. + * @param {array} + * [parameters.osProfile.windowsConfiguration.additionalUnattendContent] + * Specifies additional base-64 encoded XML formatted information that can be + * included in the Unattend.xml file, which is used by Windows Setup. * - * @reject {Error|ServiceError} - The error object. + * @param {object} [parameters.osProfile.windowsConfiguration.winRM] Specifies + * the Windows Remote Management listeners. This enables remote Windows + * PowerShell. * - * {ServiceCallback} optionalCallback(err, result, request, response) + * @param {array} [parameters.osProfile.windowsConfiguration.winRM.listeners] + * The list of Windows Remote Management listeners * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * @param {object} [parameters.osProfile.linuxConfiguration] Specifies the + * Linux operating system settings on the virtual machine.

    For a list + * of supported Linux distributions, see [Linux on Azure-Endorsed + * Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + *

    For running non-endorsed distributions, see [Information for + * Non-Endorsed + * Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). * - * {ImageListResult} [result] - The deserialized result object if an error did not occur. - * See {@link ImageListResult} for more information. + * @param {boolean} + * [parameters.osProfile.linuxConfiguration.disablePasswordAuthentication] + * Specifies whether password authentication should be disabled. * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @param {object} [parameters.osProfile.linuxConfiguration.ssh] Specifies the + * ssh key configuration for a Linux OS. * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listNext(nextPageLink: string, callback: ServiceCallback): void; - listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * VirtualMachines - * __NOTE__: An instance of this class is automatically created for an - * instance of the ComputeManagementClient. - */ -export interface VirtualMachines { - - - /** - * Captures the VM by copying virtual hard disks of the VM and outputs a - * template that can be used to create similar VMs. + * @param {array} [parameters.osProfile.linuxConfiguration.ssh.publicKeys] The + * list of SSH public keys used to authenticate with linux based VMs. * - * @param {string} resourceGroupName The name of the resource group. + * @param {boolean} [parameters.osProfile.linuxConfiguration.provisionVMAgent] + * 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. * - * @param {string} vmName The name of the virtual machine. + * @param {array} [parameters.osProfile.secrets] Specifies set of certificates + * that should be installed onto the virtual machine. * - * @param {object} parameters Parameters supplied to the Capture Virtual - * Machine operation. + * @param {boolean} [parameters.osProfile.allowExtensionOperations] Specifies + * whether extension operations should be allowed on the virtual machine. + *

    This may only be set to False when no extensions are present on the + * virtual machine. * - * @param {string} parameters.vhdPrefix The captured virtual hard disk's name - * prefix. + * @param {object} [parameters.networkProfile] Specifies the network interfaces + * of the virtual machine. * - * @param {string} parameters.destinationContainerName The destination - * container name. + * @param {array} [parameters.networkProfile.networkInterfaces] Specifies the + * list of resource Ids for the network interfaces associated with the virtual + * machine. * - * @param {boolean} parameters.overwriteVhds Specifies whether to overwrite the - * destination virtual hard disk, in case of conflict. + * @param {object} [parameters.diagnosticsProfile] Specifies the boot + * diagnostic settings state.

    Minimum api-version: 2015-06-15. * - * @param {object} [options] Optional Parameters. + * @param {object} [parameters.diagnosticsProfile.bootDiagnostics] Boot + * Diagnostics is a debugging feature which allows you to view Console Output + * and Screenshot to diagnose VM status.

    You can easily view the + * output of your console log.

    Azure also enables you to see a + * screenshot of the VM from the hypervisor. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {boolean} [parameters.diagnosticsProfile.bootDiagnostics.enabled] + * Whether boot diagnostics should be enabled on the Virtual Machine. + * + * @param {string} [parameters.diagnosticsProfile.bootDiagnostics.storageUri] + * Uri of the storage account to use for placing the console output and + * screenshot. * - * @returns {Promise} A promise is returned + * @param {object} [parameters.availabilitySet] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + *

    For more information on Azure planned maintainance, see [Planned + * maintenance for virtual machines in + * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) + *

    Currently, a VM can only be added to availability set at creation + * time. An existing VM cannot be added to an availability set. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {string} [parameters.availabilitySet.id] Resource Id * - * @reject {Error|ServiceError} - The error object. - */ - captureWithHttpOperationResponse(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineCaptureParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Captures the VM by copying virtual hard disks of the VM and outputs a - * template that can be used to create similar VMs. + * @param {string} [parameters.licenseType] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) + *

    Minimum api-version: 2015-06-15 * - * @param {string} resourceGroupName The name of the resource group. + * @param {object} [parameters.identity] The identity of the virtual machine, + * if configured. * - * @param {string} vmName The name of the virtual machine. + * @param {string} [parameters.identity.type] 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' * - * @param {object} parameters Parameters supplied to the Capture Virtual - * Machine operation. + * @param {object} [parameters.identity.userAssignedIdentities] The list of + * user identities associated with the Virtual Machine. The user identity + * dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. * - * @param {string} parameters.vhdPrefix The captured virtual hard disk's name - * prefix. + * @param {array} [parameters.zones] The virtual machine zones. * - * @param {string} parameters.destinationContainerName The destination - * container name. + * @param {string} parameters.location Resource location * - * @param {boolean} parameters.overwriteVhds Specifies whether to overwrite the - * destination virtual hard disk, in case of conflict. + * @param {object} [parameters.tags] Resource tags * * @param {object} [options] Optional Parameters. * @@ -3537,7 +3248,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {VirtualMachineCaptureResult} - The deserialized result object. + * @resolve {VirtualMachine} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -3545,27 +3256,26 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {VirtualMachineCaptureResult} [result] - The deserialized result object if an error did not occur. - * See {@link VirtualMachineCaptureResult} for more - * information. + * {VirtualMachine} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualMachine} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - capture(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineCaptureParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - capture(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineCaptureParameters, callback: ServiceCallback): void; - capture(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineCaptureParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, vmName: string, parameters: models.VirtualMachine, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, vmName: string, parameters: models.VirtualMachine, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, vmName: string, parameters: models.VirtualMachine, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * The operation to create or update a virtual machine. + * The operation to update a virtual machine. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} vmName The name of the virtual machine. * - * @param {object} parameters Parameters supplied to the Create Virtual Machine + * @param {object} parameters Parameters supplied to the Update Virtual Machine * operation. * * @param {object} [parameters.plan] Specifies information about the @@ -3966,8 +3676,6 @@ export interface VirtualMachines { * * @param {array} [parameters.zones] The virtual machine zones. * - * @param {string} parameters.location Resource location - * * @param {object} [parameters.tags] Resource tags * * @param {object} [options] Optional Parameters. @@ -3981,16 +3689,16 @@ export interface VirtualMachines { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, vmName: string, parameters: models.VirtualMachine, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * The operation to create or update a virtual machine. + * The operation to update a virtual machine. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} vmName The name of the virtual machine. * - * @param {object} parameters Parameters supplied to the Create Virtual Machine + * @param {object} parameters Parameters supplied to the Update Virtual Machine * operation. * * @param {object} [parameters.plan] Specifies information about the @@ -4391,8 +4099,6 @@ export interface VirtualMachines { * * @param {array} [parameters.zones] The virtual machine zones. * - * @param {string} parameters.location Resource location - * * @param {object} [parameters.tags] Resource tags * * @param {object} [options] Optional Parameters. @@ -4422,420 +4128,322 @@ export interface VirtualMachines { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(resourceGroupName: string, vmName: string, parameters: models.VirtualMachine, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, vmName: string, parameters: models.VirtualMachine, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, vmName: string, parameters: models.VirtualMachine, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + update(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineUpdate, callback: ServiceCallback): void; + update(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineUpdate, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * The operation to update a virtual machine. + * The operation to delete a virtual machine. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} vmName The name of the virtual machine. * - * @param {object} parameters Parameters supplied to the Update Virtual Machine - * operation. + * @param {object} [options] Optional Parameters. * - * @param {object} [parameters.plan] 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**. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} [parameters.plan.name] The plan ID. + * @returns {Promise} A promise is returned * - * @param {string} [parameters.plan.publisher] The publisher ID. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {string} [parameters.plan.product] Specifies the product of the image - * from the marketplace. This is the same value as Offer under the - * imageReference element. + * @reject {Error|ServiceError} - The error object. + */ + deleteMethodWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * The operation to delete a virtual machine. * - * @param {string} [parameters.plan.promotionCode] The promotion code. + * @param {string} resourceGroupName The name of the resource group. * - * @param {object} [parameters.hardwareProfile] Specifies the hardware settings - * for the virtual machine. + * @param {string} vmName The name of the virtual machine. * - * @param {string} [parameters.hardwareProfile.vmSize] Specifies the size of - * the virtual machine. For more information about virtual machine sizes, see - * [Sizes for virtual - * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - *

    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](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) - *

    [List all available virtual machine sizes in a - * region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) - *

    [List all available virtual machine sizes for - * resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). - * 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' + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Retrieves information about the model view or the instance view of a virtual + * machine. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} vmName The name of the virtual machine. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] The expand expression to apply on the + * operation. Possible values include: 'instanceView' + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Retrieves information about the model view or the instance view of a virtual + * machine. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} vmName The name of the virtual machine. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.expand] The expand expression to apply on the + * operation. Possible values include: 'instanceView' + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {VirtualMachine} - The deserialized result object. * - * @param {object} [parameters.storageProfile] Specifies the storage settings - * for the virtual machine disks. + * @reject {Error|ServiceError} - The error object. * - * @param {object} [parameters.storageProfile.imageReference] 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. + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @param {string} [parameters.storageProfile.imageReference.publisher] The - * image publisher. + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * @param {string} [parameters.storageProfile.imageReference.offer] Specifies - * the offer of the platform image or marketplace image used to create the - * virtual machine. + * {VirtualMachine} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualMachine} for more information. * - * @param {string} [parameters.storageProfile.imageReference.sku] The image - * SKU. + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * @param {string} [parameters.storageProfile.imageReference.version] 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. + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + get(resourceGroupName: string, vmName: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, vmName: string, options: { expand? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Retrieves information about the run-time state of a virtual machine. * - * @param {string} [parameters.storageProfile.imageReference.id] Resource Id + * @param {string} resourceGroupName The name of the resource group. * - * @param {object} [parameters.storageProfile.osDisk] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + * @param {string} vmName The name of the virtual machine. * - * @param {string} [parameters.storageProfile.osDisk.osType] 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' + * @param {object} [options] Optional Parameters. * - * @param {object} [parameters.storageProfile.osDisk.encryptionSettings] - * Specifies the encryption settings for the OS Disk.

    Minimum - * api-version: 2015-06-15 + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {object} - * [parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey] - * Specifies the location of the disk encryption key, which is a Key Vault - * Secret. + * @returns {Promise} A promise is returned * - * @param {string} - * parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey.secretUrl - * The URL referencing a secret in a Key Vault. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {object} - * parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey.sourceVault - * The relative URL of the Key Vault containing the secret. + * @reject {Error|ServiceError} - The error object. + */ + instanceViewWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Retrieves information about the run-time state of a virtual machine. * - * @param {object} - * [parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey] - * Specifies the location of the key encryption key in Key Vault. + * @param {string} resourceGroupName The name of the resource group. * - * @param {string} - * parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey.keyUrl - * The URL referencing a key encryption key in Key Vault. + * @param {string} vmName The name of the virtual machine. * - * @param {object} - * parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey.sourceVault - * The relative URL of the Key Vault containing the key. + * @param {object} [options] Optional Parameters. * - * @param {boolean} - * [parameters.storageProfile.osDisk.encryptionSettings.enabled] Specifies - * whether disk encryption should be enabled on the virtual machine. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} [parameters.storageProfile.osDisk.name] The disk name. + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @param {object} [parameters.storageProfile.osDisk.vhd] The virtual hard - * disk. + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @param {object} [parameters.storageProfile.osDisk.image] 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. + * {Promise} A promise is returned. * - * @param {string} [parameters.storageProfile.osDisk.image.uri] Specifies the - * virtual hard disk's uri. + * @resolve {VirtualMachineInstanceView} - The deserialized result object. * - * @param {string} [parameters.storageProfile.osDisk.caching] 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' + * @reject {Error|ServiceError} - The error object. * - * @param {boolean} [parameters.storageProfile.osDisk.writeAcceleratorEnabled] - * Specifies whether writeAccelerator should be enabled or disabled on the - * disk. + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @param {object} [parameters.storageProfile.osDisk.diffDiskSettings] - * Specifies the differencing Disk Settings for the operating system disk used - * by the virtual machine. + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * @param {string} [parameters.storageProfile.osDisk.diffDiskSettings.option] - * Specifies the differencing disk settings for operating system disk. Possible - * values include: 'Local' + * {VirtualMachineInstanceView} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualMachineInstanceView} for more + * information. * - * @param {string} parameters.storageProfile.osDisk.createOption 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' + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * @param {number} [parameters.storageProfile.osDisk.diskSizeGB] Specifies the - * size of an empty data disk in gigabytes. This element can be used to - * overwrite the size of the disk in a virtual machine image.

    This - * value cannot be larger than 1023 GB + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + instanceView(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + instanceView(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; + instanceView(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Converts virtual machine disks from blob-based to managed disks. Virtual + * machine must be stop-deallocated before invoking this operation. * - * @param {object} [parameters.storageProfile.osDisk.managedDisk] The managed - * disk parameters. + * @param {string} resourceGroupName The name of the resource group. * - * @param {string} - * [parameters.storageProfile.osDisk.managedDisk.storageAccountType] Specifies - * the storage account type for the managed disk. NOTE: UltraSSD_LRS can only - * be used with data disks, it cannot be used with OS Disk. Possible values - * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' + * @param {string} vmName The name of the virtual machine. * - * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource - * Id + * @param {object} [options] Optional Parameters. * - * @param {array} [parameters.storageProfile.dataDisks] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {object} [parameters.additionalCapabilities] Specifies additional - * capabilities enabled or disabled on the virtual machine. + * @returns {Promise} A promise is returned * - * @param {boolean} [parameters.additionalCapabilities.ultraSSDEnabled] The - * flag that enables or disables a capability to have one or more managed data - * disks with UltraSSD_LRS storage account type on the VM or VMSS. Managed - * disks with storage account type UltraSSD_LRS can be added to a virtual - * machine or virtual machine scale set only if this property is enabled. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {object} [parameters.osProfile] Specifies the operating system - * settings for the virtual machine. + * @reject {Error|ServiceError} - The error object. + */ + convertToManagedDisksWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Converts virtual machine disks from blob-based to managed disks. Virtual + * machine must be stop-deallocated before invoking this operation. * - * @param {string} [parameters.osProfile.computerName] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). + * @param {string} resourceGroupName The name of the resource group. * - * @param {string} [parameters.osProfile.adminUsername] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • - * 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + * @param {string} vmName The name of the virtual machine. * - * @param {string} [parameters.osProfile.adminPassword] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) - *

    For resetting root password, see [Manage users, SSH, and check or - * repair disks on Azure Linux VMs using the VMAccess - * Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) + * @param {object} [options] Optional Parameters. * - * @param {string} [parameters.osProfile.customData] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {object} [parameters.osProfile.windowsConfiguration] Specifies - * Windows operating system settings on the virtual machine. + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @param {boolean} - * [parameters.osProfile.windowsConfiguration.provisionVMAgent] 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. + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @param {boolean} - * [parameters.osProfile.windowsConfiguration.enableAutomaticUpdates] Indicates - * whether virtual machine is enabled for automatic updates. + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. * - * @param {string} [parameters.osProfile.windowsConfiguration.timeZone] - * Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time" + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * @param {array} - * [parameters.osProfile.windowsConfiguration.additionalUnattendContent] - * Specifies additional base-64 encoded XML formatted information that can be - * included in the Unattend.xml file, which is used by Windows Setup. + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + convertToManagedDisks(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + convertToManagedDisks(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; + convertToManagedDisks(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Shuts down the virtual machine and releases the compute resources. You are + * not billed for the compute resources that this virtual machine uses. * - * @param {object} [parameters.osProfile.windowsConfiguration.winRM] Specifies - * the Windows Remote Management listeners. This enables remote Windows - * PowerShell. + * @param {string} resourceGroupName The name of the resource group. * - * @param {array} [parameters.osProfile.windowsConfiguration.winRM.listeners] - * The list of Windows Remote Management listeners + * @param {string} vmName The name of the virtual machine. * - * @param {object} [parameters.osProfile.linuxConfiguration] Specifies the - * Linux operating system settings on the virtual machine.

    For a list - * of supported Linux distributions, see [Linux on Azure-Endorsed - * Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - *

    For running non-endorsed distributions, see [Information for - * Non-Endorsed - * Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + * @param {object} [options] Optional Parameters. * - * @param {boolean} - * [parameters.osProfile.linuxConfiguration.disablePasswordAuthentication] - * Specifies whether password authentication should be disabled. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {object} [parameters.osProfile.linuxConfiguration.ssh] Specifies the - * ssh key configuration for a Linux OS. + * @returns {Promise} A promise is returned * - * @param {array} [parameters.osProfile.linuxConfiguration.ssh.publicKeys] The - * list of SSH public keys used to authenticate with linux based VMs. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {boolean} [parameters.osProfile.linuxConfiguration.provisionVMAgent] - * 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. + * @reject {Error|ServiceError} - The error object. + */ + deallocateWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Shuts down the virtual machine and releases the compute resources. You are + * not billed for the compute resources that this virtual machine uses. * - * @param {array} [parameters.osProfile.secrets] Specifies set of certificates - * that should be installed onto the virtual machine. + * @param {string} resourceGroupName The name of the resource group. * - * @param {boolean} [parameters.osProfile.allowExtensionOperations] Specifies - * whether extension operations should be allowed on the virtual machine. - *

    This may only be set to False when no extensions are present on the - * virtual machine. + * @param {string} vmName The name of the virtual machine. * - * @param {object} [parameters.networkProfile] Specifies the network interfaces - * of the virtual machine. + * @param {object} [options] Optional Parameters. * - * @param {array} [parameters.networkProfile.networkInterfaces] Specifies the - * list of resource Ids for the network interfaces associated with the virtual - * machine. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {object} [parameters.diagnosticsProfile] Specifies the boot - * diagnostic settings state.

    Minimum api-version: 2015-06-15. + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @param {object} [parameters.diagnosticsProfile.bootDiagnostics] Boot - * Diagnostics is a debugging feature which allows you to view Console Output - * and Screenshot to diagnose VM status.

    You can easily view the - * output of your console log.

    Azure also enables you to see a - * screenshot of the VM from the hypervisor. + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @param {boolean} [parameters.diagnosticsProfile.bootDiagnostics.enabled] - * Whether boot diagnostics should be enabled on the Virtual Machine. + * {Promise} A promise is returned. * - * @param {string} [parameters.diagnosticsProfile.bootDiagnostics.storageUri] - * Uri of the storage account to use for placing the console output and - * screenshot. + * @resolve {null} - The deserialized result object. * - * @param {object} [parameters.availabilitySet] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - *

    For more information on Azure planned maintainance, see [Planned - * maintenance for virtual machines in - * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) - *

    Currently, a VM can only be added to availability set at creation - * time. An existing VM cannot be added to an availability set. + * @reject {Error|ServiceError} - The error object. * - * @param {string} [parameters.availabilitySet.id] Resource Id + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @param {string} [parameters.licenseType] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) - *

    Minimum api-version: 2015-06-15 + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * @param {object} [parameters.identity] The identity of the virtual machine, - * if configured. + * {null} [result] - The deserialized result object if an error did not occur. * - * @param {string} [parameters.identity.type] 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' + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * @param {object} [parameters.identity.userAssignedIdentities] The list of - * user identities associated with the Virtual Machine. The user identity - * dictionary key references will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + deallocate(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deallocate(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; + deallocate(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Sets the state of the virtual machine to generalized. * - * @param {array} [parameters.zones] The virtual machine zones. + * @param {string} resourceGroupName The name of the resource group. * - * @param {object} [parameters.tags] Resource tags + * @param {string} vmName The name of the virtual machine. * * @param {object} [options] Optional Parameters. * @@ -4844,421 +4452,312 @@ export interface VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + generalizeWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * The operation to update a virtual machine. + * Sets the state of the virtual machine to generalized. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} vmName The name of the virtual machine. * - * @param {object} parameters Parameters supplied to the Update Virtual Machine - * operation. + * @param {object} [options] Optional Parameters. * - * @param {object} [parameters.plan] 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**. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} [parameters.plan.name] The plan ID. + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @param {string} [parameters.plan.publisher] The publisher ID. + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @param {string} [parameters.plan.product] Specifies the product of the image - * from the marketplace. This is the same value as Offer under the - * imageReference element. + * {Promise} A promise is returned. * - * @param {string} [parameters.plan.promotionCode] The promotion code. + * @resolve {null} - The deserialized result object. * - * @param {object} [parameters.hardwareProfile] Specifies the hardware settings - * for the virtual machine. + * @reject {Error|ServiceError} - The error object. * - * @param {string} [parameters.hardwareProfile.vmSize] Specifies the size of - * the virtual machine. For more information about virtual machine sizes, see - * [Sizes for virtual - * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - *

    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](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) - *

    [List all available virtual machine sizes in a - * region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) - *

    [List all available virtual machine sizes for - * resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). - * 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' + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + generalize(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + generalize(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; + generalize(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * 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. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {object} [parameters.storageProfile] Specifies the storage settings - * for the virtual machine disks. + * @reject {Error|ServiceError} - The error object. + */ + listWithHttpOperationResponse(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): 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. * - * @param {object} [parameters.storageProfile.imageReference] 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. + * @param {string} resourceGroupName The name of the resource group. * - * @param {string} [parameters.storageProfile.imageReference.publisher] The - * image publisher. + * @param {object} [options] Optional Parameters. * - * @param {string} [parameters.storageProfile.imageReference.offer] Specifies - * the offer of the platform image or marketplace image used to create the - * virtual machine. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} [parameters.storageProfile.imageReference.sku] The image - * SKU. + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @param {string} [parameters.storageProfile.imageReference.version] 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. + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @param {string} [parameters.storageProfile.imageReference.id] Resource Id + * {Promise} A promise is returned. * - * @param {object} [parameters.storageProfile.osDisk] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + * @resolve {VirtualMachineListResult} - The deserialized result object. * - * @param {string} [parameters.storageProfile.osDisk.osType] 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' + * @reject {Error|ServiceError} - The error object. * - * @param {object} [parameters.storageProfile.osDisk.encryptionSettings] - * Specifies the encryption settings for the OS Disk.

    Minimum - * api-version: 2015-06-15 + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @param {object} - * [parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey] - * Specifies the location of the disk encryption key, which is a Key Vault - * Secret. + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * @param {string} - * parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey.secretUrl - * The URL referencing a secret in a Key Vault. + * {VirtualMachineListResult} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualMachineListResult} for more + * information. * - * @param {object} - * parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey.sourceVault - * The relative URL of the Key Vault containing the secret. + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * @param {object} - * [parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey] - * Specifies the location of the key encryption key in Key Vault. + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + list(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * 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. * - * @param {string} - * parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey.keyUrl - * The URL referencing a key encryption key in Key Vault. + * @param {object} [options] Optional Parameters. * - * @param {object} - * parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey.sourceVault - * The relative URL of the Key Vault containing the key. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {boolean} - * [parameters.storageProfile.osDisk.encryptionSettings.enabled] Specifies - * whether disk encryption should be enabled on the virtual machine. + * @returns {Promise} A promise is returned * - * @param {string} [parameters.storageProfile.osDisk.name] The disk name. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {object} [parameters.storageProfile.osDisk.vhd] The virtual hard - * disk. + * @reject {Error|ServiceError} - The error object. + */ + listAllWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): 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. * - * @param {object} [parameters.storageProfile.osDisk.image] 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. + * @param {object} [options] Optional Parameters. * - * @param {string} [parameters.storageProfile.osDisk.image.uri] Specifies the - * virtual hard disk's uri. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} [parameters.storageProfile.osDisk.caching] 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' + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @param {boolean} [parameters.storageProfile.osDisk.writeAcceleratorEnabled] - * Specifies whether writeAccelerator should be enabled or disabled on the - * disk. + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @param {object} [parameters.storageProfile.osDisk.diffDiskSettings] - * Specifies the differencing Disk Settings for the operating system disk used - * by the virtual machine. + * {Promise} A promise is returned. * - * @param {string} [parameters.storageProfile.osDisk.diffDiskSettings.option] - * Specifies the differencing disk settings for operating system disk. Possible - * values include: 'Local' + * @resolve {VirtualMachineListResult} - The deserialized result object. * - * @param {string} parameters.storageProfile.osDisk.createOption 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' + * @reject {Error|ServiceError} - The error object. * - * @param {number} [parameters.storageProfile.osDisk.diskSizeGB] Specifies the - * size of an empty data disk in gigabytes. This element can be used to - * overwrite the size of the disk in a virtual machine image.

    This - * value cannot be larger than 1023 GB + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @param {object} [parameters.storageProfile.osDisk.managedDisk] The managed - * disk parameters. + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * @param {string} - * [parameters.storageProfile.osDisk.managedDisk.storageAccountType] Specifies - * the storage account type for the managed disk. NOTE: UltraSSD_LRS can only - * be used with data disks, it cannot be used with OS Disk. Possible values - * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' + * {VirtualMachineListResult} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualMachineListResult} for more + * information. * - * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource - * Id + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * @param {array} [parameters.storageProfile.dataDisks] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listAll(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listAll(callback: ServiceCallback): void; + listAll(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Lists all available virtual machine sizes to which the specified virtual + * machine can be resized. * - * @param {object} [parameters.additionalCapabilities] Specifies additional - * capabilities enabled or disabled on the virtual machine. + * @param {string} resourceGroupName The name of the resource group. * - * @param {boolean} [parameters.additionalCapabilities.ultraSSDEnabled] The - * flag that enables or disables a capability to have one or more managed data - * disks with UltraSSD_LRS storage account type on the VM or VMSS. Managed - * disks with storage account type UltraSSD_LRS can be added to a virtual - * machine or virtual machine scale set only if this property is enabled. + * @param {string} vmName The name of the virtual machine. * - * @param {object} [parameters.osProfile] Specifies the operating system - * settings for the virtual machine. + * @param {object} [options] Optional Parameters. * - * @param {string} [parameters.osProfile.computerName] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} [parameters.osProfile.adminUsername] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • - * 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listAvailableSizesWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Lists all available virtual machine sizes to which the specified virtual + * machine can be resized. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} vmName The name of the virtual machine. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {VirtualMachineSizeListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {VirtualMachineSizeListResult} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualMachineSizeListResult} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listAvailableSizes(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listAvailableSizes(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; + listAvailableSizes(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * 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. * - * @param {string} [parameters.osProfile.adminPassword] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) - *

    For resetting root password, see [Manage users, SSH, and check or - * repair disks on Azure Linux VMs using the VMAccess - * Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) + * @param {string} resourceGroupName The name of the resource group. * - * @param {string} [parameters.osProfile.customData] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + * @param {string} vmName The name of the virtual machine. * - * @param {object} [parameters.osProfile.windowsConfiguration] Specifies - * Windows operating system settings on the virtual machine. + * @param {object} [options] Optional Parameters. * - * @param {boolean} - * [parameters.osProfile.windowsConfiguration.provisionVMAgent] 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. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {boolean} - * [parameters.osProfile.windowsConfiguration.enableAutomaticUpdates] Indicates - * whether virtual machine is enabled for automatic updates. + * @returns {Promise} A promise is returned * - * @param {string} [parameters.osProfile.windowsConfiguration.timeZone] - * Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time" + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {array} - * [parameters.osProfile.windowsConfiguration.additionalUnattendContent] - * Specifies additional base-64 encoded XML formatted information that can be - * included in the Unattend.xml file, which is used by Windows Setup. + * @reject {Error|ServiceError} - The error object. + */ + powerOffWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * 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. * - * @param {object} [parameters.osProfile.windowsConfiguration.winRM] Specifies - * the Windows Remote Management listeners. This enables remote Windows - * PowerShell. + * @param {string} resourceGroupName The name of the resource group. * - * @param {array} [parameters.osProfile.windowsConfiguration.winRM.listeners] - * The list of Windows Remote Management listeners + * @param {string} vmName The name of the virtual machine. * - * @param {object} [parameters.osProfile.linuxConfiguration] Specifies the - * Linux operating system settings on the virtual machine.

    For a list - * of supported Linux distributions, see [Linux on Azure-Endorsed - * Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - *

    For running non-endorsed distributions, see [Information for - * Non-Endorsed - * Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + * @param {object} [options] Optional Parameters. * - * @param {boolean} - * [parameters.osProfile.linuxConfiguration.disablePasswordAuthentication] - * Specifies whether password authentication should be disabled. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {object} [parameters.osProfile.linuxConfiguration.ssh] Specifies the - * ssh key configuration for a Linux OS. + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @param {array} [parameters.osProfile.linuxConfiguration.ssh.publicKeys] The - * list of SSH public keys used to authenticate with linux based VMs. + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @param {boolean} [parameters.osProfile.linuxConfiguration.provisionVMAgent] - * 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. + * {Promise} A promise is returned. * - * @param {array} [parameters.osProfile.secrets] Specifies set of certificates - * that should be installed onto the virtual machine. + * @resolve {null} - The deserialized result object. * - * @param {boolean} [parameters.osProfile.allowExtensionOperations] Specifies - * whether extension operations should be allowed on the virtual machine. - *

    This may only be set to False when no extensions are present on the - * virtual machine. + * @reject {Error|ServiceError} - The error object. * - * @param {object} [parameters.networkProfile] Specifies the network interfaces - * of the virtual machine. + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @param {array} [parameters.networkProfile.networkInterfaces] Specifies the - * list of resource Ids for the network interfaces associated with the virtual - * machine. + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * @param {object} [parameters.diagnosticsProfile] Specifies the boot - * diagnostic settings state.

    Minimum api-version: 2015-06-15. + * {null} [result] - The deserialized result object if an error did not occur. * - * @param {object} [parameters.diagnosticsProfile.bootDiagnostics] Boot - * Diagnostics is a debugging feature which allows you to view Console Output - * and Screenshot to diagnose VM status.

    You can easily view the - * output of your console log.

    Azure also enables you to see a - * screenshot of the VM from the hypervisor. + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * @param {boolean} [parameters.diagnosticsProfile.bootDiagnostics.enabled] - * Whether boot diagnostics should be enabled on the Virtual Machine. + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + powerOff(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + powerOff(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; + powerOff(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * The operation to restart a virtual machine. * - * @param {string} [parameters.diagnosticsProfile.bootDiagnostics.storageUri] - * Uri of the storage account to use for placing the console output and - * screenshot. + * @param {string} resourceGroupName The name of the resource group. * - * @param {object} [parameters.availabilitySet] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - *

    For more information on Azure planned maintainance, see [Planned - * maintenance for virtual machines in - * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) - *

    Currently, a VM can only be added to availability set at creation - * time. An existing VM cannot be added to an availability set. + * @param {string} vmName The name of the virtual machine. * - * @param {string} [parameters.availabilitySet.id] Resource Id + * @param {object} [options] Optional Parameters. * - * @param {string} [parameters.licenseType] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) - *

    Minimum api-version: 2015-06-15 + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {object} [parameters.identity] The identity of the virtual machine, - * if configured. + * @returns {Promise} A promise is returned * - * @param {string} [parameters.identity.type] 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' + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {object} [parameters.identity.userAssignedIdentities] The list of - * user identities associated with the Virtual Machine. The user identity - * dictionary key references will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + * @reject {Error|ServiceError} - The error object. + */ + restartWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * The operation to restart a virtual machine. * - * @param {array} [parameters.zones] The virtual machine zones. + * @param {string} resourceGroupName The name of the resource group. * - * @param {object} [parameters.tags] Resource tags + * @param {string} vmName The name of the virtual machine. * * @param {object} [options] Optional Parameters. * @@ -5272,7 +4771,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {VirtualMachine} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -5280,20 +4779,19 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {VirtualMachine} [result] - The deserialized result object if an error did not occur. - * See {@link VirtualMachine} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - update(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - update(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineUpdate, callback: ServiceCallback): void; - update(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineUpdate, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + restart(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + restart(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; + restart(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * The operation to delete a virtual machine. + * The operation to start a virtual machine. * * @param {string} resourceGroupName The name of the resource group. * @@ -5310,10 +4808,10 @@ export interface VirtualMachines { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + startWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * The operation to delete a virtual machine. + * The operation to start a virtual machine. * * @param {string} resourceGroupName The name of the resource group. * @@ -5345,14 +4843,13 @@ export interface VirtualMachines { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + start(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + start(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; + start(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Retrieves information about the model view or the instance view of a virtual - * machine. + * The operation to redeploy a virtual machine. * * @param {string} resourceGroupName The name of the resource group. * @@ -5360,23 +4857,19 @@ export interface VirtualMachines { * * @param {object} [options] Optional Parameters. * - * @param {string} [options.expand] The expand expression to apply on the - * operation. Possible values include: 'instanceView' - * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + redeployWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Retrieves information about the model view or the instance view of a virtual - * machine. + * The operation to redeploy a virtual machine. * * @param {string} resourceGroupName The name of the resource group. * @@ -5384,9 +4877,6 @@ export interface VirtualMachines { * * @param {object} [options] Optional Parameters. * - * @param {string} [options.expand] The expand expression to apply on the - * operation. Possible values include: 'instanceView' - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -5397,7 +4887,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {VirtualMachine} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -5405,20 +4895,19 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {VirtualMachine} [result] - The deserialized result object if an error did not occur. - * See {@link VirtualMachine} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName: string, vmName: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, vmName: string, options: { expand? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + redeploy(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + redeploy(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; + redeploy(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Retrieves information about the run-time state of a virtual machine. + * The operation to perform maintenance on a virtual machine. * * @param {string} resourceGroupName The name of the resource group. * @@ -5431,14 +4920,14 @@ export interface VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - instanceViewWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + performMaintenanceWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Retrieves information about the run-time state of a virtual machine. + * The operation to perform maintenance on a virtual machine. * * @param {string} resourceGroupName The name of the resource group. * @@ -5456,7 +4945,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {VirtualMachineInstanceView} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -5464,27 +4953,34 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {VirtualMachineInstanceView} [result] - The deserialized result object if an error did not occur. - * See {@link VirtualMachineInstanceView} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - instanceView(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - instanceView(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; - instanceView(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + performMaintenance(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + performMaintenance(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; + performMaintenance(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - /** - * Converts virtual machine disks from blob-based to managed disks. Virtual - * machine must be stop-deallocated before invoking this operation. + /** + * Run command on the VM. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} vmName The name of the virtual machine. * + * @param {object} parameters Parameters supplied to the Run command operation. + * + * @param {string} parameters.commandId The run command id. + * + * @param {array} [parameters.script] Optional. The script to be executed. + * When this value is given, the given script will override the default script + * of the command. + * + * @param {array} [parameters.parameters] The run command parameters. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -5492,20 +4988,29 @@ export interface VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - convertToManagedDisksWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + runCommandWithHttpOperationResponse(resourceGroupName: string, vmName: string, parameters: models.RunCommandInput, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Converts virtual machine disks from blob-based to managed disks. Virtual - * machine must be stop-deallocated before invoking this operation. + * Run command on the VM. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} vmName The name of the virtual machine. * + * @param {object} parameters Parameters supplied to the Run command operation. + * + * @param {string} parameters.commandId The run command id. + * + * @param {array} [parameters.script] Optional. The script to be executed. + * When this value is given, the given script will override the default script + * of the command. + * + * @param {array} [parameters.parameters] The run command parameters. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -5518,7 +5023,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {RunCommandResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -5526,25 +5031,38 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {RunCommandResult} [result] - The deserialized result object if an error did not occur. + * See {@link RunCommandResult} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - convertToManagedDisks(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - convertToManagedDisks(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; - convertToManagedDisks(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + runCommand(resourceGroupName: string, vmName: string, parameters: models.RunCommandInput, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + runCommand(resourceGroupName: string, vmName: string, parameters: models.RunCommandInput, callback: ServiceCallback): void; + runCommand(resourceGroupName: string, vmName: string, parameters: models.RunCommandInput, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Shuts down the virtual machine and releases the compute resources. You are - * not billed for the compute resources that this virtual machine uses. + * Captures the VM by copying virtual hard disks of the VM and outputs a + * template that can be used to create similar VMs. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} vmName The name of the virtual machine. * + * @param {object} parameters Parameters supplied to the Capture Virtual + * Machine operation. + * + * @param {string} parameters.vhdPrefix The captured virtual hard disk's name + * prefix. + * + * @param {string} parameters.destinationContainerName The destination + * container name. + * + * @param {boolean} parameters.overwriteVhds Specifies whether to overwrite the + * destination virtual hard disk, in case of conflict. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -5552,20 +5070,32 @@ export interface VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - deallocateWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginCaptureWithHttpOperationResponse(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineCaptureParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Shuts down the virtual machine and releases the compute resources. You are - * not billed for the compute resources that this virtual machine uses. + * Captures the VM by copying virtual hard disks of the VM and outputs a + * template that can be used to create similar VMs. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} vmName The name of the virtual machine. * + * @param {object} parameters Parameters supplied to the Capture Virtual + * Machine operation. + * + * @param {string} parameters.vhdPrefix The captured virtual hard disk's name + * prefix. + * + * @param {string} parameters.destinationContainerName The destination + * container name. + * + * @param {boolean} parameters.overwriteVhds Specifies whether to overwrite the + * destination virtual hard disk, in case of conflict. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -5578,7 +5108,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {VirtualMachineCaptureResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -5586,194 +5116,430 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {VirtualMachineCaptureResult} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualMachineCaptureResult} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deallocate(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deallocate(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; - deallocate(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginCapture(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineCaptureParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCapture(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineCaptureParameters, callback: ServiceCallback): void; + beginCapture(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineCaptureParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Sets the state of the virtual machine to generalized. + * The operation to create or update a virtual machine. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} vmName The name of the virtual machine. * - * @param {object} [options] Optional Parameters. + * @param {object} parameters Parameters supplied to the Create Virtual Machine + * operation. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {object} [parameters.plan] 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**. * - * @returns {Promise} A promise is returned + * @param {string} [parameters.plan.name] The plan ID. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {string} [parameters.plan.publisher] The publisher ID. * - * @reject {Error|ServiceError} - The error object. - */ - generalizeWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Sets the state of the virtual machine to generalized. + * @param {string} [parameters.plan.product] Specifies the product of the image + * from the marketplace. This is the same value as Offer under the + * imageReference element. * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} [parameters.plan.promotionCode] The promotion code. * - * @param {string} vmName The name of the virtual machine. + * @param {object} [parameters.hardwareProfile] Specifies the hardware settings + * for the virtual machine. * - * @param {object} [options] Optional Parameters. + * @param {string} [parameters.hardwareProfile.vmSize] Specifies the size of + * the virtual machine. For more information about virtual machine sizes, see + * [Sizes for virtual + * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + *

    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](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) + *

    [List all available virtual machine sizes in a + * region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) + *

    [List all available virtual machine sizes for + * resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). + * 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' * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {object} [parameters.storageProfile] Specifies the storage settings + * for the virtual machine disks. + * + * @param {object} [parameters.storageProfile.imageReference] 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. + * + * @param {string} [parameters.storageProfile.imageReference.publisher] The + * image publisher. + * + * @param {string} [parameters.storageProfile.imageReference.offer] Specifies + * the offer of the platform image or marketplace image used to create the + * virtual machine. + * + * @param {string} [parameters.storageProfile.imageReference.sku] The image + * SKU. + * + * @param {string} [parameters.storageProfile.imageReference.version] 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. + * + * @param {string} [parameters.storageProfile.imageReference.id] Resource Id + * + * @param {object} [parameters.storageProfile.osDisk] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + * + * @param {string} [parameters.storageProfile.osDisk.osType] 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' + * + * @param {object} [parameters.storageProfile.osDisk.encryptionSettings] + * Specifies the encryption settings for the OS Disk.

    Minimum + * api-version: 2015-06-15 + * + * @param {object} + * [parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey] + * Specifies the location of the disk encryption key, which is a Key Vault + * Secret. + * + * @param {string} + * parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey.secretUrl + * The URL referencing a secret in a Key Vault. + * + * @param {object} + * parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey.sourceVault + * The relative URL of the Key Vault containing the secret. + * + * @param {object} + * [parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey] + * Specifies the location of the key encryption key in Key Vault. + * + * @param {string} + * parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey.keyUrl + * The URL referencing a key encryption key in Key Vault. + * + * @param {object} + * parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey.sourceVault + * The relative URL of the Key Vault containing the key. + * + * @param {boolean} + * [parameters.storageProfile.osDisk.encryptionSettings.enabled] Specifies + * whether disk encryption should be enabled on the virtual machine. + * + * @param {string} [parameters.storageProfile.osDisk.name] The disk name. + * + * @param {object} [parameters.storageProfile.osDisk.vhd] The virtual hard + * disk. * - * @param {ServiceCallback} [optionalCallback] - The optional callback. + * @param {object} [parameters.storageProfile.osDisk.image] 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. * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. + * @param {string} [parameters.storageProfile.osDisk.image.uri] Specifies the + * virtual hard disk's uri. * - * {Promise} A promise is returned. + * @param {string} [parameters.storageProfile.osDisk.caching] 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' * - * @resolve {null} - The deserialized result object. + * @param {boolean} [parameters.storageProfile.osDisk.writeAcceleratorEnabled] + * Specifies whether writeAccelerator should be enabled or disabled on the + * disk. * - * @reject {Error|ServiceError} - The error object. + * @param {object} [parameters.storageProfile.osDisk.diffDiskSettings] + * Specifies the differencing Disk Settings for the operating system disk used + * by the virtual machine. * - * {ServiceCallback} optionalCallback(err, result, request, response) + * @param {string} [parameters.storageProfile.osDisk.diffDiskSettings.option] + * Specifies the differencing disk settings for operating system disk. Possible + * values include: 'Local' * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * @param {string} parameters.storageProfile.osDisk.createOption 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' * - * {null} [result] - The deserialized result object if an error did not occur. + * @param {number} [parameters.storageProfile.osDisk.diskSizeGB] Specifies the + * size of an empty data disk in gigabytes. This element can be used to + * overwrite the size of the disk in a virtual machine image.

    This + * value cannot be larger than 1023 GB * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @param {object} [parameters.storageProfile.osDisk.managedDisk] The managed + * disk parameters. * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - generalize(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - generalize(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; - generalize(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * 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. + * @param {string} + * [parameters.storageProfile.osDisk.managedDisk.storageAccountType] Specifies + * the storage account type for the managed disk. NOTE: UltraSSD_LRS can only + * be used with data disks, it cannot be used with OS Disk. Possible values + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource + * Id * - * @param {object} [options] Optional Parameters. + * @param {array} [parameters.storageProfile.dataDisks] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {object} [parameters.additionalCapabilities] Specifies additional + * capabilities enabled or disabled on the virtual machine. * - * @returns {Promise} A promise is returned + * @param {boolean} [parameters.additionalCapabilities.ultraSSDEnabled] The + * flag that enables or disables a capability to have one or more managed data + * disks with UltraSSD_LRS storage account type on the VM or VMSS. Managed + * disks with storage account type UltraSSD_LRS can be added to a virtual + * machine or virtual machine scale set only if this property is enabled. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {object} [parameters.osProfile] Specifies the operating system + * settings for the virtual machine. * - * @reject {Error|ServiceError} - The error object. - */ - listWithHttpOperationResponse(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): 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. + * @param {string} [parameters.osProfile.computerName] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} [parameters.osProfile.adminUsername] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • + * 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) * - * @param {object} [options] Optional Parameters. + * @param {string} [parameters.osProfile.adminPassword] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) + *

    For resetting root password, see [Manage users, SSH, and check or + * repair disks on Azure Linux VMs using the VMAccess + * Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {string} [parameters.osProfile.customData] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) * - * @param {ServiceCallback} [optionalCallback] - The optional callback. + * @param {object} [parameters.osProfile.windowsConfiguration] Specifies + * Windows operating system settings on the virtual machine. * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. + * @param {boolean} + * [parameters.osProfile.windowsConfiguration.provisionVMAgent] 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. * - * {Promise} A promise is returned. + * @param {boolean} + * [parameters.osProfile.windowsConfiguration.enableAutomaticUpdates] Indicates + * whether virtual machine is enabled for automatic updates. * - * @resolve {VirtualMachineListResult} - The deserialized result object. + * @param {string} [parameters.osProfile.windowsConfiguration.timeZone] + * Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time" * - * @reject {Error|ServiceError} - The error object. + * @param {array} + * [parameters.osProfile.windowsConfiguration.additionalUnattendContent] + * Specifies additional base-64 encoded XML formatted information that can be + * included in the Unattend.xml file, which is used by Windows Setup. * - * {ServiceCallback} optionalCallback(err, result, request, response) + * @param {object} [parameters.osProfile.windowsConfiguration.winRM] Specifies + * the Windows Remote Management listeners. This enables remote Windows + * PowerShell. * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * @param {array} [parameters.osProfile.windowsConfiguration.winRM.listeners] + * The list of Windows Remote Management listeners * - * {VirtualMachineListResult} [result] - The deserialized result object if an error did not occur. - * See {@link VirtualMachineListResult} for more - * information. + * @param {object} [parameters.osProfile.linuxConfiguration] Specifies the + * Linux operating system settings on the virtual machine.

    For a list + * of supported Linux distributions, see [Linux on Azure-Endorsed + * Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + *

    For running non-endorsed distributions, see [Information for + * Non-Endorsed + * Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @param {boolean} + * [parameters.osProfile.linuxConfiguration.disablePasswordAuthentication] + * Specifies whether password authentication should be disabled. * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - list(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - list(resourceGroupName: string, callback: ServiceCallback): void; - list(resourceGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * 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. + * @param {object} [parameters.osProfile.linuxConfiguration.ssh] Specifies the + * ssh key configuration for a Linux OS. * - * @param {object} [options] Optional Parameters. + * @param {array} [parameters.osProfile.linuxConfiguration.ssh.publicKeys] The + * list of SSH public keys used to authenticate with linux based VMs. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {boolean} [parameters.osProfile.linuxConfiguration.provisionVMAgent] + * 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. * - * @returns {Promise} A promise is returned + * @param {array} [parameters.osProfile.secrets] Specifies set of certificates + * that should be installed onto the virtual machine. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {boolean} [parameters.osProfile.allowExtensionOperations] Specifies + * whether extension operations should be allowed on the virtual machine. + *

    This may only be set to False when no extensions are present on the + * virtual machine. * - * @reject {Error|ServiceError} - The error object. - */ - listAllWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): 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. + * @param {object} [parameters.networkProfile] Specifies the network interfaces + * of the virtual machine. * - * @param {object} [options] Optional Parameters. + * @param {array} [parameters.networkProfile.networkInterfaces] Specifies the + * list of resource Ids for the network interfaces associated with the virtual + * machine. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {object} [parameters.diagnosticsProfile] Specifies the boot + * diagnostic settings state.

    Minimum api-version: 2015-06-15. * - * @param {ServiceCallback} [optionalCallback] - The optional callback. + * @param {object} [parameters.diagnosticsProfile.bootDiagnostics] Boot + * Diagnostics is a debugging feature which allows you to view Console Output + * and Screenshot to diagnose VM status.

    You can easily view the + * output of your console log.

    Azure also enables you to see a + * screenshot of the VM from the hypervisor. * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. + * @param {boolean} [parameters.diagnosticsProfile.bootDiagnostics.enabled] + * Whether boot diagnostics should be enabled on the Virtual Machine. * - * {Promise} A promise is returned. + * @param {string} [parameters.diagnosticsProfile.bootDiagnostics.storageUri] + * Uri of the storage account to use for placing the console output and + * screenshot. * - * @resolve {VirtualMachineListResult} - The deserialized result object. + * @param {object} [parameters.availabilitySet] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + *

    For more information on Azure planned maintainance, see [Planned + * maintenance for virtual machines in + * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) + *

    Currently, a VM can only be added to availability set at creation + * time. An existing VM cannot be added to an availability set. * - * @reject {Error|ServiceError} - The error object. + * @param {string} [parameters.availabilitySet.id] Resource Id * - * {ServiceCallback} optionalCallback(err, result, request, response) + * @param {string} [parameters.licenseType] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) + *

    Minimum api-version: 2015-06-15 * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * @param {object} [parameters.identity] The identity of the virtual machine, + * if configured. * - * {VirtualMachineListResult} [result] - The deserialized result object if an error did not occur. - * See {@link VirtualMachineListResult} for more - * information. + * @param {string} [parameters.identity.type] 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' * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @param {object} [parameters.identity.userAssignedIdentities] The list of + * user identities associated with the Virtual Machine. The user identity + * dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - listAll(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listAll(callback: ServiceCallback): void; - listAll(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * Lists all available virtual machine sizes to which the specified virtual - * machine can be resized. + * @param {array} [parameters.zones] The virtual machine zones. * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} parameters.location Resource location * - * @param {string} vmName The name of the virtual machine. + * @param {object} [parameters.tags] Resource tags * * @param {object} [options] Optional Parameters. * @@ -5782,257 +5548,423 @@ export interface VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listAvailableSizesWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, vmName: string, parameters: models.VirtualMachine, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Lists all available virtual machine sizes to which the specified virtual - * machine can be resized. + * The operation to create or update a virtual machine. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} vmName The name of the virtual machine. * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned. - * - * @resolve {VirtualMachineSizeListResult} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - * - * {ServiceCallback} optionalCallback(err, result, request, response) - * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. - * - * {VirtualMachineSizeListResult} [result] - The deserialized result object if an error did not occur. - * See {@link VirtualMachineSizeListResult} for more - * information. + * @param {object} parameters Parameters supplied to the Create Virtual Machine + * operation. * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @param {object} [parameters.plan] 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**. * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - listAvailableSizes(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listAvailableSizes(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; - listAvailableSizes(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * 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. + * @param {string} [parameters.plan.name] The plan ID. * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} [parameters.plan.publisher] The publisher ID. * - * @param {string} vmName The name of the virtual machine. + * @param {string} [parameters.plan.product] Specifies the product of the image + * from the marketplace. This is the same value as Offer under the + * imageReference element. * - * @param {object} [options] Optional Parameters. + * @param {string} [parameters.plan.promotionCode] The promotion code. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {object} [parameters.hardwareProfile] Specifies the hardware settings + * for the virtual machine. * - * @returns {Promise} A promise is returned + * @param {string} [parameters.hardwareProfile.vmSize] Specifies the size of + * the virtual machine. For more information about virtual machine sizes, see + * [Sizes for virtual + * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + *

    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](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) + *

    [List all available virtual machine sizes in a + * region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) + *

    [List all available virtual machine sizes for + * resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). + * 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' * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {object} [parameters.storageProfile] Specifies the storage settings + * for the virtual machine disks. * - * @reject {Error|ServiceError} - The error object. - */ - powerOffWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * 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. + * @param {object} [parameters.storageProfile.imageReference] 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. * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} [parameters.storageProfile.imageReference.publisher] The + * image publisher. * - * @param {string} vmName The name of the virtual machine. + * @param {string} [parameters.storageProfile.imageReference.offer] Specifies + * the offer of the platform image or marketplace image used to create the + * virtual machine. * - * @param {object} [options] Optional Parameters. + * @param {string} [parameters.storageProfile.imageReference.sku] The image + * SKU. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {string} [parameters.storageProfile.imageReference.version] 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. * - * @param {ServiceCallback} [optionalCallback] - The optional callback. + * @param {string} [parameters.storageProfile.imageReference.id] Resource Id * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. + * @param {object} [parameters.storageProfile.osDisk] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * - * {Promise} A promise is returned. + * @param {string} [parameters.storageProfile.osDisk.osType] 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' * - * @resolve {null} - The deserialized result object. + * @param {object} [parameters.storageProfile.osDisk.encryptionSettings] + * Specifies the encryption settings for the OS Disk.

    Minimum + * api-version: 2015-06-15 * - * @reject {Error|ServiceError} - The error object. + * @param {object} + * [parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey] + * Specifies the location of the disk encryption key, which is a Key Vault + * Secret. * - * {ServiceCallback} optionalCallback(err, result, request, response) + * @param {string} + * parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey.secretUrl + * The URL referencing a secret in a Key Vault. * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * @param {object} + * parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey.sourceVault + * The relative URL of the Key Vault containing the secret. * - * {null} [result] - The deserialized result object if an error did not occur. + * @param {object} + * [parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey] + * Specifies the location of the key encryption key in Key Vault. * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @param {string} + * parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey.keyUrl + * The URL referencing a key encryption key in Key Vault. * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - powerOff(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - powerOff(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; - powerOff(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * The operation to restart a virtual machine. + * @param {object} + * parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey.sourceVault + * The relative URL of the Key Vault containing the key. * - * @param {string} resourceGroupName The name of the resource group. + * @param {boolean} + * [parameters.storageProfile.osDisk.encryptionSettings.enabled] Specifies + * whether disk encryption should be enabled on the virtual machine. * - * @param {string} vmName The name of the virtual machine. + * @param {string} [parameters.storageProfile.osDisk.name] The disk name. * - * @param {object} [options] Optional Parameters. + * @param {object} [parameters.storageProfile.osDisk.vhd] The virtual hard + * disk. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {object} [parameters.storageProfile.osDisk.image] 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. * - * @returns {Promise} A promise is returned + * @param {string} [parameters.storageProfile.osDisk.image.uri] Specifies the + * virtual hard disk's uri. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {string} [parameters.storageProfile.osDisk.caching] 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' * - * @reject {Error|ServiceError} - The error object. - */ - restartWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * The operation to restart a virtual machine. + * @param {boolean} [parameters.storageProfile.osDisk.writeAcceleratorEnabled] + * Specifies whether writeAccelerator should be enabled or disabled on the + * disk. * - * @param {string} resourceGroupName The name of the resource group. + * @param {object} [parameters.storageProfile.osDisk.diffDiskSettings] + * Specifies the differencing Disk Settings for the operating system disk used + * by the virtual machine. * - * @param {string} vmName The name of the virtual machine. + * @param {string} [parameters.storageProfile.osDisk.diffDiskSettings.option] + * Specifies the differencing disk settings for operating system disk. Possible + * values include: 'Local' * - * @param {object} [options] Optional Parameters. + * @param {string} parameters.storageProfile.osDisk.createOption 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' * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {number} [parameters.storageProfile.osDisk.diskSizeGB] Specifies the + * size of an empty data disk in gigabytes. This element can be used to + * overwrite the size of the disk in a virtual machine image.

    This + * value cannot be larger than 1023 GB * - * @param {ServiceCallback} [optionalCallback] - The optional callback. + * @param {object} [parameters.storageProfile.osDisk.managedDisk] The managed + * disk parameters. * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. + * @param {string} + * [parameters.storageProfile.osDisk.managedDisk.storageAccountType] Specifies + * the storage account type for the managed disk. NOTE: UltraSSD_LRS can only + * be used with data disks, it cannot be used with OS Disk. Possible values + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * - * {Promise} A promise is returned. + * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource + * Id * - * @resolve {null} - The deserialized result object. + * @param {array} [parameters.storageProfile.dataDisks] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * - * @reject {Error|ServiceError} - The error object. + * @param {object} [parameters.additionalCapabilities] Specifies additional + * capabilities enabled or disabled on the virtual machine. * - * {ServiceCallback} optionalCallback(err, result, request, response) + * @param {boolean} [parameters.additionalCapabilities.ultraSSDEnabled] The + * flag that enables or disables a capability to have one or more managed data + * disks with UltraSSD_LRS storage account type on the VM or VMSS. Managed + * disks with storage account type UltraSSD_LRS can be added to a virtual + * machine or virtual machine scale set only if this property is enabled. * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * @param {object} [parameters.osProfile] Specifies the operating system + * settings for the virtual machine. * - * {null} [result] - The deserialized result object if an error did not occur. + * @param {string} [parameters.osProfile.computerName] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @param {string} [parameters.osProfile.adminUsername] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • + * 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - restart(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - restart(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; - restart(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * The operation to start a virtual machine. + * @param {string} [parameters.osProfile.adminPassword] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) + *

    For resetting root password, see [Manage users, SSH, and check or + * repair disks on Azure Linux VMs using the VMAccess + * Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} [parameters.osProfile.customData] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) * - * @param {string} vmName The name of the virtual machine. + * @param {object} [parameters.osProfile.windowsConfiguration] Specifies + * Windows operating system settings on the virtual machine. * - * @param {object} [options] Optional Parameters. + * @param {boolean} + * [parameters.osProfile.windowsConfiguration.provisionVMAgent] 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. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {boolean} + * [parameters.osProfile.windowsConfiguration.enableAutomaticUpdates] Indicates + * whether virtual machine is enabled for automatic updates. * - * @returns {Promise} A promise is returned + * @param {string} [parameters.osProfile.windowsConfiguration.timeZone] + * Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time" * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {array} + * [parameters.osProfile.windowsConfiguration.additionalUnattendContent] + * Specifies additional base-64 encoded XML formatted information that can be + * included in the Unattend.xml file, which is used by Windows Setup. * - * @reject {Error|ServiceError} - The error object. - */ - startWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * The operation to start a virtual machine. + * @param {object} [parameters.osProfile.windowsConfiguration.winRM] Specifies + * the Windows Remote Management listeners. This enables remote Windows + * PowerShell. * - * @param {string} resourceGroupName The name of the resource group. + * @param {array} [parameters.osProfile.windowsConfiguration.winRM.listeners] + * The list of Windows Remote Management listeners * - * @param {string} vmName The name of the virtual machine. + * @param {object} [parameters.osProfile.linuxConfiguration] Specifies the + * Linux operating system settings on the virtual machine.

    For a list + * of supported Linux distributions, see [Linux on Azure-Endorsed + * Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + *

    For running non-endorsed distributions, see [Information for + * Non-Endorsed + * Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). * - * @param {object} [options] Optional Parameters. + * @param {boolean} + * [parameters.osProfile.linuxConfiguration.disablePasswordAuthentication] + * Specifies whether password authentication should be disabled. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {object} [parameters.osProfile.linuxConfiguration.ssh] Specifies the + * ssh key configuration for a Linux OS. * - * @param {ServiceCallback} [optionalCallback] - The optional callback. + * @param {array} [parameters.osProfile.linuxConfiguration.ssh.publicKeys] The + * list of SSH public keys used to authenticate with linux based VMs. * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. + * @param {boolean} [parameters.osProfile.linuxConfiguration.provisionVMAgent] + * 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. * - * {Promise} A promise is returned. + * @param {array} [parameters.osProfile.secrets] Specifies set of certificates + * that should be installed onto the virtual machine. * - * @resolve {null} - The deserialized result object. + * @param {boolean} [parameters.osProfile.allowExtensionOperations] Specifies + * whether extension operations should be allowed on the virtual machine. + *

    This may only be set to False when no extensions are present on the + * virtual machine. * - * @reject {Error|ServiceError} - The error object. + * @param {object} [parameters.networkProfile] Specifies the network interfaces + * of the virtual machine. * - * {ServiceCallback} optionalCallback(err, result, request, response) + * @param {array} [parameters.networkProfile.networkInterfaces] Specifies the + * list of resource Ids for the network interfaces associated with the virtual + * machine. * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * @param {object} [parameters.diagnosticsProfile] Specifies the boot + * diagnostic settings state.

    Minimum api-version: 2015-06-15. * - * {null} [result] - The deserialized result object if an error did not occur. + * @param {object} [parameters.diagnosticsProfile.bootDiagnostics] Boot + * Diagnostics is a debugging feature which allows you to view Console Output + * and Screenshot to diagnose VM status.

    You can easily view the + * output of your console log.

    Azure also enables you to see a + * screenshot of the VM from the hypervisor. * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @param {boolean} [parameters.diagnosticsProfile.bootDiagnostics.enabled] + * Whether boot diagnostics should be enabled on the Virtual Machine. * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - start(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - start(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; - start(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * The operation to redeploy a virtual machine. + * @param {string} [parameters.diagnosticsProfile.bootDiagnostics.storageUri] + * Uri of the storage account to use for placing the console output and + * screenshot. * - * @param {string} resourceGroupName The name of the resource group. + * @param {object} [parameters.availabilitySet] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + *

    For more information on Azure planned maintainance, see [Planned + * maintenance for virtual machines in + * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) + *

    Currently, a VM can only be added to availability set at creation + * time. An existing VM cannot be added to an availability set. * - * @param {string} vmName The name of the virtual machine. + * @param {string} [parameters.availabilitySet.id] Resource Id * - * @param {object} [options] Optional Parameters. + * @param {string} [parameters.licenseType] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) + *

    Minimum api-version: 2015-06-15 * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {object} [parameters.identity] The identity of the virtual machine, + * if configured. * - * @returns {Promise} A promise is returned + * @param {string} [parameters.identity.type] 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' * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {object} [parameters.identity.userAssignedIdentities] The list of + * user identities associated with the Virtual Machine. The user identity + * dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. * - * @reject {Error|ServiceError} - The error object. - */ - redeployWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * The operation to redeploy a virtual machine. + * @param {array} [parameters.zones] The virtual machine zones. * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} parameters.location Resource location * - * @param {string} vmName The name of the virtual machine. + * @param {object} [parameters.tags] Resource tags * * @param {object} [options] Optional Parameters. * @@ -6046,7 +5978,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {VirtualMachine} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -6054,248 +5986,449 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {VirtualMachine} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualMachine} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - redeploy(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - redeploy(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; - redeploy(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, vmName: string, parameters: models.VirtualMachine, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(resourceGroupName: string, vmName: string, parameters: models.VirtualMachine, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, vmName: string, parameters: models.VirtualMachine, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * The operation to perform maintenance on a virtual machine. + * The operation to update a virtual machine. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} vmName The name of the virtual machine. * - * @param {object} [options] Optional Parameters. + * @param {object} parameters Parameters supplied to the Update Virtual Machine + * operation. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {object} [parameters.plan] 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**. * - * @returns {Promise} A promise is returned + * @param {string} [parameters.plan.name] The plan ID. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {string} [parameters.plan.publisher] The publisher ID. * - * @reject {Error|ServiceError} - The error object. - */ - performMaintenanceWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * The operation to perform maintenance on a virtual machine. + * @param {string} [parameters.plan.product] Specifies the product of the image + * from the marketplace. This is the same value as Offer under the + * imageReference element. * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} [parameters.plan.promotionCode] The promotion code. * - * @param {string} vmName The name of the virtual machine. + * @param {object} [parameters.hardwareProfile] Specifies the hardware settings + * for the virtual machine. * - * @param {object} [options] Optional Parameters. + * @param {string} [parameters.hardwareProfile.vmSize] Specifies the size of + * the virtual machine. For more information about virtual machine sizes, see + * [Sizes for virtual + * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + *

    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](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) + *

    [List all available virtual machine sizes in a + * region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) + *

    [List all available virtual machine sizes for + * resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). + * 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' * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {object} [parameters.storageProfile] Specifies the storage settings + * for the virtual machine disks. * - * @param {ServiceCallback} [optionalCallback] - The optional callback. + * @param {object} [parameters.storageProfile.imageReference] 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. * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. + * @param {string} [parameters.storageProfile.imageReference.publisher] The + * image publisher. * - * {Promise} A promise is returned. + * @param {string} [parameters.storageProfile.imageReference.offer] Specifies + * the offer of the platform image or marketplace image used to create the + * virtual machine. * - * @resolve {null} - The deserialized result object. + * @param {string} [parameters.storageProfile.imageReference.sku] The image + * SKU. * - * @reject {Error|ServiceError} - The error object. + * @param {string} [parameters.storageProfile.imageReference.version] 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. * - * {ServiceCallback} optionalCallback(err, result, request, response) + * @param {string} [parameters.storageProfile.imageReference.id] Resource Id * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * @param {object} [parameters.storageProfile.osDisk] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * - * {null} [result] - The deserialized result object if an error did not occur. + * @param {string} [parameters.storageProfile.osDisk.osType] 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' * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @param {object} [parameters.storageProfile.osDisk.encryptionSettings] + * Specifies the encryption settings for the OS Disk.

    Minimum + * api-version: 2015-06-15 * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - performMaintenance(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - performMaintenance(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; - performMaintenance(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * Run command on the VM. + * @param {object} + * [parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey] + * Specifies the location of the disk encryption key, which is a Key Vault + * Secret. * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} + * parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey.secretUrl + * The URL referencing a secret in a Key Vault. * - * @param {string} vmName The name of the virtual machine. + * @param {object} + * parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey.sourceVault + * The relative URL of the Key Vault containing the secret. * - * @param {object} parameters Parameters supplied to the Run command operation. + * @param {object} + * [parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey] + * Specifies the location of the key encryption key in Key Vault. * - * @param {string} parameters.commandId The run command id. + * @param {string} + * parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey.keyUrl + * The URL referencing a key encryption key in Key Vault. * - * @param {array} [parameters.script] Optional. The script to be executed. - * When this value is given, the given script will override the default script - * of the command. + * @param {object} + * parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey.sourceVault + * The relative URL of the Key Vault containing the key. * - * @param {array} [parameters.parameters] The run command parameters. + * @param {boolean} + * [parameters.storageProfile.osDisk.encryptionSettings.enabled] Specifies + * whether disk encryption should be enabled on the virtual machine. * - * @param {object} [options] Optional Parameters. + * @param {string} [parameters.storageProfile.osDisk.name] The disk name. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {object} [parameters.storageProfile.osDisk.vhd] The virtual hard + * disk. * - * @returns {Promise} A promise is returned + * @param {object} [parameters.storageProfile.osDisk.image] 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. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {string} [parameters.storageProfile.osDisk.image.uri] Specifies the + * virtual hard disk's uri. * - * @reject {Error|ServiceError} - The error object. - */ - runCommandWithHttpOperationResponse(resourceGroupName: string, vmName: string, parameters: models.RunCommandInput, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Run command on the VM. + * @param {string} [parameters.storageProfile.osDisk.caching] 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' * - * @param {string} resourceGroupName The name of the resource group. + * @param {boolean} [parameters.storageProfile.osDisk.writeAcceleratorEnabled] + * Specifies whether writeAccelerator should be enabled or disabled on the + * disk. * - * @param {string} vmName The name of the virtual machine. + * @param {object} [parameters.storageProfile.osDisk.diffDiskSettings] + * Specifies the differencing Disk Settings for the operating system disk used + * by the virtual machine. + * + * @param {string} [parameters.storageProfile.osDisk.diffDiskSettings.option] + * Specifies the differencing disk settings for operating system disk. Possible + * values include: 'Local' + * + * @param {string} parameters.storageProfile.osDisk.createOption 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' * - * @param {object} parameters Parameters supplied to the Run command operation. + * @param {number} [parameters.storageProfile.osDisk.diskSizeGB] Specifies the + * size of an empty data disk in gigabytes. This element can be used to + * overwrite the size of the disk in a virtual machine image.

    This + * value cannot be larger than 1023 GB * - * @param {string} parameters.commandId The run command id. + * @param {object} [parameters.storageProfile.osDisk.managedDisk] The managed + * disk parameters. * - * @param {array} [parameters.script] Optional. The script to be executed. - * When this value is given, the given script will override the default script - * of the command. + * @param {string} + * [parameters.storageProfile.osDisk.managedDisk.storageAccountType] Specifies + * the storage account type for the managed disk. NOTE: UltraSSD_LRS can only + * be used with data disks, it cannot be used with OS Disk. Possible values + * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * - * @param {array} [parameters.parameters] The run command parameters. + * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource + * Id * - * @param {object} [options] Optional Parameters. + * @param {array} [parameters.storageProfile.dataDisks] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {object} [parameters.additionalCapabilities] Specifies additional + * capabilities enabled or disabled on the virtual machine. * - * @param {ServiceCallback} [optionalCallback] - The optional callback. + * @param {boolean} [parameters.additionalCapabilities.ultraSSDEnabled] The + * flag that enables or disables a capability to have one or more managed data + * disks with UltraSSD_LRS storage account type on the VM or VMSS. Managed + * disks with storage account type UltraSSD_LRS can be added to a virtual + * machine or virtual machine scale set only if this property is enabled. * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. + * @param {object} [parameters.osProfile] Specifies the operating system + * settings for the virtual machine. * - * {Promise} A promise is returned. + * @param {string} [parameters.osProfile.computerName] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). * - * @resolve {RunCommandResult} - The deserialized result object. + * @param {string} [parameters.osProfile.adminUsername] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • + * 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) * - * @reject {Error|ServiceError} - The error object. + * @param {string} [parameters.osProfile.adminPassword] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) + *

    For resetting root password, see [Manage users, SSH, and check or + * repair disks on Azure Linux VMs using the VMAccess + * Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) * - * {ServiceCallback} optionalCallback(err, result, request, response) + * @param {string} [parameters.osProfile.customData] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * @param {object} [parameters.osProfile.windowsConfiguration] Specifies + * Windows operating system settings on the virtual machine. * - * {RunCommandResult} [result] - The deserialized result object if an error did not occur. - * See {@link RunCommandResult} for more information. + * @param {boolean} + * [parameters.osProfile.windowsConfiguration.provisionVMAgent] 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. * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @param {boolean} + * [parameters.osProfile.windowsConfiguration.enableAutomaticUpdates] Indicates + * whether virtual machine is enabled for automatic updates. * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - runCommand(resourceGroupName: string, vmName: string, parameters: models.RunCommandInput, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - runCommand(resourceGroupName: string, vmName: string, parameters: models.RunCommandInput, callback: ServiceCallback): void; - runCommand(resourceGroupName: string, vmName: string, parameters: models.RunCommandInput, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * Captures the VM by copying virtual hard disks of the VM and outputs a - * template that can be used to create similar VMs. + * @param {string} [parameters.osProfile.windowsConfiguration.timeZone] + * Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time" * - * @param {string} resourceGroupName The name of the resource group. + * @param {array} + * [parameters.osProfile.windowsConfiguration.additionalUnattendContent] + * Specifies additional base-64 encoded XML formatted information that can be + * included in the Unattend.xml file, which is used by Windows Setup. * - * @param {string} vmName The name of the virtual machine. + * @param {object} [parameters.osProfile.windowsConfiguration.winRM] Specifies + * the Windows Remote Management listeners. This enables remote Windows + * PowerShell. * - * @param {object} parameters Parameters supplied to the Capture Virtual - * Machine operation. + * @param {array} [parameters.osProfile.windowsConfiguration.winRM.listeners] + * The list of Windows Remote Management listeners * - * @param {string} parameters.vhdPrefix The captured virtual hard disk's name - * prefix. + * @param {object} [parameters.osProfile.linuxConfiguration] Specifies the + * Linux operating system settings on the virtual machine.

    For a list + * of supported Linux distributions, see [Linux on Azure-Endorsed + * Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + *

    For running non-endorsed distributions, see [Information for + * Non-Endorsed + * Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). * - * @param {string} parameters.destinationContainerName The destination - * container name. + * @param {boolean} + * [parameters.osProfile.linuxConfiguration.disablePasswordAuthentication] + * Specifies whether password authentication should be disabled. * - * @param {boolean} parameters.overwriteVhds Specifies whether to overwrite the - * destination virtual hard disk, in case of conflict. + * @param {object} [parameters.osProfile.linuxConfiguration.ssh] Specifies the + * ssh key configuration for a Linux OS. * - * @param {object} [options] Optional Parameters. + * @param {array} [parameters.osProfile.linuxConfiguration.ssh.publicKeys] The + * list of SSH public keys used to authenticate with linux based VMs. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {boolean} [parameters.osProfile.linuxConfiguration.provisionVMAgent] + * 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. * - * @returns {Promise} A promise is returned + * @param {array} [parameters.osProfile.secrets] Specifies set of certificates + * that should be installed onto the virtual machine. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {boolean} [parameters.osProfile.allowExtensionOperations] Specifies + * whether extension operations should be allowed on the virtual machine. + *

    This may only be set to False when no extensions are present on the + * virtual machine. * - * @reject {Error|ServiceError} - The error object. - */ - beginCaptureWithHttpOperationResponse(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineCaptureParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Captures the VM by copying virtual hard disks of the VM and outputs a - * template that can be used to create similar VMs. + * @param {object} [parameters.networkProfile] Specifies the network interfaces + * of the virtual machine. * - * @param {string} resourceGroupName The name of the resource group. + * @param {array} [parameters.networkProfile.networkInterfaces] Specifies the + * list of resource Ids for the network interfaces associated with the virtual + * machine. * - * @param {string} vmName The name of the virtual machine. + * @param {object} [parameters.diagnosticsProfile] Specifies the boot + * diagnostic settings state.

    Minimum api-version: 2015-06-15. * - * @param {object} parameters Parameters supplied to the Capture Virtual - * Machine operation. + * @param {object} [parameters.diagnosticsProfile.bootDiagnostics] Boot + * Diagnostics is a debugging feature which allows you to view Console Output + * and Screenshot to diagnose VM status.

    You can easily view the + * output of your console log.

    Azure also enables you to see a + * screenshot of the VM from the hypervisor. * - * @param {string} parameters.vhdPrefix The captured virtual hard disk's name - * prefix. + * @param {boolean} [parameters.diagnosticsProfile.bootDiagnostics.enabled] + * Whether boot diagnostics should be enabled on the Virtual Machine. * - * @param {string} parameters.destinationContainerName The destination - * container name. + * @param {string} [parameters.diagnosticsProfile.bootDiagnostics.storageUri] + * Uri of the storage account to use for placing the console output and + * screenshot. * - * @param {boolean} parameters.overwriteVhds Specifies whether to overwrite the - * destination virtual hard disk, in case of conflict. + * @param {object} [parameters.availabilitySet] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + *

    For more information on Azure planned maintainance, see [Planned + * maintenance for virtual machines in + * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) + *

    Currently, a VM can only be added to availability set at creation + * time. An existing VM cannot be added to an availability set. * - * @param {object} [options] Optional Parameters. + * @param {string} [parameters.availabilitySet.id] Resource Id * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {string} [parameters.licenseType] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) + *

    Minimum api-version: 2015-06-15 * - * @param {ServiceCallback} [optionalCallback] - The optional callback. + * @param {object} [parameters.identity] The identity of the virtual machine, + * if configured. * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. + * @param {string} [parameters.identity.type] 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' * - * {Promise} A promise is returned. + * @param {object} [parameters.identity.userAssignedIdentities] The list of + * user identities associated with the Virtual Machine. The user identity + * dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. * - * @resolve {VirtualMachineCaptureResult} - The deserialized result object. + * @param {array} [parameters.zones] The virtual machine zones. * - * @reject {Error|ServiceError} - The error object. + * @param {object} [parameters.tags] Resource tags * - * {ServiceCallback} optionalCallback(err, result, request, response) + * @param {object} [options] Optional Parameters. * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * {VirtualMachineCaptureResult} [result] - The deserialized result object if an error did not occur. - * See {@link VirtualMachineCaptureResult} for more - * information. + * @returns {Promise} A promise is returned * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + * @reject {Error|ServiceError} - The error object. */ - beginCapture(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineCaptureParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginCapture(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineCaptureParameters, callback: ServiceCallback): void; - beginCapture(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineCaptureParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - + beginUpdateWithHttpOperationResponse(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * The operation to create or update a virtual machine. + * The operation to update a virtual machine. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} vmName The name of the virtual machine. * - * @param {object} parameters Parameters supplied to the Create Virtual Machine + * @param {object} parameters Parameters supplied to the Update Virtual Machine * operation. * * @param {object} [parameters.plan] Specifies information about the @@ -6597,108 +6730,325 @@ export interface VirtualMachines { * the Windows Remote Management listeners. This enables remote Windows * PowerShell. * - * @param {array} [parameters.osProfile.windowsConfiguration.winRM.listeners] - * The list of Windows Remote Management listeners + * @param {array} [parameters.osProfile.windowsConfiguration.winRM.listeners] + * The list of Windows Remote Management listeners + * + * @param {object} [parameters.osProfile.linuxConfiguration] Specifies the + * Linux operating system settings on the virtual machine.

    For a list + * of supported Linux distributions, see [Linux on Azure-Endorsed + * Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + *

    For running non-endorsed distributions, see [Information for + * Non-Endorsed + * Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + * + * @param {boolean} + * [parameters.osProfile.linuxConfiguration.disablePasswordAuthentication] + * Specifies whether password authentication should be disabled. + * + * @param {object} [parameters.osProfile.linuxConfiguration.ssh] Specifies the + * ssh key configuration for a Linux OS. + * + * @param {array} [parameters.osProfile.linuxConfiguration.ssh.publicKeys] The + * list of SSH public keys used to authenticate with linux based VMs. + * + * @param {boolean} [parameters.osProfile.linuxConfiguration.provisionVMAgent] + * 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. + * + * @param {array} [parameters.osProfile.secrets] Specifies set of certificates + * that should be installed onto the virtual machine. + * + * @param {boolean} [parameters.osProfile.allowExtensionOperations] Specifies + * whether extension operations should be allowed on the virtual machine. + *

    This may only be set to False when no extensions are present on the + * virtual machine. + * + * @param {object} [parameters.networkProfile] Specifies the network interfaces + * of the virtual machine. + * + * @param {array} [parameters.networkProfile.networkInterfaces] Specifies the + * list of resource Ids for the network interfaces associated with the virtual + * machine. + * + * @param {object} [parameters.diagnosticsProfile] Specifies the boot + * diagnostic settings state.

    Minimum api-version: 2015-06-15. + * + * @param {object} [parameters.diagnosticsProfile.bootDiagnostics] Boot + * Diagnostics is a debugging feature which allows you to view Console Output + * and Screenshot to diagnose VM status.

    You can easily view the + * output of your console log.

    Azure also enables you to see a + * screenshot of the VM from the hypervisor. + * + * @param {boolean} [parameters.diagnosticsProfile.bootDiagnostics.enabled] + * Whether boot diagnostics should be enabled on the Virtual Machine. + * + * @param {string} [parameters.diagnosticsProfile.bootDiagnostics.storageUri] + * Uri of the storage account to use for placing the console output and + * screenshot. + * + * @param {object} [parameters.availabilitySet] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + *

    For more information on Azure planned maintainance, see [Planned + * maintenance for virtual machines in + * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) + *

    Currently, a VM can only be added to availability set at creation + * time. An existing VM cannot be added to an availability set. + * + * @param {string} [parameters.availabilitySet.id] Resource Id + * + * @param {string} [parameters.licenseType] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) + *

    Minimum api-version: 2015-06-15 + * + * @param {object} [parameters.identity] The identity of the virtual machine, + * if configured. + * + * @param {string} [parameters.identity.type] 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' + * + * @param {object} [parameters.identity.userAssignedIdentities] The list of + * user identities associated with the Virtual Machine. The user identity + * dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + * + * @param {array} [parameters.zones] The virtual machine zones. + * + * @param {object} [parameters.tags] Resource tags + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {VirtualMachine} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {VirtualMachine} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualMachine} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginUpdate(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginUpdate(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineUpdate, callback: ServiceCallback): void; + beginUpdate(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineUpdate, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * The operation to delete a virtual machine. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} vmName The name of the virtual machine. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * The operation to delete a virtual machine. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} vmName The name of the virtual machine. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginDeleteMethod(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Converts virtual machine disks from blob-based to managed disks. Virtual + * machine must be stop-deallocated before invoking this operation. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} vmName The name of the virtual machine. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + beginConvertToManagedDisksWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Converts virtual machine disks from blob-based to managed disks. Virtual + * machine must be stop-deallocated before invoking this operation. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} vmName The name of the virtual machine. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginConvertToManagedDisks(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginConvertToManagedDisks(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; + beginConvertToManagedDisks(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Shuts down the virtual machine and releases the compute resources. You are + * not billed for the compute resources that this virtual machine uses. + * + * @param {string} resourceGroupName The name of the resource group. * - * @param {object} [parameters.osProfile.linuxConfiguration] Specifies the - * Linux operating system settings on the virtual machine.

    For a list - * of supported Linux distributions, see [Linux on Azure-Endorsed - * Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - *

    For running non-endorsed distributions, see [Information for - * Non-Endorsed - * Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + * @param {string} vmName The name of the virtual machine. * - * @param {boolean} - * [parameters.osProfile.linuxConfiguration.disablePasswordAuthentication] - * Specifies whether password authentication should be disabled. + * @param {object} [options] Optional Parameters. * - * @param {object} [parameters.osProfile.linuxConfiguration.ssh] Specifies the - * ssh key configuration for a Linux OS. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {array} [parameters.osProfile.linuxConfiguration.ssh.publicKeys] The - * list of SSH public keys used to authenticate with linux based VMs. + * @returns {Promise} A promise is returned * - * @param {boolean} [parameters.osProfile.linuxConfiguration.provisionVMAgent] - * 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. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {array} [parameters.osProfile.secrets] Specifies set of certificates - * that should be installed onto the virtual machine. + * @reject {Error|ServiceError} - The error object. + */ + beginDeallocateWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Shuts down the virtual machine and releases the compute resources. You are + * not billed for the compute resources that this virtual machine uses. * - * @param {boolean} [parameters.osProfile.allowExtensionOperations] Specifies - * whether extension operations should be allowed on the virtual machine. - *

    This may only be set to False when no extensions are present on the - * virtual machine. + * @param {string} resourceGroupName The name of the resource group. * - * @param {object} [parameters.networkProfile] Specifies the network interfaces - * of the virtual machine. + * @param {string} vmName The name of the virtual machine. * - * @param {array} [parameters.networkProfile.networkInterfaces] Specifies the - * list of resource Ids for the network interfaces associated with the virtual - * machine. + * @param {object} [options] Optional Parameters. * - * @param {object} [parameters.diagnosticsProfile] Specifies the boot - * diagnostic settings state.

    Minimum api-version: 2015-06-15. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {object} [parameters.diagnosticsProfile.bootDiagnostics] Boot - * Diagnostics is a debugging feature which allows you to view Console Output - * and Screenshot to diagnose VM status.

    You can easily view the - * output of your console log.

    Azure also enables you to see a - * screenshot of the VM from the hypervisor. + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @param {boolean} [parameters.diagnosticsProfile.bootDiagnostics.enabled] - * Whether boot diagnostics should be enabled on the Virtual Machine. + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @param {string} [parameters.diagnosticsProfile.bootDiagnostics.storageUri] - * Uri of the storage account to use for placing the console output and - * screenshot. + * {Promise} A promise is returned. * - * @param {object} [parameters.availabilitySet] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - *

    For more information on Azure planned maintainance, see [Planned - * maintenance for virtual machines in - * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) - *

    Currently, a VM can only be added to availability set at creation - * time. An existing VM cannot be added to an availability set. + * @resolve {null} - The deserialized result object. * - * @param {string} [parameters.availabilitySet.id] Resource Id + * @reject {Error|ServiceError} - The error object. * - * @param {string} [parameters.licenseType] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) - *

    Minimum api-version: 2015-06-15 + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @param {object} [parameters.identity] The identity of the virtual machine, - * if configured. + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * @param {string} [parameters.identity.type] 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' + * {null} [result] - The deserialized result object if an error did not occur. * - * @param {object} [parameters.identity.userAssignedIdentities] The list of - * user identities associated with the Virtual Machine. The user identity - * dictionary key references will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * @param {array} [parameters.zones] The virtual machine zones. + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginDeallocate(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeallocate(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; + beginDeallocate(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * 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. * - * @param {string} parameters.location Resource location + * @param {string} resourceGroupName The name of the resource group. * - * @param {object} [parameters.tags] Resource tags + * @param {string} vmName The name of the virtual machine. * * @param {object} [options] Optional Parameters. * @@ -6707,423 +7057,252 @@ export interface VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, vmName: string, parameters: models.VirtualMachine, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginPowerOffWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * The operation to create or update a virtual machine. + * 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. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} vmName The name of the virtual machine. * - * @param {object} parameters Parameters supplied to the Create Virtual Machine - * operation. + * @param {object} [options] Optional Parameters. * - * @param {object} [parameters.plan] 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**. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} [parameters.plan.name] The plan ID. + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @param {string} [parameters.plan.publisher] The publisher ID. + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @param {string} [parameters.plan.product] Specifies the product of the image - * from the marketplace. This is the same value as Offer under the - * imageReference element. + * {Promise} A promise is returned. * - * @param {string} [parameters.plan.promotionCode] The promotion code. + * @resolve {null} - The deserialized result object. * - * @param {object} [parameters.hardwareProfile] Specifies the hardware settings - * for the virtual machine. + * @reject {Error|ServiceError} - The error object. * - * @param {string} [parameters.hardwareProfile.vmSize] Specifies the size of - * the virtual machine. For more information about virtual machine sizes, see - * [Sizes for virtual - * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - *

    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](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) - *

    [List all available virtual machine sizes in a - * region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) - *

    [List all available virtual machine sizes for - * resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). - * 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' + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @param {object} [parameters.storageProfile] Specifies the storage settings - * for the virtual machine disks. + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * @param {object} [parameters.storageProfile.imageReference] 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. + * {null} [result] - The deserialized result object if an error did not occur. * - * @param {string} [parameters.storageProfile.imageReference.publisher] The - * image publisher. + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginPowerOff(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginPowerOff(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; + beginPowerOff(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * The operation to restart a virtual machine. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} vmName The name of the virtual machine. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {string} [parameters.storageProfile.imageReference.offer] Specifies - * the offer of the platform image or marketplace image used to create the - * virtual machine. + * @reject {Error|ServiceError} - The error object. + */ + beginRestartWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * The operation to restart a virtual machine. * - * @param {string} [parameters.storageProfile.imageReference.sku] The image - * SKU. + * @param {string} resourceGroupName The name of the resource group. * - * @param {string} [parameters.storageProfile.imageReference.version] 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. + * @param {string} vmName The name of the virtual machine. * - * @param {string} [parameters.storageProfile.imageReference.id] Resource Id + * @param {object} [options] Optional Parameters. * - * @param {object} [parameters.storageProfile.osDisk] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} [parameters.storageProfile.osDisk.osType] 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' + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @param {object} [parameters.storageProfile.osDisk.encryptionSettings] - * Specifies the encryption settings for the OS Disk.

    Minimum - * api-version: 2015-06-15 + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @param {object} - * [parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey] - * Specifies the location of the disk encryption key, which is a Key Vault - * Secret. + * {Promise} A promise is returned. * - * @param {string} - * parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey.secretUrl - * The URL referencing a secret in a Key Vault. + * @resolve {null} - The deserialized result object. * - * @param {object} - * parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey.sourceVault - * The relative URL of the Key Vault containing the secret. + * @reject {Error|ServiceError} - The error object. * - * @param {object} - * [parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey] - * Specifies the location of the key encryption key in Key Vault. + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @param {string} - * parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey.keyUrl - * The URL referencing a key encryption key in Key Vault. + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * @param {object} - * parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey.sourceVault - * The relative URL of the Key Vault containing the key. + * {null} [result] - The deserialized result object if an error did not occur. * - * @param {boolean} - * [parameters.storageProfile.osDisk.encryptionSettings.enabled] Specifies - * whether disk encryption should be enabled on the virtual machine. + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * @param {string} [parameters.storageProfile.osDisk.name] The disk name. + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginRestart(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginRestart(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; + beginRestart(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * The operation to start a virtual machine. * - * @param {object} [parameters.storageProfile.osDisk.vhd] The virtual hard - * disk. + * @param {string} resourceGroupName The name of the resource group. * - * @param {object} [parameters.storageProfile.osDisk.image] 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. + * @param {string} vmName The name of the virtual machine. * - * @param {string} [parameters.storageProfile.osDisk.image.uri] Specifies the - * virtual hard disk's uri. + * @param {object} [options] Optional Parameters. * - * @param {string} [parameters.storageProfile.osDisk.caching] 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' + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {boolean} [parameters.storageProfile.osDisk.writeAcceleratorEnabled] - * Specifies whether writeAccelerator should be enabled or disabled on the - * disk. + * @returns {Promise} A promise is returned * - * @param {object} [parameters.storageProfile.osDisk.diffDiskSettings] - * Specifies the differencing Disk Settings for the operating system disk used - * by the virtual machine. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {string} [parameters.storageProfile.osDisk.diffDiskSettings.option] - * Specifies the differencing disk settings for operating system disk. Possible - * values include: 'Local' + * @reject {Error|ServiceError} - The error object. + */ + beginStartWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * The operation to start a virtual machine. * - * @param {string} parameters.storageProfile.osDisk.createOption 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' + * @param {string} resourceGroupName The name of the resource group. * - * @param {number} [parameters.storageProfile.osDisk.diskSizeGB] Specifies the - * size of an empty data disk in gigabytes. This element can be used to - * overwrite the size of the disk in a virtual machine image.

    This - * value cannot be larger than 1023 GB + * @param {string} vmName The name of the virtual machine. * - * @param {object} [parameters.storageProfile.osDisk.managedDisk] The managed - * disk parameters. + * @param {object} [options] Optional Parameters. * - * @param {string} - * [parameters.storageProfile.osDisk.managedDisk.storageAccountType] Specifies - * the storage account type for the managed disk. NOTE: UltraSSD_LRS can only - * be used with data disks, it cannot be used with OS Disk. Possible values - * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource - * Id + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @param {array} [parameters.storageProfile.dataDisks] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @param {object} [parameters.additionalCapabilities] Specifies additional - * capabilities enabled or disabled on the virtual machine. + * {Promise} A promise is returned. * - * @param {boolean} [parameters.additionalCapabilities.ultraSSDEnabled] The - * flag that enables or disables a capability to have one or more managed data - * disks with UltraSSD_LRS storage account type on the VM or VMSS. Managed - * disks with storage account type UltraSSD_LRS can be added to a virtual - * machine or virtual machine scale set only if this property is enabled. + * @resolve {null} - The deserialized result object. * - * @param {object} [parameters.osProfile] Specifies the operating system - * settings for the virtual machine. + * @reject {Error|ServiceError} - The error object. * - * @param {string} [parameters.osProfile.computerName] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @param {string} [parameters.osProfile.adminUsername] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • - * 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * @param {string} [parameters.osProfile.adminPassword] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) - *

    For resetting root password, see [Manage users, SSH, and check or - * repair disks on Azure Linux VMs using the VMAccess - * Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) + * {null} [result] - The deserialized result object if an error did not occur. * - * @param {string} [parameters.osProfile.customData] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * @param {object} [parameters.osProfile.windowsConfiguration] Specifies - * Windows operating system settings on the virtual machine. + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginStart(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginStart(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; + beginStart(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * The operation to redeploy a virtual machine. * - * @param {boolean} - * [parameters.osProfile.windowsConfiguration.provisionVMAgent] 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. + * @param {string} resourceGroupName The name of the resource group. * - * @param {boolean} - * [parameters.osProfile.windowsConfiguration.enableAutomaticUpdates] Indicates - * whether virtual machine is enabled for automatic updates. + * @param {string} vmName The name of the virtual machine. * - * @param {string} [parameters.osProfile.windowsConfiguration.timeZone] - * Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time" + * @param {object} [options] Optional Parameters. * - * @param {array} - * [parameters.osProfile.windowsConfiguration.additionalUnattendContent] - * Specifies additional base-64 encoded XML formatted information that can be - * included in the Unattend.xml file, which is used by Windows Setup. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {object} [parameters.osProfile.windowsConfiguration.winRM] Specifies - * the Windows Remote Management listeners. This enables remote Windows - * PowerShell. + * @returns {Promise} A promise is returned * - * @param {array} [parameters.osProfile.windowsConfiguration.winRM.listeners] - * The list of Windows Remote Management listeners + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {object} [parameters.osProfile.linuxConfiguration] Specifies the - * Linux operating system settings on the virtual machine.

    For a list - * of supported Linux distributions, see [Linux on Azure-Endorsed - * Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - *

    For running non-endorsed distributions, see [Information for - * Non-Endorsed - * Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + * @reject {Error|ServiceError} - The error object. + */ + beginRedeployWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * The operation to redeploy a virtual machine. * - * @param {boolean} - * [parameters.osProfile.linuxConfiguration.disablePasswordAuthentication] - * Specifies whether password authentication should be disabled. + * @param {string} resourceGroupName The name of the resource group. * - * @param {object} [parameters.osProfile.linuxConfiguration.ssh] Specifies the - * ssh key configuration for a Linux OS. + * @param {string} vmName The name of the virtual machine. * - * @param {array} [parameters.osProfile.linuxConfiguration.ssh.publicKeys] The - * list of SSH public keys used to authenticate with linux based VMs. + * @param {object} [options] Optional Parameters. * - * @param {boolean} [parameters.osProfile.linuxConfiguration.provisionVMAgent] - * 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. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {array} [parameters.osProfile.secrets] Specifies set of certificates - * that should be installed onto the virtual machine. + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @param {boolean} [parameters.osProfile.allowExtensionOperations] Specifies - * whether extension operations should be allowed on the virtual machine. - *

    This may only be set to False when no extensions are present on the - * virtual machine. + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @param {object} [parameters.networkProfile] Specifies the network interfaces - * of the virtual machine. + * {Promise} A promise is returned. * - * @param {array} [parameters.networkProfile.networkInterfaces] Specifies the - * list of resource Ids for the network interfaces associated with the virtual - * machine. + * @resolve {null} - The deserialized result object. * - * @param {object} [parameters.diagnosticsProfile] Specifies the boot - * diagnostic settings state.

    Minimum api-version: 2015-06-15. + * @reject {Error|ServiceError} - The error object. * - * @param {object} [parameters.diagnosticsProfile.bootDiagnostics] Boot - * Diagnostics is a debugging feature which allows you to view Console Output - * and Screenshot to diagnose VM status.

    You can easily view the - * output of your console log.

    Azure also enables you to see a - * screenshot of the VM from the hypervisor. + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @param {boolean} [parameters.diagnosticsProfile.bootDiagnostics.enabled] - * Whether boot diagnostics should be enabled on the Virtual Machine. + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * @param {string} [parameters.diagnosticsProfile.bootDiagnostics.storageUri] - * Uri of the storage account to use for placing the console output and - * screenshot. + * {null} [result] - The deserialized result object if an error did not occur. * - * @param {object} [parameters.availabilitySet] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - *

    For more information on Azure planned maintainance, see [Planned - * maintenance for virtual machines in - * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) - *

    Currently, a VM can only be added to availability set at creation - * time. An existing VM cannot be added to an availability set. + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * @param {string} [parameters.availabilitySet.id] Resource Id + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginRedeploy(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginRedeploy(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; + beginRedeploy(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * The operation to perform maintenance on a virtual machine. * - * @param {string} [parameters.licenseType] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) - *

    Minimum api-version: 2015-06-15 + * @param {string} resourceGroupName The name of the resource group. * - * @param {object} [parameters.identity] The identity of the virtual machine, - * if configured. + * @param {string} vmName The name of the virtual machine. * - * @param {string} [parameters.identity.type] 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' + * @param {object} [options] Optional Parameters. * - * @param {object} [parameters.identity.userAssignedIdentities] The list of - * user identities associated with the Virtual Machine. The user identity - * dictionary key references will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {array} [parameters.zones] The virtual machine zones. + * @returns {Promise} A promise is returned * - * @param {string} parameters.location Resource location + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {object} [parameters.tags] Resource tags + * @reject {Error|ServiceError} - The error object. + */ + beginPerformMaintenanceWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * The operation to perform maintenance on a virtual machine. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} vmName The name of the virtual machine. * * @param {object} [options] Optional Parameters. * @@ -7137,7 +7316,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {VirtualMachine} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -7145,427 +7324,291 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {VirtualMachine} [result] - The deserialized result object if an error did not occur. - * See {@link VirtualMachine} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginCreateOrUpdate(resourceGroupName: string, vmName: string, parameters: models.VirtualMachine, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginCreateOrUpdate(resourceGroupName: string, vmName: string, parameters: models.VirtualMachine, callback: ServiceCallback): void; - beginCreateOrUpdate(resourceGroupName: string, vmName: string, parameters: models.VirtualMachine, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginPerformMaintenance(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginPerformMaintenance(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; + beginPerformMaintenance(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * The operation to update a virtual machine. + * Run command on the VM. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} vmName The name of the virtual machine. * - * @param {object} parameters Parameters supplied to the Update Virtual Machine - * operation. + * @param {object} parameters Parameters supplied to the Run command operation. * - * @param {object} [parameters.plan] 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**. + * @param {string} parameters.commandId The run command id. * - * @param {string} [parameters.plan.name] The plan ID. + * @param {array} [parameters.script] Optional. The script to be executed. + * When this value is given, the given script will override the default script + * of the command. * - * @param {string} [parameters.plan.publisher] The publisher ID. + * @param {array} [parameters.parameters] The run command parameters. * - * @param {string} [parameters.plan.product] Specifies the product of the image - * from the marketplace. This is the same value as Offer under the - * imageReference element. + * @param {object} [options] Optional Parameters. * - * @param {string} [parameters.plan.promotionCode] The promotion code. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {object} [parameters.hardwareProfile] Specifies the hardware settings - * for the virtual machine. + * @returns {Promise} A promise is returned * - * @param {string} [parameters.hardwareProfile.vmSize] Specifies the size of - * the virtual machine. For more information about virtual machine sizes, see - * [Sizes for virtual - * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - *

    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](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) - *

    [List all available virtual machine sizes in a - * region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) - *

    [List all available virtual machine sizes for - * resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). - * 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' + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {object} [parameters.storageProfile] Specifies the storage settings - * for the virtual machine disks. + * @reject {Error|ServiceError} - The error object. + */ + beginRunCommandWithHttpOperationResponse(resourceGroupName: string, vmName: string, parameters: models.RunCommandInput, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Run command on the VM. * - * @param {object} [parameters.storageProfile.imageReference] 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. + * @param {string} resourceGroupName The name of the resource group. * - * @param {string} [parameters.storageProfile.imageReference.publisher] The - * image publisher. + * @param {string} vmName The name of the virtual machine. * - * @param {string} [parameters.storageProfile.imageReference.offer] Specifies - * the offer of the platform image or marketplace image used to create the - * virtual machine. + * @param {object} parameters Parameters supplied to the Run command operation. + * + * @param {string} parameters.commandId The run command id. + * + * @param {array} [parameters.script] Optional. The script to be executed. + * When this value is given, the given script will override the default script + * of the command. + * + * @param {array} [parameters.parameters] The run command parameters. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {RunCommandResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @param {string} [parameters.storageProfile.imageReference.sku] The image - * SKU. + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * @param {string} [parameters.storageProfile.imageReference.version] 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. + * {RunCommandResult} [result] - The deserialized result object if an error did not occur. + * See {@link RunCommandResult} for more information. * - * @param {string} [parameters.storageProfile.imageReference.id] Resource Id + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * @param {object} [parameters.storageProfile.osDisk] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginRunCommand(resourceGroupName: string, vmName: string, parameters: models.RunCommandInput, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginRunCommand(resourceGroupName: string, vmName: string, parameters: models.RunCommandInput, callback: ServiceCallback): void; + beginRunCommand(resourceGroupName: string, vmName: string, parameters: models.RunCommandInput, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets all the virtual machines under the specified subscription for the + * specified location. * - * @param {string} [parameters.storageProfile.osDisk.osType] 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' + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * - * @param {object} [parameters.storageProfile.osDisk.encryptionSettings] - * Specifies the encryption settings for the OS Disk.

    Minimum - * api-version: 2015-06-15 + * @param {object} [options] Optional Parameters. * - * @param {object} - * [parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey] - * Specifies the location of the disk encryption key, which is a Key Vault - * Secret. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} - * parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey.secretUrl - * The URL referencing a secret in a Key Vault. + * @returns {Promise} A promise is returned * - * @param {object} - * parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey.sourceVault - * The relative URL of the Key Vault containing the secret. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {object} - * [parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey] - * Specifies the location of the key encryption key in Key Vault. + * @reject {Error|ServiceError} - The error object. + */ + listByLocationNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets all the virtual machines under the specified subscription for the + * specified location. * - * @param {string} - * parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey.keyUrl - * The URL referencing a key encryption key in Key Vault. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * - * @param {object} - * parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey.sourceVault - * The relative URL of the Key Vault containing the key. + * @param {object} [options] Optional Parameters. * - * @param {boolean} - * [parameters.storageProfile.osDisk.encryptionSettings.enabled] Specifies - * whether disk encryption should be enabled on the virtual machine. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} [parameters.storageProfile.osDisk.name] The disk name. + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @param {object} [parameters.storageProfile.osDisk.vhd] The virtual hard - * disk. + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @param {object} [parameters.storageProfile.osDisk.image] 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. + * {Promise} A promise is returned. * - * @param {string} [parameters.storageProfile.osDisk.image.uri] Specifies the - * virtual hard disk's uri. + * @resolve {VirtualMachineListResult} - The deserialized result object. * - * @param {string} [parameters.storageProfile.osDisk.caching] 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' + * @reject {Error|ServiceError} - The error object. * - * @param {boolean} [parameters.storageProfile.osDisk.writeAcceleratorEnabled] - * Specifies whether writeAccelerator should be enabled or disabled on the - * disk. + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @param {object} [parameters.storageProfile.osDisk.diffDiskSettings] - * Specifies the differencing Disk Settings for the operating system disk used - * by the virtual machine. + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * @param {string} [parameters.storageProfile.osDisk.diffDiskSettings.option] - * Specifies the differencing disk settings for operating system disk. Possible - * values include: 'Local' + * {VirtualMachineListResult} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualMachineListResult} for more + * information. * - * @param {string} parameters.storageProfile.osDisk.createOption 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' + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * @param {number} [parameters.storageProfile.osDisk.diskSizeGB] Specifies the - * size of an empty data disk in gigabytes. This element can be used to - * overwrite the size of the disk in a virtual machine image.

    This - * value cannot be larger than 1023 GB + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listByLocationNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByLocationNext(nextPageLink: string, callback: ServiceCallback): void; + listByLocationNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * 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. * - * @param {object} [parameters.storageProfile.osDisk.managedDisk] The managed - * disk parameters. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * - * @param {string} - * [parameters.storageProfile.osDisk.managedDisk.storageAccountType] Specifies - * the storage account type for the managed disk. NOTE: UltraSSD_LRS can only - * be used with data disks, it cannot be used with OS Disk. Possible values - * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' + * @param {object} [options] Optional Parameters. * - * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource - * Id + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {array} [parameters.storageProfile.dataDisks] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + * @returns {Promise} A promise is returned * - * @param {object} [parameters.additionalCapabilities] Specifies additional - * capabilities enabled or disabled on the virtual machine. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {boolean} [parameters.additionalCapabilities.ultraSSDEnabled] The - * flag that enables or disables a capability to have one or more managed data - * disks with UltraSSD_LRS storage account type on the VM or VMSS. Managed - * disks with storage account type UltraSSD_LRS can be added to a virtual - * machine or virtual machine scale set only if this property is enabled. + * @reject {Error|ServiceError} - The error object. + */ + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): 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. * - * @param {object} [parameters.osProfile] Specifies the operating system - * settings for the virtual machine. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * - * @param {string} [parameters.osProfile.computerName] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). + * @param {object} [options] Optional Parameters. * - * @param {string} [parameters.osProfile.adminUsername] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • - * 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} [parameters.osProfile.adminPassword] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) - *

    For resetting root password, see [Manage users, SSH, and check or - * repair disks on Azure Linux VMs using the VMAccess - * Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @param {string} [parameters.osProfile.customData] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @param {object} [parameters.osProfile.windowsConfiguration] Specifies - * Windows operating system settings on the virtual machine. + * {Promise} A promise is returned. * - * @param {boolean} - * [parameters.osProfile.windowsConfiguration.provisionVMAgent] 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. + * @resolve {VirtualMachineListResult} - The deserialized result object. * - * @param {boolean} - * [parameters.osProfile.windowsConfiguration.enableAutomaticUpdates] Indicates - * whether virtual machine is enabled for automatic updates. + * @reject {Error|ServiceError} - The error object. * - * @param {string} [parameters.osProfile.windowsConfiguration.timeZone] - * Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time" + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @param {array} - * [parameters.osProfile.windowsConfiguration.additionalUnattendContent] - * Specifies additional base-64 encoded XML formatted information that can be - * included in the Unattend.xml file, which is used by Windows Setup. + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * @param {object} [parameters.osProfile.windowsConfiguration.winRM] Specifies - * the Windows Remote Management listeners. This enables remote Windows - * PowerShell. + * {VirtualMachineListResult} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualMachineListResult} for more + * information. * - * @param {array} [parameters.osProfile.windowsConfiguration.winRM.listeners] - * The list of Windows Remote Management listeners + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * @param {object} [parameters.osProfile.linuxConfiguration] Specifies the - * Linux operating system settings on the virtual machine.

    For a list - * of supported Linux distributions, see [Linux on Azure-Endorsed - * Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - *

    For running non-endorsed distributions, see [Information for - * Non-Endorsed - * Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listNext(nextPageLink: string, callback: ServiceCallback): void; + listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * 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. * - * @param {boolean} - * [parameters.osProfile.linuxConfiguration.disablePasswordAuthentication] - * Specifies whether password authentication should be disabled. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * - * @param {object} [parameters.osProfile.linuxConfiguration.ssh] Specifies the - * ssh key configuration for a Linux OS. + * @param {object} [options] Optional Parameters. * - * @param {array} [parameters.osProfile.linuxConfiguration.ssh.publicKeys] The - * list of SSH public keys used to authenticate with linux based VMs. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {boolean} [parameters.osProfile.linuxConfiguration.provisionVMAgent] - * 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. + * @returns {Promise} A promise is returned * - * @param {array} [parameters.osProfile.secrets] Specifies set of certificates - * that should be installed onto the virtual machine. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {boolean} [parameters.osProfile.allowExtensionOperations] Specifies - * whether extension operations should be allowed on the virtual machine. - *

    This may only be set to False when no extensions are present on the - * virtual machine. + * @reject {Error|ServiceError} - The error object. + */ + listAllNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): 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. * - * @param {object} [parameters.networkProfile] Specifies the network interfaces - * of the virtual machine. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * - * @param {array} [parameters.networkProfile.networkInterfaces] Specifies the - * list of resource Ids for the network interfaces associated with the virtual - * machine. + * @param {object} [options] Optional Parameters. * - * @param {object} [parameters.diagnosticsProfile] Specifies the boot - * diagnostic settings state.

    Minimum api-version: 2015-06-15. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {object} [parameters.diagnosticsProfile.bootDiagnostics] Boot - * Diagnostics is a debugging feature which allows you to view Console Output - * and Screenshot to diagnose VM status.

    You can easily view the - * output of your console log.

    Azure also enables you to see a - * screenshot of the VM from the hypervisor. + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @param {boolean} [parameters.diagnosticsProfile.bootDiagnostics.enabled] - * Whether boot diagnostics should be enabled on the Virtual Machine. + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @param {string} [parameters.diagnosticsProfile.bootDiagnostics.storageUri] - * Uri of the storage account to use for placing the console output and - * screenshot. + * {Promise} A promise is returned. * - * @param {object} [parameters.availabilitySet] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - *

    For more information on Azure planned maintainance, see [Planned - * maintenance for virtual machines in - * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) - *

    Currently, a VM can only be added to availability set at creation - * time. An existing VM cannot be added to an availability set. + * @resolve {VirtualMachineListResult} - The deserialized result object. * - * @param {string} [parameters.availabilitySet.id] Resource Id + * @reject {Error|ServiceError} - The error object. * - * @param {string} [parameters.licenseType] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) - *

    Minimum api-version: 2015-06-15 + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @param {object} [parameters.identity] The identity of the virtual machine, - * if configured. + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * @param {string} [parameters.identity.type] 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' + * {VirtualMachineListResult} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualMachineListResult} for more + * information. * - * @param {object} [parameters.identity.userAssignedIdentities] The list of - * user identities associated with the Virtual Machine. The user identity - * dictionary key references will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * @param {array} [parameters.zones] The virtual machine zones. + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listAllNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listAllNext(nextPageLink: string, callback: ServiceCallback): void; + listAllNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * VirtualMachineSizes + * __NOTE__: An instance of this class is automatically created for an + * instance of the ComputeManagementClient. + */ +export interface VirtualMachineSizes { + + + /** + * This API is deprecated. Use [Resources + * Skus](https://docs.microsoft.com/en-us/rest/api/compute/resourceskus/list) * - * @param {object} [parameters.tags] Resource tags + * @param {string} location The location upon which virtual-machine-sizes is + * queried. * * @param {object} [options] Optional Parameters. * @@ -7574,185 +7617,100 @@ export interface VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginUpdateWithHttpOperationResponse(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listWithHttpOperationResponse(location: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * The operation to update a virtual machine. + * This API is deprecated. Use [Resources + * Skus](https://docs.microsoft.com/en-us/rest/api/compute/resourceskus/list) * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} location The location upon which virtual-machine-sizes is + * queried. * - * @param {string} vmName The name of the virtual machine. + * @param {object} [options] Optional Parameters. * - * @param {object} parameters Parameters supplied to the Update Virtual Machine - * operation. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {object} [parameters.plan] 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**. + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @param {string} [parameters.plan.name] The plan ID. + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @param {string} [parameters.plan.publisher] The publisher ID. + * {Promise} A promise is returned. * - * @param {string} [parameters.plan.product] Specifies the product of the image - * from the marketplace. This is the same value as Offer under the - * imageReference element. + * @resolve {VirtualMachineSizeListResult} - The deserialized result object. * - * @param {string} [parameters.plan.promotionCode] The promotion code. + * @reject {Error|ServiceError} - The error object. * - * @param {object} [parameters.hardwareProfile] Specifies the hardware settings - * for the virtual machine. + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @param {string} [parameters.hardwareProfile.vmSize] Specifies the size of - * the virtual machine. For more information about virtual machine sizes, see - * [Sizes for virtual - * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - *

    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](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) - *

    [List all available virtual machine sizes in a - * region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) - *

    [List all available virtual machine sizes for - * resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). - * 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' + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * @param {object} [parameters.storageProfile] Specifies the storage settings - * for the virtual machine disks. + * {VirtualMachineSizeListResult} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualMachineSizeListResult} for more + * information. * - * @param {object} [parameters.storageProfile.imageReference] 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. + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * @param {string} [parameters.storageProfile.imageReference.publisher] The - * image publisher. + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + list(location: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(location: string, callback: ServiceCallback): void; + list(location: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * Images + * __NOTE__: An instance of this class is automatically created for an + * instance of the ComputeManagementClient. + */ +export interface Images { + + + /** + * Create or update an image. + * + * @param {string} resourceGroupName The name of the resource group. * - * @param {string} [parameters.storageProfile.imageReference.offer] Specifies - * the offer of the platform image or marketplace image used to create the - * virtual machine. + * @param {string} imageName The name of the image. * - * @param {string} [parameters.storageProfile.imageReference.sku] The image - * SKU. + * @param {object} parameters Parameters supplied to the Create Image + * operation. * - * @param {string} [parameters.storageProfile.imageReference.version] 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. + * @param {object} [parameters.sourceVirtualMachine] The source virtual machine + * from which Image is created. * - * @param {string} [parameters.storageProfile.imageReference.id] Resource Id + * @param {object} [parameters.storageProfile] Specifies the storage settings + * for the virtual machine disks. * * @param {object} [parameters.storageProfile.osDisk] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * - * @param {string} [parameters.storageProfile.osDisk.osType] 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' - * - * @param {object} [parameters.storageProfile.osDisk.encryptionSettings] - * Specifies the encryption settings for the OS Disk.

    Minimum - * api-version: 2015-06-15 - * - * @param {object} - * [parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey] - * Specifies the location of the disk encryption key, which is a Key Vault - * Secret. - * - * @param {string} - * parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey.secretUrl - * The URL referencing a secret in a Key Vault. - * - * @param {object} - * parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey.sourceVault - * The relative URL of the Key Vault containing the secret. - * - * @param {object} - * [parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey] - * Specifies the location of the key encryption key in Key Vault. - * - * @param {string} - * parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey.keyUrl - * The URL referencing a key encryption key in Key Vault. - * - * @param {object} - * parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey.sourceVault - * The relative URL of the Key Vault containing the key. + * @param {string} parameters.storageProfile.osDisk.osType This property allows + * you to specify the type of the OS that is included in the disk if creating a + * VM from a custom image.

    Possible values are:

    **Windows** + *

    **Linux**. Possible values include: 'Windows', 'Linux' * - * @param {boolean} - * [parameters.storageProfile.osDisk.encryptionSettings.enabled] Specifies - * whether disk encryption should be enabled on the virtual machine. + * @param {string} parameters.storageProfile.osDisk.osState The OS State. + * Possible values include: 'Generalized', 'Specialized' * - * @param {string} [parameters.storageProfile.osDisk.name] The disk name. + * @param {object} [parameters.storageProfile.osDisk.snapshot] The snapshot. * - * @param {object} [parameters.storageProfile.osDisk.vhd] The virtual hard - * disk. + * @param {object} [parameters.storageProfile.osDisk.managedDisk] The + * managedDisk. * - * @param {object} [parameters.storageProfile.osDisk.image] 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. + * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource + * Id * - * @param {string} [parameters.storageProfile.osDisk.image.uri] Specifies the - * virtual hard disk's uri. + * @param {string} [parameters.storageProfile.osDisk.blobUri] The Virtual Hard + * Disk. * * @param {string} [parameters.storageProfile.osDisk.caching] Specifies the * caching requirements.

    Possible values are:

    **None** @@ -7760,44 +7718,15 @@ export interface VirtualMachines { * Standard storage. ReadOnly for Premium storage**. Possible values include: * 'None', 'ReadOnly', 'ReadWrite' * - * @param {boolean} [parameters.storageProfile.osDisk.writeAcceleratorEnabled] - * Specifies whether writeAccelerator should be enabled or disabled on the - * disk. - * - * @param {object} [parameters.storageProfile.osDisk.diffDiskSettings] - * Specifies the differencing Disk Settings for the operating system disk used - * by the virtual machine. - * - * @param {string} [parameters.storageProfile.osDisk.diffDiskSettings.option] - * Specifies the differencing disk settings for operating system disk. Possible - * values include: 'Local' - * - * @param {string} parameters.storageProfile.osDisk.createOption 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' - * * @param {number} [parameters.storageProfile.osDisk.diskSizeGB] Specifies the - * size of an empty data disk in gigabytes. This element can be used to - * overwrite the size of the disk in a virtual machine image.

    This - * value cannot be larger than 1023 GB - * - * @param {object} [parameters.storageProfile.osDisk.managedDisk] The managed - * disk parameters. - * - * @param {string} - * [parameters.storageProfile.osDisk.managedDisk.storageAccountType] Specifies - * the storage account type for the managed disk. NOTE: UltraSSD_LRS can only - * be used with data disks, it cannot be used with OS Disk. Possible values - * include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' + * size of empty data disks 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 * - * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource - * Id + * @param {string} [parameters.storageProfile.osDisk.storageAccountType] + * Specifies the storage account type for the managed disk. UltraSSD_LRS cannot + * be used with OS Disk. Possible values include: 'Standard_LRS', + * 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * * @param {array} [parameters.storageProfile.dataDisks] Specifies the * parameters that are used to add a data disk to a virtual machine.

    @@ -7805,188 +7734,94 @@ export interface VirtualMachines { * virtual * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * - * @param {object} [parameters.additionalCapabilities] Specifies additional - * capabilities enabled or disabled on the virtual machine. - * - * @param {boolean} [parameters.additionalCapabilities.ultraSSDEnabled] The - * flag that enables or disables a capability to have one or more managed data - * disks with UltraSSD_LRS storage account type on the VM or VMSS. Managed - * disks with storage account type UltraSSD_LRS can be added to a virtual - * machine or virtual machine scale set only if this property is enabled. - * - * @param {object} [parameters.osProfile] Specifies the operating system - * settings for the virtual machine. - * - * @param {string} [parameters.osProfile.computerName] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). - * - * @param {string} [parameters.osProfile.adminUsername] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • - * 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - * - * @param {string} [parameters.osProfile.adminPassword] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) - *

    For resetting root password, see [Manage users, SSH, and check or - * repair disks on Azure Linux VMs using the VMAccess - * Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password) - * - * @param {string} [parameters.osProfile.customData] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - * - * @param {object} [parameters.osProfile.windowsConfiguration] Specifies - * Windows operating system settings on the virtual machine. - * - * @param {boolean} - * [parameters.osProfile.windowsConfiguration.provisionVMAgent] 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. - * - * @param {boolean} - * [parameters.osProfile.windowsConfiguration.enableAutomaticUpdates] Indicates - * whether virtual machine is enabled for automatic updates. + * @param {boolean} [parameters.storageProfile.zoneResilient] Specifies whether + * an image is zone resilient or not. Default is false. Zone resilient images + * can be created only in regions that provide Zone Redundant Storage (ZRS). * - * @param {string} [parameters.osProfile.windowsConfiguration.timeZone] - * Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time" + * @param {string} parameters.location Resource location * - * @param {array} - * [parameters.osProfile.windowsConfiguration.additionalUnattendContent] - * Specifies additional base-64 encoded XML formatted information that can be - * included in the Unattend.xml file, which is used by Windows Setup. + * @param {object} [parameters.tags] Resource tags * - * @param {object} [parameters.osProfile.windowsConfiguration.winRM] Specifies - * the Windows Remote Management listeners. This enables remote Windows - * PowerShell. + * @param {object} [options] Optional Parameters. * - * @param {array} [parameters.osProfile.windowsConfiguration.winRM.listeners] - * The list of Windows Remote Management listeners + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {object} [parameters.osProfile.linuxConfiguration] Specifies the - * Linux operating system settings on the virtual machine.

    For a list - * of supported Linux distributions, see [Linux on Azure-Endorsed - * Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - *

    For running non-endorsed distributions, see [Information for - * Non-Endorsed - * Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + * @returns {Promise} A promise is returned * - * @param {boolean} - * [parameters.osProfile.linuxConfiguration.disablePasswordAuthentication] - * Specifies whether password authentication should be disabled. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {object} [parameters.osProfile.linuxConfiguration.ssh] Specifies the - * ssh key configuration for a Linux OS. + * @reject {Error|ServiceError} - The error object. + */ + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, imageName: string, parameters: models.Image, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Create or update an image. * - * @param {array} [parameters.osProfile.linuxConfiguration.ssh.publicKeys] The - * list of SSH public keys used to authenticate with linux based VMs. + * @param {string} resourceGroupName The name of the resource group. * - * @param {boolean} [parameters.osProfile.linuxConfiguration.provisionVMAgent] - * 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. + * @param {string} imageName The name of the image. * - * @param {array} [parameters.osProfile.secrets] Specifies set of certificates - * that should be installed onto the virtual machine. + * @param {object} parameters Parameters supplied to the Create Image + * operation. * - * @param {boolean} [parameters.osProfile.allowExtensionOperations] Specifies - * whether extension operations should be allowed on the virtual machine. - *

    This may only be set to False when no extensions are present on the - * virtual machine. + * @param {object} [parameters.sourceVirtualMachine] The source virtual machine + * from which Image is created. * - * @param {object} [parameters.networkProfile] Specifies the network interfaces - * of the virtual machine. + * @param {object} [parameters.storageProfile] Specifies the storage settings + * for the virtual machine disks. * - * @param {array} [parameters.networkProfile.networkInterfaces] Specifies the - * list of resource Ids for the network interfaces associated with the virtual - * machine. + * @param {object} [parameters.storageProfile.osDisk] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * - * @param {object} [parameters.diagnosticsProfile] Specifies the boot - * diagnostic settings state.

    Minimum api-version: 2015-06-15. + * @param {string} parameters.storageProfile.osDisk.osType This property allows + * you to specify the type of the OS that is included in the disk if creating a + * VM from a custom image.

    Possible values are:

    **Windows** + *

    **Linux**. Possible values include: 'Windows', 'Linux' * - * @param {object} [parameters.diagnosticsProfile.bootDiagnostics] Boot - * Diagnostics is a debugging feature which allows you to view Console Output - * and Screenshot to diagnose VM status.

    You can easily view the - * output of your console log.

    Azure also enables you to see a - * screenshot of the VM from the hypervisor. + * @param {string} parameters.storageProfile.osDisk.osState The OS State. + * Possible values include: 'Generalized', 'Specialized' * - * @param {boolean} [parameters.diagnosticsProfile.bootDiagnostics.enabled] - * Whether boot diagnostics should be enabled on the Virtual Machine. + * @param {object} [parameters.storageProfile.osDisk.snapshot] The snapshot. * - * @param {string} [parameters.diagnosticsProfile.bootDiagnostics.storageUri] - * Uri of the storage account to use for placing the console output and - * screenshot. + * @param {object} [parameters.storageProfile.osDisk.managedDisk] The + * managedDisk. * - * @param {object} [parameters.availabilitySet] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - *

    For more information on Azure planned maintainance, see [Planned - * maintenance for virtual machines in - * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) - *

    Currently, a VM can only be added to availability set at creation - * time. An existing VM cannot be added to an availability set. + * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource + * Id * - * @param {string} [parameters.availabilitySet.id] Resource Id + * @param {string} [parameters.storageProfile.osDisk.blobUri] The Virtual Hard + * Disk. * - * @param {string} [parameters.licenseType] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) - *

    Minimum api-version: 2015-06-15 + * @param {string} [parameters.storageProfile.osDisk.caching] 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' * - * @param {object} [parameters.identity] The identity of the virtual machine, - * if configured. + * @param {number} [parameters.storageProfile.osDisk.diskSizeGB] Specifies the + * size of empty data disks 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 * - * @param {string} [parameters.identity.type] 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' + * @param {string} [parameters.storageProfile.osDisk.storageAccountType] + * Specifies the storage account type for the managed disk. UltraSSD_LRS cannot + * be used with OS Disk. Possible values include: 'Standard_LRS', + * 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * - * @param {object} [parameters.identity.userAssignedIdentities] The list of - * user identities associated with the Virtual Machine. The user identity - * dictionary key references will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + * @param {array} [parameters.storageProfile.dataDisks] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * - * @param {array} [parameters.zones] The virtual machine zones. + * @param {boolean} [parameters.storageProfile.zoneResilient] Specifies whether + * an image is zone resilient or not. Default is false. Zone resilient images + * can be created only in regions that provide Zone Redundant Storage (ZRS). + * + * @param {string} parameters.location Resource location * * @param {object} [parameters.tags] Resource tags * @@ -8002,7 +7837,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {VirtualMachine} - The deserialized result object. + * @resolve {Image} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -8010,104 +7845,166 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {VirtualMachine} [result] - The deserialized result object if an error did not occur. - * See {@link VirtualMachine} for more information. + * {Image} [result] - The deserialized result object if an error did not occur. + * See {@link Image} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginUpdate(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginUpdate(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineUpdate, callback: ServiceCallback): void; - beginUpdate(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineUpdate, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, imageName: string, parameters: models.Image, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, imageName: string, parameters: models.Image, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, imageName: string, parameters: models.Image, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * The operation to delete a virtual machine. + * Update an image. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} vmName The name of the virtual machine. + * @param {string} imageName The name of the image. * - * @param {object} [options] Optional Parameters. + * @param {object} parameters Parameters supplied to the Update Image + * operation. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {object} [parameters.sourceVirtualMachine] The source virtual machine + * from which Image is created. * - * @returns {Promise} A promise is returned + * @param {object} [parameters.storageProfile] Specifies the storage settings + * for the virtual machine disks. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {object} [parameters.storageProfile.osDisk] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * - * @reject {Error|ServiceError} - The error object. - */ - beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * The operation to delete a virtual machine. + * @param {string} parameters.storageProfile.osDisk.osType This property allows + * you to specify the type of the OS that is included in the disk if creating a + * VM from a custom image.

    Possible values are:

    **Windows** + *

    **Linux**. Possible values include: 'Windows', 'Linux' * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} parameters.storageProfile.osDisk.osState The OS State. + * Possible values include: 'Generalized', 'Specialized' * - * @param {string} vmName The name of the virtual machine. + * @param {object} [parameters.storageProfile.osDisk.snapshot] The snapshot. * - * @param {object} [options] Optional Parameters. + * @param {object} [parameters.storageProfile.osDisk.managedDisk] The + * managedDisk. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource + * Id * - * @param {ServiceCallback} [optionalCallback] - The optional callback. + * @param {string} [parameters.storageProfile.osDisk.blobUri] The Virtual Hard + * Disk. * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. + * @param {string} [parameters.storageProfile.osDisk.caching] 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' * - * {Promise} A promise is returned. + * @param {number} [parameters.storageProfile.osDisk.diskSizeGB] Specifies the + * size of empty data disks 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 * - * @resolve {null} - The deserialized result object. + * @param {string} [parameters.storageProfile.osDisk.storageAccountType] + * Specifies the storage account type for the managed disk. UltraSSD_LRS cannot + * be used with OS Disk. Possible values include: 'Standard_LRS', + * 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' * - * @reject {Error|ServiceError} - The error object. + * @param {array} [parameters.storageProfile.dataDisks] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * - * {ServiceCallback} optionalCallback(err, result, request, response) + * @param {boolean} [parameters.storageProfile.zoneResilient] Specifies whether + * an image is zone resilient or not. Default is false. Zone resilient images + * can be created only in regions that provide Zone Redundant Storage (ZRS). * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * @param {object} [parameters.tags] Resource tags * - * {null} [result] - The deserialized result object if an error did not occur. + * @param {object} [options] Optional Parameters. * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. */ - beginDeleteMethod(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeleteMethod(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; - beginDeleteMethod(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - + updateWithHttpOperationResponse(resourceGroupName: string, imageName: string, parameters: models.ImageUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Converts virtual machine disks from blob-based to managed disks. Virtual - * machine must be stop-deallocated before invoking this operation. + * Update an image. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} vmName The name of the virtual machine. + * @param {string} imageName The name of the image. * - * @param {object} [options] Optional Parameters. + * @param {object} parameters Parameters supplied to the Update Image + * operation. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {object} [parameters.sourceVirtualMachine] The source virtual machine + * from which Image is created. * - * @returns {Promise} A promise is returned + * @param {object} [parameters.storageProfile] Specifies the storage settings + * for the virtual machine disks. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {object} [parameters.storageProfile.osDisk] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * - * @reject {Error|ServiceError} - The error object. - */ - beginConvertToManagedDisksWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Converts virtual machine disks from blob-based to managed disks. Virtual - * machine must be stop-deallocated before invoking this operation. + * @param {string} parameters.storageProfile.osDisk.osType This property allows + * you to specify the type of the OS that is included in the disk if creating a + * VM from a custom image.

    Possible values are:

    **Windows** + *

    **Linux**. Possible values include: 'Windows', 'Linux' + * + * @param {string} parameters.storageProfile.osDisk.osState The OS State. + * Possible values include: 'Generalized', 'Specialized' + * + * @param {object} [parameters.storageProfile.osDisk.snapshot] The snapshot. + * + * @param {object} [parameters.storageProfile.osDisk.managedDisk] The + * managedDisk. + * + * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource + * Id + * + * @param {string} [parameters.storageProfile.osDisk.blobUri] The Virtual Hard + * Disk. + * + * @param {string} [parameters.storageProfile.osDisk.caching] 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' + * + * @param {number} [parameters.storageProfile.osDisk.diskSizeGB] Specifies the + * size of empty data disks 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 + * + * @param {string} [parameters.storageProfile.osDisk.storageAccountType] + * Specifies the storage account type for the managed disk. UltraSSD_LRS cannot + * be used with OS Disk. Possible values include: 'Standard_LRS', + * 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' + * + * @param {array} [parameters.storageProfile.dataDisks] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). * - * @param {string} resourceGroupName The name of the resource group. + * @param {boolean} [parameters.storageProfile.zoneResilient] Specifies whether + * an image is zone resilient or not. Default is false. Zone resilient images + * can be created only in regions that provide Zone Redundant Storage (ZRS). * - * @param {string} vmName The name of the virtual machine. + * @param {object} [parameters.tags] Resource tags * * @param {object} [options] Optional Parameters. * @@ -8121,7 +8018,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {Image} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -8129,24 +8026,24 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {Image} [result] - The deserialized result object if an error did not occur. + * See {@link Image} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginConvertToManagedDisks(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginConvertToManagedDisks(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; - beginConvertToManagedDisks(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + update(resourceGroupName: string, imageName: string, parameters: models.ImageUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, imageName: string, parameters: models.ImageUpdate, callback: ServiceCallback): void; + update(resourceGroupName: string, imageName: string, parameters: models.ImageUpdate, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Shuts down the virtual machine and releases the compute resources. You are - * not billed for the compute resources that this virtual machine uses. + * Deletes an Image. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} vmName The name of the virtual machine. + * @param {string} imageName The name of the image. * * @param {object} [options] Optional Parameters. * @@ -8159,15 +8056,14 @@ export interface VirtualMachines { * * @reject {Error|ServiceError} - The error object. */ - beginDeallocateWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, imageName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Shuts down the virtual machine and releases the compute resources. You are - * not billed for the compute resources that this virtual machine uses. + * Deletes an Image. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} vmName The name of the virtual machine. + * @param {string} imageName The name of the image. * * @param {object} [options] Optional Parameters. * @@ -8195,44 +8091,46 @@ export interface VirtualMachines { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginDeallocate(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeallocate(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; - beginDeallocate(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, imageName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, imageName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, imageName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * 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. + * Gets an image. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} vmName The name of the virtual machine. + * @param {string} imageName The name of the image. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.expand] The expand expression to apply on the + * operation. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginPowerOffWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, imageName: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * 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. + * Gets an image. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} vmName The name of the virtual machine. + * @param {string} imageName The name of the image. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.expand] The expand expression to apply on the + * operation. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -8243,7 +8141,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {Image} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -8251,24 +8149,23 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {Image} [result] - The deserialized result object if an error did not occur. + * See {@link Image} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginPowerOff(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginPowerOff(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; - beginPowerOff(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, imageName: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, imageName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, imageName: string, options: { expand? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * The operation to restart a virtual machine. + * Gets the list of images under a resource group. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} vmName The name of the virtual machine. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -8276,19 +8173,17 @@ export interface VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginRestartWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByResourceGroupWithHttpOperationResponse(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * The operation to restart a virtual machine. + * Gets the list of images under a resource group. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} vmName The name of the virtual machine. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -8301,7 +8196,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {ImageListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -8309,23 +8204,22 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {ImageListResult} [result] - The deserialized result object if an error did not occur. + * See {@link ImageListResult} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginRestart(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginRestart(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; - beginRestart(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByResourceGroup(resourceGroupName: string, callback: ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * The operation to start a virtual machine. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} vmName The name of the virtual machine. + * Gets the list of Images in the subscription. Use nextLink property in the + * response to get the next page of Images. Do this till nextLink is null to + * fetch all the Images. * * @param {object} [options] Optional Parameters. * @@ -8334,18 +8228,16 @@ export interface VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginStartWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * The operation to start a virtual machine. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} vmName The name of the virtual machine. + * Gets the list of Images in the subscription. Use nextLink property in the + * response to get the next page of Images. Do this till nextLink is null to + * fetch all the Images. * * @param {object} [options] Optional Parameters. * @@ -8359,7 +8251,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {ImageListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -8367,23 +8259,87 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {ImageListResult} [result] - The deserialized result object if an error did not occur. + * See {@link ImageListResult} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginStart(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginStart(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; - beginStart(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + list(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(callback: ServiceCallback): void; + list(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * The operation to redeploy a virtual machine. + * Create or update an image. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} vmName The name of the virtual machine. + * @param {string} imageName The name of the image. + * + * @param {object} parameters Parameters supplied to the Create Image + * operation. + * + * @param {object} [parameters.sourceVirtualMachine] The source virtual machine + * from which Image is created. + * + * @param {object} [parameters.storageProfile] Specifies the storage settings + * for the virtual machine disks. + * + * @param {object} [parameters.storageProfile.osDisk] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + * + * @param {string} parameters.storageProfile.osDisk.osType This property allows + * you to specify the type of the OS that is included in the disk if creating a + * VM from a custom image.

    Possible values are:

    **Windows** + *

    **Linux**. Possible values include: 'Windows', 'Linux' + * + * @param {string} parameters.storageProfile.osDisk.osState The OS State. + * Possible values include: 'Generalized', 'Specialized' + * + * @param {object} [parameters.storageProfile.osDisk.snapshot] The snapshot. + * + * @param {object} [parameters.storageProfile.osDisk.managedDisk] The + * managedDisk. + * + * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource + * Id + * + * @param {string} [parameters.storageProfile.osDisk.blobUri] The Virtual Hard + * Disk. + * + * @param {string} [parameters.storageProfile.osDisk.caching] 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' + * + * @param {number} [parameters.storageProfile.osDisk.diskSizeGB] Specifies the + * size of empty data disks 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 + * + * @param {string} [parameters.storageProfile.osDisk.storageAccountType] + * Specifies the storage account type for the managed disk. UltraSSD_LRS cannot + * be used with OS Disk. Possible values include: 'Standard_LRS', + * 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' + * + * @param {array} [parameters.storageProfile.dataDisks] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + * + * @param {boolean} [parameters.storageProfile.zoneResilient] Specifies whether + * an image is zone resilient or not. Default is false. Zone resilient images + * can be created only in regions that provide Zone Redundant Storage (ZRS). + * + * @param {string} parameters.location Resource location + * + * @param {object} [parameters.tags] Resource tags * * @param {object} [options] Optional Parameters. * @@ -8392,18 +8348,81 @@ export interface VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginRedeployWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, imageName: string, parameters: models.Image, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * The operation to redeploy a virtual machine. + * Create or update an image. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} imageName The name of the image. + * + * @param {object} parameters Parameters supplied to the Create Image + * operation. + * + * @param {object} [parameters.sourceVirtualMachine] The source virtual machine + * from which Image is created. + * + * @param {object} [parameters.storageProfile] Specifies the storage settings + * for the virtual machine disks. + * + * @param {object} [parameters.storageProfile.osDisk] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + * + * @param {string} parameters.storageProfile.osDisk.osType This property allows + * you to specify the type of the OS that is included in the disk if creating a + * VM from a custom image.

    Possible values are:

    **Windows** + *

    **Linux**. Possible values include: 'Windows', 'Linux' + * + * @param {string} parameters.storageProfile.osDisk.osState The OS State. + * Possible values include: 'Generalized', 'Specialized' + * + * @param {object} [parameters.storageProfile.osDisk.snapshot] The snapshot. + * + * @param {object} [parameters.storageProfile.osDisk.managedDisk] The + * managedDisk. + * + * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource + * Id + * + * @param {string} [parameters.storageProfile.osDisk.blobUri] The Virtual Hard + * Disk. + * + * @param {string} [parameters.storageProfile.osDisk.caching] 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' + * + * @param {number} [parameters.storageProfile.osDisk.diskSizeGB] Specifies the + * size of empty data disks 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 + * + * @param {string} [parameters.storageProfile.osDisk.storageAccountType] + * Specifies the storage account type for the managed disk. UltraSSD_LRS cannot + * be used with OS Disk. Possible values include: 'Standard_LRS', + * 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' + * + * @param {array} [parameters.storageProfile.dataDisks] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + * + * @param {boolean} [parameters.storageProfile.zoneResilient] Specifies whether + * an image is zone resilient or not. Default is false. Zone resilient images + * can be created only in regions that provide Zone Redundant Storage (ZRS). * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} parameters.location Resource location * - * @param {string} vmName The name of the virtual machine. + * @param {object} [parameters.tags] Resource tags * * @param {object} [options] Optional Parameters. * @@ -8417,7 +8436,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {Image} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -8425,23 +8444,85 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {Image} [result] - The deserialized result object if an error did not occur. + * See {@link Image} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginRedeploy(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginRedeploy(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; - beginRedeploy(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, imageName: string, parameters: models.Image, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(resourceGroupName: string, imageName: string, parameters: models.Image, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, imageName: string, parameters: models.Image, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * The operation to perform maintenance on a virtual machine. + * Update an image. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} vmName The name of the virtual machine. + * @param {string} imageName The name of the image. + * + * @param {object} parameters Parameters supplied to the Update Image + * operation. + * + * @param {object} [parameters.sourceVirtualMachine] The source virtual machine + * from which Image is created. + * + * @param {object} [parameters.storageProfile] Specifies the storage settings + * for the virtual machine disks. + * + * @param {object} [parameters.storageProfile.osDisk] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + * + * @param {string} parameters.storageProfile.osDisk.osType This property allows + * you to specify the type of the OS that is included in the disk if creating a + * VM from a custom image.

    Possible values are:

    **Windows** + *

    **Linux**. Possible values include: 'Windows', 'Linux' + * + * @param {string} parameters.storageProfile.osDisk.osState The OS State. + * Possible values include: 'Generalized', 'Specialized' + * + * @param {object} [parameters.storageProfile.osDisk.snapshot] The snapshot. + * + * @param {object} [parameters.storageProfile.osDisk.managedDisk] The + * managedDisk. + * + * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource + * Id + * + * @param {string} [parameters.storageProfile.osDisk.blobUri] The Virtual Hard + * Disk. + * + * @param {string} [parameters.storageProfile.osDisk.caching] 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' + * + * @param {number} [parameters.storageProfile.osDisk.diskSizeGB] Specifies the + * size of empty data disks 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 + * + * @param {string} [parameters.storageProfile.osDisk.storageAccountType] + * Specifies the storage account type for the managed disk. UltraSSD_LRS cannot + * be used with OS Disk. Possible values include: 'Standard_LRS', + * 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' + * + * @param {array} [parameters.storageProfile.dataDisks] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + * + * @param {boolean} [parameters.storageProfile.zoneResilient] Specifies whether + * an image is zone resilient or not. Default is false. Zone resilient images + * can be created only in regions that provide Zone Redundant Storage (ZRS). + * + * @param {object} [parameters.tags] Resource tags * * @param {object} [options] Optional Parameters. * @@ -8450,18 +8531,79 @@ export interface VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginPerformMaintenanceWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginUpdateWithHttpOperationResponse(resourceGroupName: string, imageName: string, parameters: models.ImageUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * The operation to perform maintenance on a virtual machine. + * Update an image. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} vmName The name of the virtual machine. + * @param {string} imageName The name of the image. + * + * @param {object} parameters Parameters supplied to the Update Image + * operation. + * + * @param {object} [parameters.sourceVirtualMachine] The source virtual machine + * from which Image is created. + * + * @param {object} [parameters.storageProfile] Specifies the storage settings + * for the virtual machine disks. + * + * @param {object} [parameters.storageProfile.osDisk] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + * + * @param {string} parameters.storageProfile.osDisk.osType This property allows + * you to specify the type of the OS that is included in the disk if creating a + * VM from a custom image.

    Possible values are:

    **Windows** + *

    **Linux**. Possible values include: 'Windows', 'Linux' + * + * @param {string} parameters.storageProfile.osDisk.osState The OS State. + * Possible values include: 'Generalized', 'Specialized' + * + * @param {object} [parameters.storageProfile.osDisk.snapshot] The snapshot. + * + * @param {object} [parameters.storageProfile.osDisk.managedDisk] The + * managedDisk. + * + * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource + * Id + * + * @param {string} [parameters.storageProfile.osDisk.blobUri] The Virtual Hard + * Disk. + * + * @param {string} [parameters.storageProfile.osDisk.caching] 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' + * + * @param {number} [parameters.storageProfile.osDisk.diskSizeGB] Specifies the + * size of empty data disks 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 + * + * @param {string} [parameters.storageProfile.osDisk.storageAccountType] + * Specifies the storage account type for the managed disk. UltraSSD_LRS cannot + * be used with OS Disk. Possible values include: 'Standard_LRS', + * 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS' + * + * @param {array} [parameters.storageProfile.dataDisks] 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](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + * + * @param {boolean} [parameters.storageProfile.zoneResilient] Specifies whether + * an image is zone resilient or not. Default is false. Zone resilient images + * can be created only in regions that provide Zone Redundant Storage (ZRS). + * + * @param {object} [parameters.tags] Resource tags * * @param {object} [options] Optional Parameters. * @@ -8475,7 +8617,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {Image} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -8483,33 +8625,24 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {Image} [result] - The deserialized result object if an error did not occur. + * See {@link Image} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginPerformMaintenance(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginPerformMaintenance(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; - beginPerformMaintenance(resourceGroupName: string, vmName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginUpdate(resourceGroupName: string, imageName: string, parameters: models.ImageUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginUpdate(resourceGroupName: string, imageName: string, parameters: models.ImageUpdate, callback: ServiceCallback): void; + beginUpdate(resourceGroupName: string, imageName: string, parameters: models.ImageUpdate, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Run command on the VM. + * Deletes an Image. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} vmName The name of the virtual machine. - * - * @param {object} parameters Parameters supplied to the Run command operation. - * - * @param {string} parameters.commandId The run command id. - * - * @param {array} [parameters.script] Optional. The script to be executed. - * When this value is given, the given script will override the default script - * of the command. - * - * @param {array} [parameters.parameters] The run command parameters. + * @param {string} imageName The name of the image. * * @param {object} [options] Optional Parameters. * @@ -8518,28 +8651,18 @@ export interface VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginRunCommandWithHttpOperationResponse(resourceGroupName: string, vmName: string, parameters: models.RunCommandInput, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, imageName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Run command on the VM. + * Deletes an Image. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} vmName The name of the virtual machine. - * - * @param {object} parameters Parameters supplied to the Run command operation. - * - * @param {string} parameters.commandId The run command id. - * - * @param {array} [parameters.script] Optional. The script to be executed. - * When this value is given, the given script will override the default script - * of the command. - * - * @param {array} [parameters.parameters] The run command parameters. + * @param {string} imageName The name of the image. * * @param {object} [options] Optional Parameters. * @@ -8553,7 +8676,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {RunCommandResult} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -8561,21 +8684,19 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {RunCommandResult} [result] - The deserialized result object if an error did not occur. - * See {@link RunCommandResult} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginRunCommand(resourceGroupName: string, vmName: string, parameters: models.RunCommandInput, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginRunCommand(resourceGroupName: string, vmName: string, parameters: models.RunCommandInput, callback: ServiceCallback): void; - beginRunCommand(resourceGroupName: string, vmName: string, parameters: models.RunCommandInput, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, imageName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(resourceGroupName: string, imageName: string, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, imageName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * 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. + * Gets the list of images under a resource group. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -8587,15 +8708,14 @@ export interface VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByResourceGroupNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): 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. + * Gets the list of images under a resource group. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -8612,7 +8732,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {VirtualMachineListResult} - The deserialized result object. + * @resolve {ImageListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -8620,22 +8740,22 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {VirtualMachineListResult} [result] - The deserialized result object if an error did not occur. - * See {@link VirtualMachineListResult} for more - * information. + * {ImageListResult} [result] - The deserialized result object if an error did not occur. + * See {@link ImageListResult} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listNext(nextPageLink: string, callback: ServiceCallback): void; - listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByResourceGroupNext(nextPageLink: string, callback: ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * 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. + * Gets the list of Images in the subscription. Use nextLink property in the + * response to get the next page of Images. Do this till nextLink is null to + * fetch all the Images. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -8647,15 +8767,16 @@ export interface VirtualMachines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listAllNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): 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. + * Gets the list of Images in the subscription. Use nextLink property in the + * response to get the next page of Images. Do this till nextLink is null to + * fetch all the Images. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -8672,7 +8793,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {VirtualMachineListResult} - The deserialized result object. + * @resolve {ImageListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -8680,17 +8801,16 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {VirtualMachineListResult} [result] - The deserialized result object if an error did not occur. - * See {@link VirtualMachineListResult} for more - * information. + * {ImageListResult} [result] - The deserialized result object if an error did not occur. + * See {@link ImageListResult} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listAllNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listAllNext(nextPageLink: string, callback: ServiceCallback): void; - listAllNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listNext(nextPageLink: string, callback: ServiceCallback): void; + listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** diff --git a/lib/services/computeManagement2/lib/operations/index.js b/lib/services/computeManagement2/lib/operations/index.js index 7f73a5f866..b421d91e13 100644 --- a/lib/services/computeManagement2/lib/operations/index.js +++ b/lib/services/computeManagement2/lib/operations/index.js @@ -20,9 +20,9 @@ exports.VirtualMachineExtensionImages = require('./virtualMachineExtensionImages exports.VirtualMachineExtensions = require('./virtualMachineExtensions'); exports.VirtualMachineImages = require('./virtualMachineImages'); exports.UsageOperations = require('./usageOperations'); +exports.VirtualMachines = require('./virtualMachines'); exports.VirtualMachineSizes = require('./virtualMachineSizes'); exports.Images = require('./images'); -exports.VirtualMachines = require('./virtualMachines'); exports.VirtualMachineScaleSets = require('./virtualMachineScaleSets'); exports.VirtualMachineScaleSetExtensions = require('./virtualMachineScaleSetExtensions'); exports.VirtualMachineScaleSetRollingUpgrades = require('./virtualMachineScaleSetRollingUpgrades'); diff --git a/lib/services/computeManagement2/lib/operations/virtualMachines.js b/lib/services/computeManagement2/lib/operations/virtualMachines.js index 87c98889a2..7d88e6ee67 100644 --- a/lib/services/computeManagement2/lib/operations/virtualMachines.js +++ b/lib/services/computeManagement2/lib/operations/virtualMachines.js @@ -14,6 +14,152 @@ const msRest = require('ms-rest'); const msRestAzure = require('ms-rest-azure'); const WebResource = msRest.WebResource; +/** + * Gets all the virtual machines under the specified subscription for the + * specified location. + * + * @param {string} location The location for which virtual machines under the + * subscription are queried. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualMachineListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listByLocation(location, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-10-01'; + // Validate + try { + if (location === null || location === undefined || typeof location.valueOf() !== 'string') { + throw new Error('location cannot be null or undefined and it must be of type string.'); + } + if (location !== null && location !== undefined) { + if (location.match(/^[-\w\._]+$/) === null) + { + throw new Error('"location" should satisfy the constraint - "Pattern": /^[-\w\._]+$/'); + } + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/virtualMachines'; + requestUrl = requestUrl.replace('{location}', encodeURIComponent(location)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['VirtualMachineListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + /** * Captures the VM by copying virtual hard disks of the VM and outputs a @@ -5019,6 +5165,135 @@ function _beginRunCommand(resourceGroupName, vmName, parameters, options, callba }); } +/** + * Gets all the virtual machines under the specified subscription for the + * specified location. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualMachineListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listByLocationNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['VirtualMachineListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + /** * 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. @@ -5285,6 +5560,7 @@ class VirtualMachines { */ constructor(client) { this.client = client; + this._listByLocation = _listByLocation; this._capture = _capture; this._createOrUpdate = _createOrUpdate; this._update = _update; @@ -5315,10 +5591,98 @@ class VirtualMachines { this._beginRedeploy = _beginRedeploy; this._beginPerformMaintenance = _beginPerformMaintenance; this._beginRunCommand = _beginRunCommand; + this._listByLocationNext = _listByLocationNext; this._listNext = _listNext; this._listAllNext = _listAllNext; } + /** + * Gets all the virtual machines under the specified subscription for the + * specified location. + * + * @param {string} location The location for which virtual machines under the + * subscription are queried. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listByLocationWithHttpOperationResponse(location, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listByLocation(location, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Gets all the virtual machines under the specified subscription for the + * specified location. + * + * @param {string} location The location for which virtual machines under the + * subscription are queried. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {VirtualMachineListResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualMachineListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listByLocation(location, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listByLocation(location, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listByLocation(location, 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. @@ -11230,6 +11594,93 @@ class VirtualMachines { } } + /** + * Gets all the virtual machines under the specified subscription for the + * specified location. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listByLocationNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listByLocationNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Gets all the virtual machines under the specified subscription for the + * specified location. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {VirtualMachineListResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualMachineListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listByLocationNext(nextPageLink, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listByLocationNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listByLocationNext(nextPageLink, 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.