diff --git a/lib/services/computeManagement2/lib/computeManagementClient.d.ts b/lib/services/computeManagement2/lib/computeManagementClient.d.ts index d924b38665..4894e75f99 100644 --- a/lib/services/computeManagement2/lib/computeManagementClient.d.ts +++ b/lib/services/computeManagement2/lib/computeManagementClient.d.ts @@ -58,11 +58,11 @@ export default class ComputeManagementClient extends AzureServiceClient { availabilitySets: operations.AvailabilitySets; virtualMachineExtensionImages: operations.VirtualMachineExtensionImages; virtualMachineExtensions: operations.VirtualMachineExtensions; + virtualMachines: operations.VirtualMachines; virtualMachineImages: operations.VirtualMachineImages; usageOperations: operations.UsageOperations; 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 84327ce764..15a0e2a7d3 100644 --- a/lib/services/computeManagement2/lib/computeManagementClient.js +++ b/lib/services/computeManagement2/lib/computeManagementClient.js @@ -75,11 +75,11 @@ class ComputeManagementClient extends ServiceClient { this.availabilitySets = new operations.AvailabilitySets(this); this.virtualMachineExtensionImages = new operations.VirtualMachineExtensionImages(this); this.virtualMachineExtensions = new operations.VirtualMachineExtensions(this); + this.virtualMachines = new operations.VirtualMachines(this); this.virtualMachineImages = new operations.VirtualMachineImages(this); this.usageOperations = new operations.UsageOperations(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 448a4fd1d2..e1e00fc3f7 100644 --- a/lib/services/computeManagement2/lib/models/index.d.ts +++ b/lib/services/computeManagement2/lib/models/index.d.ts @@ -334,6 +334,51 @@ export interface VirtualMachineExtension extends Resource { instanceView?: VirtualMachineExtensionInstanceView; } +/** + * @class + * Initializes a new instance of the VirtualMachineExtensionUpdate class. + * @constructor + * Describes a Virtual Machine Extension. + * + * @member {string} [forceUpdateTag] How the extension handler should be forced + * to update even if the extension configuration has not changed. + * @member {string} [publisher] The name of the extension handler publisher. + * @member {string} [type] Specifies the type of the extension; an example is + * "CustomScriptExtension". + * @member {string} [typeHandlerVersion] Specifies the version of the script + * handler. + * @member {boolean} [autoUpgradeMinorVersion] Indicates whether the extension + * should use a newer minor version if one is available at deployment time. + * Once deployed, however, the extension will not upgrade minor versions unless + * redeployed, even with this property set to true. + * @member {object} [settings] Json formatted public settings for the + * extension. + * @member {object} [protectedSettings] The extension can contain either + * protectedSettings or protectedSettingsFromKeyVault or no protected settings + * at all. + */ +export interface VirtualMachineExtensionUpdate extends UpdateResource { + forceUpdateTag?: string; + publisher?: string; + type?: string; + typeHandlerVersion?: string; + autoUpgradeMinorVersion?: boolean; + settings?: any; + protectedSettings?: any; +} + +/** + * @class + * Initializes a new instance of the VirtualMachineExtensionsListResult class. + * @constructor + * The List Extension operation response + * + * @member {array} [value] The list of extensions + */ +export interface VirtualMachineExtensionsListResult { + value?: VirtualMachineExtension[]; +} + /** * @class * Initializes a new instance of the PurchasePlan class. @@ -5940,6 +5985,19 @@ export interface AvailabilitySetListResult extends Array { export interface VirtualMachineSizeListResult extends Array { } +/** + * @class + * Initializes a new instance of the VirtualMachineListResult class. + * @constructor + * The List Virtual Machine 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. + */ +export interface VirtualMachineListResult extends Array { + nextLink?: string; +} + /** * @class * Initializes a new instance of the ListUsagesResult class. @@ -5967,19 +6025,6 @@ export interface ImageListResult extends Array { nextLink?: string; } -/** - * @class - * Initializes a new instance of the VirtualMachineListResult class. - * @constructor - * The List Virtual Machine 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. - */ -export interface VirtualMachineListResult extends Array { - nextLink?: string; -} - /** * @class * Initializes a new instance of the VirtualMachineScaleSetListResult class. diff --git a/lib/services/computeManagement2/lib/models/index.js b/lib/services/computeManagement2/lib/models/index.js index 72bacd7a1f..f396363aaa 100644 --- a/lib/services/computeManagement2/lib/models/index.js +++ b/lib/services/computeManagement2/lib/models/index.js @@ -31,6 +31,8 @@ exports.VirtualMachineExtensionImage = require('./virtualMachineExtensionImage') exports.VirtualMachineImageResource = require('./virtualMachineImageResource'); exports.VirtualMachineExtensionInstanceView = require('./virtualMachineExtensionInstanceView'); exports.VirtualMachineExtension = require('./virtualMachineExtension'); +exports.VirtualMachineExtensionUpdate = require('./virtualMachineExtensionUpdate'); +exports.VirtualMachineExtensionsListResult = require('./virtualMachineExtensionsListResult'); exports.PurchasePlan = require('./purchasePlan'); exports.OSDiskImage = require('./oSDiskImage'); exports.DataDiskImage = require('./dataDiskImage'); @@ -175,9 +177,9 @@ exports.ContainerService = require('./containerService'); exports.ComputeOperationListResult = require('./computeOperationListResult'); exports.AvailabilitySetListResult = require('./availabilitySetListResult'); exports.VirtualMachineSizeListResult = require('./virtualMachineSizeListResult'); +exports.VirtualMachineListResult = require('./virtualMachineListResult'); exports.ListUsagesResult = require('./listUsagesResult'); exports.ImageListResult = require('./imageListResult'); -exports.VirtualMachineListResult = require('./virtualMachineListResult'); 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 1f87baf8f6..e625011837 100644 --- a/lib/services/computeManagement2/lib/operations/index.d.ts +++ b/lib/services/computeManagement2/lib/operations/index.d.ts @@ -757,7 +757,7 @@ export interface VirtualMachineExtensions { * @param {string} resourceGroupName The name of the resource group. * * @param {string} vmName The name of the virtual machine where the extension - * should be create or updated. + * should be created or updated. * * @param {string} vmExtensionName The name of the virtual machine extension. * @@ -830,7 +830,7 @@ export interface VirtualMachineExtensions { * @param {string} resourceGroupName The name of the resource group. * * @param {string} vmName The name of the virtual machine where the extension - * should be create or updated. + * should be created or updated. * * @param {string} vmExtensionName The name of the virtual machine extension. * @@ -917,6 +917,132 @@ export interface VirtualMachineExtensions { createOrUpdate(resourceGroupName: string, vmName: string, vmExtensionName: string, extensionParameters: models.VirtualMachineExtension, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + /** + * The operation to update the extension. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} vmName The name of the virtual machine where the extension + * should be updated. + * + * @param {string} vmExtensionName The name of the virtual machine extension. + * + * @param {object} extensionParameters Parameters supplied to the Update + * Virtual Machine Extension operation. + * + * @param {string} [extensionParameters.forceUpdateTag] How the extension + * handler should be forced to update even if the extension configuration has + * not changed. + * + * @param {string} [extensionParameters.publisher] The name of the extension + * handler publisher. + * + * @param {string} [extensionParameters.type] Specifies the type of the + * extension; an example is "CustomScriptExtension". + * + * @param {string} [extensionParameters.typeHandlerVersion] Specifies the + * version of the script handler. + * + * @param {boolean} [extensionParameters.autoUpgradeMinorVersion] Indicates + * whether the extension should use a newer minor version if one is available + * at deployment time. Once deployed, however, the extension will not upgrade + * minor versions unless redeployed, even with this property set to true. + * + * @param {object} [extensionParameters.settings] Json formatted public + * settings for the extension. + * + * @param {object} [extensionParameters.protectedSettings] The extension can + * contain either protectedSettings or protectedSettingsFromKeyVault or no + * protected settings at all. + * + * @param {object} [extensionParameters.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. + */ + updateWithHttpOperationResponse(resourceGroupName: string, vmName: string, vmExtensionName: string, extensionParameters: models.VirtualMachineExtensionUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * The operation to update the extension. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} vmName The name of the virtual machine where the extension + * should be updated. + * + * @param {string} vmExtensionName The name of the virtual machine extension. + * + * @param {object} extensionParameters Parameters supplied to the Update + * Virtual Machine Extension operation. + * + * @param {string} [extensionParameters.forceUpdateTag] How the extension + * handler should be forced to update even if the extension configuration has + * not changed. + * + * @param {string} [extensionParameters.publisher] The name of the extension + * handler publisher. + * + * @param {string} [extensionParameters.type] Specifies the type of the + * extension; an example is "CustomScriptExtension". + * + * @param {string} [extensionParameters.typeHandlerVersion] Specifies the + * version of the script handler. + * + * @param {boolean} [extensionParameters.autoUpgradeMinorVersion] Indicates + * whether the extension should use a newer minor version if one is available + * at deployment time. Once deployed, however, the extension will not upgrade + * minor versions unless redeployed, even with this property set to true. + * + * @param {object} [extensionParameters.settings] Json formatted public + * settings for the extension. + * + * @param {object} [extensionParameters.protectedSettings] The extension can + * contain either protectedSettings or protectedSettingsFromKeyVault or no + * protected settings at all. + * + * @param {object} [extensionParameters.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 {VirtualMachineExtension} - 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. + * + * {VirtualMachineExtension} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualMachineExtension} 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. + */ + update(resourceGroupName: string, vmName: string, vmExtensionName: string, extensionParameters: models.VirtualMachineExtensionUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, vmName: string, vmExtensionName: string, extensionParameters: models.VirtualMachineExtensionUpdate, callback: ServiceCallback): void; + update(resourceGroupName: string, vmName: string, vmExtensionName: string, extensionParameters: models.VirtualMachineExtensionUpdate, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + /** * The operation to delete the extension. * @@ -1061,7 +1187,7 @@ export interface VirtualMachineExtensions { * @param {string} resourceGroupName The name of the resource group. * * @param {string} vmName The name of the virtual machine where the extension - * should be create or updated. + * should be created or updated. * * @param {string} vmExtensionName The name of the virtual machine extension. * @@ -1134,7 +1260,7 @@ export interface VirtualMachineExtensions { * @param {string} resourceGroupName The name of the resource group. * * @param {string} vmName The name of the virtual machine where the extension - * should be create or updated. + * should be created or updated. * * @param {string} vmExtensionName The name of the virtual machine extension. * @@ -1222,15 +1348,45 @@ export interface VirtualMachineExtensions { /** - * The operation to delete the extension. + * The operation to update the extension. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} vmName The name of the virtual machine where the extension - * should be deleted. + * should be updated. * * @param {string} vmExtensionName The name of the virtual machine extension. * + * @param {object} extensionParameters Parameters supplied to the Update + * Virtual Machine Extension operation. + * + * @param {string} [extensionParameters.forceUpdateTag] How the extension + * handler should be forced to update even if the extension configuration has + * not changed. + * + * @param {string} [extensionParameters.publisher] The name of the extension + * handler publisher. + * + * @param {string} [extensionParameters.type] Specifies the type of the + * extension; an example is "CustomScriptExtension". + * + * @param {string} [extensionParameters.typeHandlerVersion] Specifies the + * version of the script handler. + * + * @param {boolean} [extensionParameters.autoUpgradeMinorVersion] Indicates + * whether the extension should use a newer minor version if one is available + * at deployment time. Once deployed, however, the extension will not upgrade + * minor versions unless redeployed, even with this property set to true. + * + * @param {object} [extensionParameters.settings] Json formatted public + * settings for the extension. + * + * @param {object} [extensionParameters.protectedSettings] The extension can + * contain either protectedSettings or protectedSettingsFromKeyVault or no + * protected settings at all. + * + * @param {object} [extensionParameters.tags] Resource tags + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1238,22 +1394,52 @@ export interface VirtualMachineExtensions { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, vmName: string, vmExtensionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginUpdateWithHttpOperationResponse(resourceGroupName: string, vmName: string, vmExtensionName: string, extensionParameters: models.VirtualMachineExtensionUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * The operation to delete the extension. + * The operation to update the extension. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} vmName The name of the virtual machine where the extension - * should be deleted. + * should be updated. * * @param {string} vmExtensionName The name of the virtual machine extension. * + * @param {object} extensionParameters Parameters supplied to the Update + * Virtual Machine Extension operation. + * + * @param {string} [extensionParameters.forceUpdateTag] How the extension + * handler should be forced to update even if the extension configuration has + * not changed. + * + * @param {string} [extensionParameters.publisher] The name of the extension + * handler publisher. + * + * @param {string} [extensionParameters.type] Specifies the type of the + * extension; an example is "CustomScriptExtension". + * + * @param {string} [extensionParameters.typeHandlerVersion] Specifies the + * version of the script handler. + * + * @param {boolean} [extensionParameters.autoUpgradeMinorVersion] Indicates + * whether the extension should use a newer minor version if one is available + * at deployment time. Once deployed, however, the extension will not upgrade + * minor versions unless redeployed, even with this property set to true. + * + * @param {object} [extensionParameters.settings] Json formatted public + * settings for the extension. + * + * @param {object} [extensionParameters.protectedSettings] The extension can + * contain either protectedSettings or protectedSettingsFromKeyVault or no + * protected settings at all. + * + * @param {object} [extensionParameters.tags] Resource tags + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1266,7 +1452,7 @@ export interface VirtualMachineExtensions { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {VirtualMachineExtension} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1274,40 +1460,28 @@ export interface VirtualMachineExtensions { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more + * {VirtualMachineExtension} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualMachineExtension} 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. */ - beginDeleteMethod(resourceGroupName: string, vmName: string, vmExtensionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeleteMethod(resourceGroupName: string, vmName: string, vmExtensionName: string, callback: ServiceCallback): void; - beginDeleteMethod(resourceGroupName: string, vmName: string, vmExtensionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * VirtualMachineImages - * __NOTE__: An instance of this class is automatically created for an - * instance of the ComputeManagementClient. - */ -export interface VirtualMachineImages { + beginUpdate(resourceGroupName: string, vmName: string, vmExtensionName: string, extensionParameters: models.VirtualMachineExtensionUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginUpdate(resourceGroupName: string, vmName: string, vmExtensionName: string, extensionParameters: models.VirtualMachineExtensionUpdate, callback: ServiceCallback): void; + beginUpdate(resourceGroupName: string, vmName: string, vmExtensionName: string, extensionParameters: models.VirtualMachineExtensionUpdate, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets a virtual machine image. - * - * @param {string} location The name of a supported Azure region. - * - * @param {string} publisherName A valid image publisher. + * The operation to delete the extension. * - * @param {string} offer A valid image publisher offer. + * @param {string} resourceGroupName The name of the resource group. * - * @param {string} skus A valid image SKU. + * @param {string} vmName The name of the virtual machine where the extension + * should be deleted. * - * @param {string} version A valid image SKU version. + * @param {string} vmExtensionName The name of the virtual machine extension. * * @param {object} [options] Optional Parameters. * @@ -1316,24 +1490,21 @@ export interface VirtualMachineImages { * * @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(location: string, publisherName: string, offer: string, skus: string, version: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, vmName: string, vmExtensionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a virtual machine image. - * - * @param {string} location The name of a supported Azure region. - * - * @param {string} publisherName A valid image publisher. + * The operation to delete the extension. * - * @param {string} offer A valid image publisher offer. + * @param {string} resourceGroupName The name of the resource group. * - * @param {string} skus A valid image SKU. + * @param {string} vmName The name of the virtual machine where the extension + * should be deleted. * - * @param {string} version A valid image SKU version. + * @param {string} vmExtensionName The name of the virtual machine extension. * * @param {object} [options] Optional Parameters. * @@ -1347,7 +1518,7 @@ export interface VirtualMachineImages { * * {Promise} A promise is returned. * - * @resolve {VirtualMachineImage} - The deserialized result object. + * @resolve {OperationStatusResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1355,68 +1526,64 @@ export interface VirtualMachineImages { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {VirtualMachineImage} [result] - The deserialized result object if an error did not occur. - * See {@link VirtualMachineImage} for more information. + * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. + * See {@link OperationStatusResponse} 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(location: string, publisherName: string, offer: string, skus: string, version: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(location: string, publisherName: string, offer: string, skus: string, version: string, callback: ServiceCallback): void; - get(location: string, publisherName: string, offer: string, skus: string, version: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, vmName: string, vmExtensionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(resourceGroupName: string, vmName: string, vmExtensionName: string, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, vmName: string, vmExtensionName: 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 { /** - * Gets a list of all virtual machine image versions for the specified - * location, publisher, offer, and SKU. + * The operation to get all extensions of a Virtual Machine. * - * @param {string} location The name of a supported Azure region. + * @param {string} resourceGroupName The name of the resource group. * - * @param {string} publisherName A valid image publisher. - * - * @param {string} offer A valid image publisher offer. - * - * @param {string} skus A valid image SKU. + * @param {string} vmName The name of the virtual machine containing the + * extension. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.filter] The filter to apply on the operation. - * - * @param {number} [options.top] - * - * @param {string} [options.orderby] + * @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. */ - listWithHttpOperationResponse(location: string, publisherName: string, offer: string, skus: string, options?: { filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + getExtensionsWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a list of all virtual machine image versions for the specified - * location, publisher, offer, and SKU. - * - * @param {string} location The name of a supported Azure region. - * - * @param {string} publisherName A valid image publisher. + * The operation to get all extensions of a Virtual Machine. * - * @param {string} offer A valid image publisher offer. + * @param {string} resourceGroupName The name of the resource group. * - * @param {string} skus A valid image SKU. + * @param {string} vmName The name of the virtual machine containing the + * extension. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.filter] The filter to apply on the operation. - * - * @param {number} [options.top] - * - * @param {string} [options.orderby] + * @param {string} [options.expand] The expand expression to apply on the + * operation. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1428,7 +1595,7 @@ export interface VirtualMachineImages { * * {Promise} A promise is returned. * - * @resolve {Array} - The deserialized result object. + * @resolve {VirtualMachineExtensionsListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1436,24 +1603,38 @@ export interface VirtualMachineImages { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Array} [result] - The deserialized result object if an error did not occur. + * {VirtualMachineExtensionsListResult} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualMachineExtensionsListResult} 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, publisherName: string, offer: string, skus: string, options?: { filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - list(location: string, publisherName: string, offer: string, skus: string, callback: ServiceCallback): void; - list(location: string, publisherName: string, offer: string, skus: string, options: { filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getExtensions(resourceGroupName: string, vmName: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + getExtensions(resourceGroupName: string, vmName: string, callback: ServiceCallback): void; + getExtensions(resourceGroupName: string, vmName: string, options: { expand? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets a list of virtual machine image offers for the specified location and - * publisher. + * 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} location The name of a supported Azure region. + * @param {string} resourceGroupName The name of the resource group. * - * @param {string} publisherName A valid image publisher. + * @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. * @@ -1462,19 +1643,31 @@ export interface VirtualMachineImages { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listOffersWithHttpOperationResponse(location: string, publisherName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + captureWithHttpOperationResponse(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineCaptureParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a list of virtual machine image offers for the specified location and - * publisher. + * 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} location The name of a supported Azure region. + * @param {string} resourceGroupName The name of the resource group. * - * @param {string} publisherName A valid image publisher. + * @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. * @@ -1488,7 +1681,7 @@ export interface VirtualMachineImages { * * {Promise} A promise is returned. * - * @resolve {Array} - The deserialized result object. + * @resolve {VirtualMachineCaptureResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1496,280 +1689,403 @@ export interface VirtualMachineImages { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Array} [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. */ - listOffers(location: string, publisherName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listOffers(location: string, publisherName: string, callback: ServiceCallback): void; - listOffers(location: string, publisherName: string, 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; /** - * Gets a list of virtual machine image publishers for the specified Azure - * location. - * - * @param {string} location The name of a supported Azure region. + * The operation to create or update a virtual machine. * - * @param {object} [options] Optional Parameters. + * @param {string} resourceGroupName The name of the resource group. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {string} vmName The name of the virtual machine. * - * @returns {Promise} A promise is returned + * @param {object} parameters Parameters supplied to the Create Virtual Machine + * operation. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @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**. * - * @reject {Error|ServiceError} - The error object. - */ - listPublishersWithHttpOperationResponse(location: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Gets a list of virtual machine image publishers for the specified Azure - * location. + * @param {string} [parameters.plan.name] The plan ID. * - * @param {string} location The name of a supported Azure region. + * @param {string} [parameters.plan.publisher] The publisher ID. * - * @param {object} [options] Optional 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.customHeaders] Headers that will be added to the - * request + * @param {string} [parameters.plan.promotionCode] The promotion code. * - * @param {ServiceCallback} [optionalCallback] - The optional callback. + * @param {object} [parameters.hardwareProfile] Specifies the hardware settings + * for 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.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' * - * {Promise} A promise is returned. + * @param {object} [parameters.storageProfile] Specifies the storage settings + * for the virtual machine disks. * - * @resolve {Array} - The deserialized result 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. * - * @reject {Error|ServiceError} - The error object. + * @param {string} [parameters.storageProfile.imageReference.publisher] The + * image publisher. * - * {ServiceCallback} optionalCallback(err, result, request, response) + * @param {string} [parameters.storageProfile.imageReference.offer] Specifies + * the offer of the platform image or marketplace image used to create the + * virtual machine. * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * @param {string} [parameters.storageProfile.imageReference.sku] The image + * SKU. * - * {Array} [result] - The deserialized result 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. * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @param {string} [parameters.storageProfile.imageReference.id] Resource Id * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - listPublishers(location: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listPublishers(location: string, callback: ServiceCallback): void; - listPublishers(location: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * Gets a list of virtual machine image SKUs for the specified location, - * publisher, and offer. + * @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} location The name of a supported Azure region. + * @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} publisherName A valid image publisher. + * @param {object} [parameters.storageProfile.osDisk.encryptionSettings] + * Specifies the encryption settings for the OS Disk.

Minimum + * api-version: 2015-06-15 * - * @param {string} offer A valid image publisher offer. + * @param {object} + * [parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey] + * Specifies the location of the disk encryption key, which is a Key Vault + * Secret. * - * @param {object} [options] Optional Parameters. + * @param {string} + * parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey.secretUrl + * The URL referencing a secret in a Key Vault. * - * @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. - */ - listSkusWithHttpOperationResponse(location: string, publisherName: string, offer: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Gets a list of virtual machine image SKUs for the specified location, - * publisher, and offer. + * @param {object} + * parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey.sourceVault + * The relative URL of the Key Vault containing the secret. * - * @param {string} location The name of a supported Azure region. + * @param {object} + * [parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey] + * Specifies the location of the key encryption key in Key Vault. * - * @param {string} publisherName A valid image publisher. + * @param {string} + * parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey.keyUrl + * The URL referencing a key encryption key in Key Vault. * - * @param {string} offer A valid image publisher offer. + * @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 {Array} - 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 {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 name of the disk in a virtual machine image.

This + * value cannot be larger than 1023 GB * - * {Array} [result] - The deserialized result object if an error did not occur. + * @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. Possible values are: + * Standard_LRS or Premium_LRS. Possible values include: 'Standard_LRS', + * 'Premium_LRS' * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - listSkus(location: string, publisherName: string, offer: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listSkus(location: string, publisherName: string, offer: string, callback: ServiceCallback): void; - listSkus(location: string, publisherName: string, offer: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * UsageOperations - * __NOTE__: An instance of this class is automatically created for an - * instance of the ComputeManagementClient. - */ -export interface UsageOperations { - - - /** - * Gets, for the specified location, the current compute resource usage - * information as well as the limits for compute resources under the - * subscription. + * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource + * Id * - * @param {string} location The location for which resource usage is queried. + * @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.osProfile] Specifies the operating system + * settings for the virtual machine. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @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). * - * @returns {Promise} A promise is returned + * @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) * - * @resolve {HttpOperationResponse} - The deserialized result 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) * - * @reject {Error|ServiceError} - The error object. - */ - listWithHttpOperationResponse(location: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Gets, for the specified location, the current compute resource usage - * information as well as the limits for compute resources under the - * subscription. + * @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} location The location for which resource usage is queried. + * @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. * - * @param {ServiceCallback} [optionalCallback] - The optional callback. + * @param {string} [parameters.osProfile.windowsConfiguration.timeZone] + * Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time" * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. + * @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. * - * {Promise} A promise is returned. + * @param {object} [parameters.osProfile.windowsConfiguration.winRM] Specifies + * the Windows Remote Management listeners. This enables remote Windows + * PowerShell. * - * @resolve {ListUsagesResult} - The deserialized result object. + * @param {array} [parameters.osProfile.windowsConfiguration.winRM.listeners] + * The list of Windows Remote Management listeners * - * @reject {Error|ServiceError} - The error 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). * - * {ServiceCallback} optionalCallback(err, result, request, response) + * @param {boolean} + * [parameters.osProfile.linuxConfiguration.disablePasswordAuthentication] + * Specifies whether password authentication should be disabled. * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * @param {object} [parameters.osProfile.linuxConfiguration.ssh] Specifies the + * ssh key configuration for a Linux OS. * - * {ListUsagesResult} [result] - The deserialized result object if an error did not occur. - * See {@link ListUsagesResult} for more information. + * @param {array} [parameters.osProfile.linuxConfiguration.ssh.publicKeys] The + * list of SSH public keys used to authenticate with linux based VMs. * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @param {array} [parameters.osProfile.secrets] Specifies set of certificates + * that should be installed onto the virtual machine. * - * {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; - - - /** - * Gets, for the specified location, the current compute resource usage - * information as well as the limits for compute resources under the - * subscription. + * @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.

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

    For both + * Windows and Linux virtual machines, Azure also enables you to see a + * screenshot of the VM from the hypervisor. * - * @returns {Promise} A promise is returned + * @param {boolean} [parameters.diagnosticsProfile.bootDiagnostics.enabled] + * Whether boot diagnostics should be enabled on the Virtual Machine. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {string} [parameters.diagnosticsProfile.bootDiagnostics.storageUri] + * Uri of the storage account to use for placing the console output and + * screenshot. * - * @reject {Error|ServiceError} - The error object. - */ - listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Gets, for the specified location, the current compute resource usage - * information as well as the limits for compute resources under the - * subscription. - * - * @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 {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. + * @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 {ListUsagesResult} - 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' * - * {ListUsagesResult} [result] - The deserialized result object if an error did not occur. - * See {@link ListUsagesResult} for more information. + * @param {array} [parameters.identity.identityIds] The list of user identities + * associated with the Virtual Machine. The user identity references will be + * ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. * - * {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. - */ - 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 - * VirtualMachineSizes - * __NOTE__: An instance of this class is automatically created for an - * instance of the ComputeManagementClient. - */ -export interface VirtualMachineSizes { - - - /** - * Lists all available virtual machine sizes for a subscription in a location. + * @param {string} parameters.location Resource location * - * @param {string} location The location upon which virtual-machine-sizes is - * queried. + * @param {object} [parameters.tags] Resource tags * * @param {object} [options] Optional Parameters. * @@ -1778,182 +2094,185 @@ 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>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, vmName: string, parameters: models.VirtualMachine, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Lists all available virtual machine sizes for a subscription in a location. - * - * @param {string} location The location upon which virtual-machine-sizes is - * queried. + * The operation to create or update a virtual machine. * - * @param {object} [options] Optional Parameters. + * @param {string} resourceGroupName The name of the resource group. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {string} vmName The name of the virtual machine. * - * @param {ServiceCallback} [optionalCallback] - The optional callback. + * @param {object} parameters Parameters supplied to the Create Virtual Machine + * operation. * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. + * @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**. * - * {Promise} A promise is returned. + * @param {string} [parameters.plan.name] The plan ID. * - * @resolve {VirtualMachineSizeListResult} - The deserialized result object. + * @param {string} [parameters.plan.publisher] The publisher ID. * - * @reject {Error|ServiceError} - The error 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. * - * {ServiceCallback} optionalCallback(err, result, request, response) + * @param {string} [parameters.plan.promotionCode] The promotion code. * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * @param {object} [parameters.hardwareProfile] Specifies the hardware settings + * for the virtual machine. * - * {VirtualMachineSizeListResult} [result] - The deserialized result object if an error did not occur. - * See {@link VirtualMachineSizeListResult} for more - * information. + * @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' * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @param {object} [parameters.storageProfile] Specifies the storage settings + * for the virtual machine disks. * - * {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 {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 Create 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 {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.snapshot] The snapshot. + * @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.managedDisk] The - * managedDisk. + * @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.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. Possible values - * are: Standard_LRS or Premium_LRS. Possible values include: 'Standard_LRS', - * 'Premium_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. - */ - createOrUpdateWithHttpOperationResponse(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 {string} + * parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey.secretUrl + * The URL referencing a secret in a Key Vault. * - * @param {object} [parameters.sourceVirtualMachine] The source virtual machine - * from which Image is created. + * @param {object} + * parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey.sourceVault + * The relative URL of the Key Vault containing the secret. * - * @param {object} [parameters.storageProfile] Specifies the storage settings - * for the virtual machine disks. + * @param {object} + * [parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey] + * Specifies the location of the key encryption key in 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 {string} + * parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey.keyUrl + * The URL referencing a key encryption key in Key Vault. * - * @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.sourceVault + * The relative URL of the Key Vault containing the key. * - * @param {string} parameters.storageProfile.osDisk.osState The OS State. - * Possible values include: 'Generalized', 'Specialized' + * @param {boolean} + * [parameters.storageProfile.osDisk.encryptionSettings.enabled] Specifies + * whether disk encryption should be enabled on the virtual machine. * - * @param {object} [parameters.storageProfile.osDisk.snapshot] The snapshot. + * @param {string} [parameters.storageProfile.osDisk.name] The disk name. * - * @param {object} [parameters.storageProfile.osDisk.managedDisk] The - * managedDisk. + * @param {object} [parameters.storageProfile.osDisk.vhd] The virtual hard + * disk. * - * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource - * Id + * @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.blobUri] The Virtual Hard - * Disk. + * @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** @@ -1961,208 +2280,208 @@ 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 {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 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. Possible values - * are: Standard_LRS or Premium_LRS. Possible values include: 'Standard_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. Possible values are: + * Standard_LRS or Premium_LRS. Possible values include: 'Standard_LRS', * 'Premium_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.

    * 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.osProfile] Specifies the operating system + * settings for the virtual machine. * - * @param {string} parameters.location Resource location + * @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} [parameters.tags] Resource tags + * @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 {Image} - 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 * - * {Image} [result] - The deserialized result object if an error did not occur. - * See {@link Image} 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. - */ - 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; - - - /** - * Update an image. + * @param {object} [parameters.osProfile.linuxConfiguration.ssh] Specifies the + * ssh key configuration for a Linux OS. * - * @param {string} resourceGroupName The name of the resource group. + * @param {array} [parameters.osProfile.linuxConfiguration.ssh.publicKeys] The + * list of SSH public keys used to authenticate with linux based VMs. * - * @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 Update Image - * operation. + * @param {object} [parameters.networkProfile] Specifies the network interfaces + * of the virtual machine. * - * @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. Possible values - * are: Standard_LRS or Premium_LRS. Possible values include: 'Standard_LRS', - * 'Premium_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 - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @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} 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 {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.

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

    For both + * Windows and Linux virtual machines, Azure also enables you to see a + * screenshot of the VM from the hypervisor. * - * @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. Possible values - * are: Standard_LRS or Premium_LRS. Possible values include: 'Standard_LRS', - * 'Premium_LRS' + * @param {array} [parameters.identity.identityIds] The list of user identities + * associated with the Virtual Machine. The user identity references will be + * ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. * - * @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 * @@ -2178,7 +2497,7 @@ export interface Images { * * {Promise} A promise is returned. * - * @resolve {Image} - The deserialized result object. + * @resolve {VirtualMachine} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -2186,165 +2505,796 @@ 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. + * {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. */ - 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; - + 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; - /** - * 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. - */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, imageName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Deletes an Image. + * The operation to 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 {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. + * @param {string} vmName The name of the virtual machine. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @param {object} parameters Parameters supplied to the Update Virtual Machine + * operation. * - * @reject {Error|ServiceError} - The error object. + * @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**. * - * {ServiceCallback} optionalCallback(err, result, request, response) + * @param {string} [parameters.plan.name] The plan ID. * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * @param {string} [parameters.plan.publisher] The publisher ID. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * @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. * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @param {string} [parameters.plan.promotionCode] The promotion code. * - * {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 {object} [parameters.hardwareProfile] Specifies the hardware settings + * for the virtual machine. * - * @param {string} resourceGroupName The name of the resource group. + * @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} [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 {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** + *

    **ReadOnly**

    **ReadWrite**

    Default: **None for + * 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 {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 name 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. Possible values are: + * Standard_LRS or Premium_LRS. Possible values include: 'Standard_LRS', + * 'Premium_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.

    + * 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.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 {string} [parameters.osProfile.windowsConfiguration.timeZone] + * Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time" + * + * @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.osProfile.windowsConfiguration.winRM] Specifies + * 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 {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 {array} [parameters.osProfile.secrets] Specifies set of certificates + * that should be installed onto 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.

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

    For both + * Windows and Linux virtual machines, Azure also enables you to see a + * screenshot of the VM from the hypervisor. + * + * @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 {array} [parameters.identity.identityIds] The list of user identities + * associated with the Virtual Machine. The user identity references will be + * ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + * + * @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 + * + * @returns {Promise} A promise is returned + * + * @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>; + + /** + * 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 Update Virtual Machine + * 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.plan.name] The plan ID. + * + * @param {string} [parameters.plan.publisher] The publisher ID. + * + * @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} [parameters.plan.promotionCode] The promotion code. + * + * @param {object} [parameters.hardwareProfile] Specifies the hardware settings + * for 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 {string} imageName The name of the image. + * @param {object} [parameters.storageProfile] Specifies the storage settings + * for the virtual machine disks. * - * @param {object} [options] Optional Parameters. + * @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} [options.expand] The expand expression to apply on the - * operation. + * @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. - */ - getWithHttpOperationResponse(resourceGroupName: string, imageName: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Gets 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} [options] Optional Parameters. + * @param {object} [parameters.storageProfile.osDisk.encryptionSettings] + * Specifies the encryption settings for the OS Disk.

    Minimum + * api-version: 2015-06-15 * - * @param {string} [options.expand] The expand expression to apply on the - * operation. + * @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 {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** + *

    **ReadOnly**

    **ReadWrite**

    Default: **None for + * 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 {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 name 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. Possible values are: + * Standard_LRS or Premium_LRS. Possible values include: 'Standard_LRS', + * 'Premium_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.

    + * 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.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 {string} [parameters.osProfile.windowsConfiguration.timeZone] + * Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time" + * + * @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.osProfile.windowsConfiguration.winRM] Specifies + * 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 {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.customHeaders] Headers that will be added to the - * request + * @param {boolean} + * [parameters.osProfile.linuxConfiguration.disablePasswordAuthentication] + * Specifies whether password authentication should be disabled. * - * @param {ServiceCallback} [optionalCallback] - The optional callback. + * @param {object} [parameters.osProfile.linuxConfiguration.ssh] Specifies the + * ssh key configuration for a Linux OS. * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. + * @param {array} [parameters.osProfile.linuxConfiguration.ssh.publicKeys] The + * list of SSH public keys used to authenticate with linux based VMs. * - * {Promise} A promise is returned. + * @param {array} [parameters.osProfile.secrets] Specifies set of certificates + * that should be installed onto the virtual machine. * - * @resolve {Image} - The deserialized result object. + * @param {object} [parameters.networkProfile] Specifies the network interfaces + * of the virtual machine. * - * @reject {Error|ServiceError} - The error object. + * @param {array} [parameters.networkProfile.networkInterfaces] Specifies the + * list of resource Ids for the network interfaces associated with the virtual + * machine. * - * {ServiceCallback} optionalCallback(err, result, request, response) + * @param {object} [parameters.diagnosticsProfile] Specifies the boot + * diagnostic settings state.

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

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

    For both + * Windows and Linux virtual machines, Azure also enables you to see a + * screenshot of the VM from the hypervisor. * - * {Image} [result] - The deserialized result object if an error did not occur. - * See {@link Image} for more information. + * @param {boolean} [parameters.diagnosticsProfile.bootDiagnostics.enabled] + * Whether boot diagnostics should be enabled on the Virtual Machine. * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @param {string} [parameters.diagnosticsProfile.bootDiagnostics.storageUri] + * Uri of the storage account to use for placing the console output and + * screenshot. * - * {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 {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} resourceGroupName The name of the resource group. + * @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 {array} [parameters.identity.identityIds] The list of user identities + * associated with the Virtual Machine. The user identity references will be + * ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. * - * @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 {array} [parameters.zones] The virtual machine zones. * - * @param {string} resourceGroupName The name of the resource group. + * @param {object} [parameters.tags] Resource tags * * @param {object} [options] Optional Parameters. * @@ -2358,7 +3308,7 @@ export interface Images { * * {Promise} A promise is returned. * - * @resolve {ImageListResult} - The deserialized result object. + * @resolve {VirtualMachine} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -2366,22 +3316,24 @@ export interface Images { * * {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. + * {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. */ - 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; + 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; /** - * 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. + * 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. * @@ -2390,16 +3342,18 @@ 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. */ - listWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, vmName: 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. + * 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. * @@ -2413,181 +3367,64 @@ export interface Images { * * {Promise} A promise is returned. * - * @resolve {ImageListResult} - The deserialized result object. + * @resolve {OperationStatusResponse} - 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. Possible values - * are: Standard_LRS or Premium_LRS. Possible values include: 'Standard_LRS', - * 'Premium_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' + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * @param {string} parameters.storageProfile.osDisk.osState The OS State. - * Possible values include: 'Generalized', 'Specialized' + * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. + * See {@link OperationStatusResponse} for more + * information. * - * @param {object} [parameters.storageProfile.osDisk.snapshot] The snapshot. + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * @param {object} [parameters.storageProfile.osDisk.managedDisk] The - * managedDisk. + * {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} [parameters.storageProfile.osDisk.managedDisk.id] Resource - * Id + * @param {string} resourceGroupName The name of the resource group. * - * @param {string} [parameters.storageProfile.osDisk.blobUri] The Virtual Hard - * Disk. + * @param {string} vmName The name of the virtual machine. * - * @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] Optional Parameters. * - * @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} [options.expand] The expand expression to apply on the + * operation. Possible values include: 'instanceView' * - * @param {string} [parameters.storageProfile.osDisk.storageAccountType] - * Specifies the storage account type for the managed disk. Possible values - * are: Standard_LRS or Premium_LRS. Possible values include: 'Standard_LRS', - * 'Premium_LRS' + * @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 {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). + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {string} parameters.location Resource location + * @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 {object} [parameters.tags] Resource tags + * @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 * @@ -2598,7 +3435,7 @@ export interface Images { * * {Promise} A promise is returned. * - * @resolve {Image} - The deserialized result object. + * @resolve {VirtualMachine} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -2606,85 +3443,85 @@ 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. + * {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. */ - 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; + 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; /** - * Update an image. + * Retrieves information about the run-time state of 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 - * operation. + * @param {object} [options] Optional Parameters. * - * @param {object} [parameters.sourceVirtualMachine] The source virtual machine - * from which Image is created. + * @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. + * @returns {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 {HttpOperationResponse} - 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 a custom image.

    Possible values are:

    **Windows** - *

    **Linux**. Possible values include: 'Windows', 'Linux' + * @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 {string} parameters.storageProfile.osDisk.osState The OS State. - * Possible values include: 'Generalized', 'Specialized' + * @param {string} resourceGroupName The name of the resource group. * - * @param {object} [parameters.storageProfile.osDisk.snapshot] The snapshot. + * @param {string} vmName The name of the virtual machine. * - * @param {object} [parameters.storageProfile.osDisk.managedDisk] The - * managedDisk. + * @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 {string} [parameters.storageProfile.osDisk.blobUri] The Virtual Hard - * Disk. + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @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' + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @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 + * {Promise} A promise is returned. * - * @param {string} [parameters.storageProfile.osDisk.storageAccountType] - * Specifies the storage account type for the managed disk. Possible values - * are: Standard_LRS or Premium_LRS. Possible values include: 'Standard_LRS', - * 'Premium_LRS' + * @resolve {VirtualMachineInstanceView} - 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 {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). + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @param {object} [parameters.tags] Resource tags + * {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. + * + * {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; + + + /** + * 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. * @@ -2693,79 +3530,81 @@ 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. */ - beginUpdateWithHttpOperationResponse(resourceGroupName: string, imageName: string, parameters: models.ImageUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + convertToManagedDisksWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Update an image. + * 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} imageName The name of the image. + * @param {string} vmName The name of the virtual machine. * - * @param {object} parameters Parameters supplied to the Update Image - * operation. + * @param {object} [options] Optional Parameters. * - * @param {object} [parameters.sourceVirtualMachine] The source virtual machine - * from which Image is created. + * @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.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). + * @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.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' + * {Promise} A promise is returned. * - * @param {string} parameters.storageProfile.osDisk.osState The OS State. - * Possible values include: 'Generalized', 'Specialized' + * @resolve {OperationStatusResponse} - The deserialized result object. * - * @param {object} [parameters.storageProfile.osDisk.snapshot] The snapshot. + * @reject {Error|ServiceError} - The error object. * - * @param {object} [parameters.storageProfile.osDisk.managedDisk] The - * managedDisk. + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource - * Id + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * @param {string} [parameters.storageProfile.osDisk.blobUri] The Virtual Hard - * Disk. + * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. + * See {@link OperationStatusResponse} for more + * information. * - * @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' + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * @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 + * {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 {string} [parameters.storageProfile.osDisk.storageAccountType] - * Specifies the storage account type for the managed disk. Possible values - * are: Standard_LRS or Premium_LRS. Possible values include: 'Standard_LRS', - * 'Premium_LRS' + * @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 {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. + */ + 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 {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 {object} [parameters.tags] Resource tags + * @param {string} vmName The name of the virtual machine. * * @param {object} [options] Optional Parameters. * @@ -2779,7 +3618,7 @@ export interface Images { * * {Promise} A promise is returned. * - * @resolve {Image} - The deserialized result object. + * @resolve {OperationStatusResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -2787,24 +3626,25 @@ 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. + * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. + * See {@link OperationStatusResponse} 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; + 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; /** - * Deletes an Image. + * Sets the state of the virtual machine to generalized. * * @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} [options] Optional Parameters. * @@ -2817,14 +3657,14 @@ export interface Images { * * @reject {Error|ServiceError} - The error object. */ - beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, imageName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + generalizeWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Deletes an Image. + * Sets the state of the virtual machine to generalized. * * @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} [options] Optional Parameters. * @@ -2854,16 +3694,16 @@ export interface Images { * * {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; + 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; /** - * Gets the list of images under a resource group. + * 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} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the resource group. * * @param {object} [options] Optional Parameters. * @@ -2872,17 +3712,17 @@ 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. */ - listByResourceGroupNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listWithHttpOperationResponse(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets the list of images under a resource group. + * 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} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the resource group. * * @param {object} [options] Optional Parameters. * @@ -2896,7 +3736,7 @@ export interface Images { * * {Promise} A promise is returned. * - * @resolve {ImageListResult} - The deserialized result object. + * @resolve {VirtualMachineListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -2904,25 +3744,22 @@ export interface Images { * * {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. + * {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. */ - 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; + 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; /** - * 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. + * 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} [options] Optional Parameters. * @@ -2931,19 +3768,15 @@ 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. */ - listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listAllWithHttpOperationResponse(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} nextPageLink The NextLink from the previous successful call - * to List operation. + * 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} [options] Optional Parameters. * @@ -2957,7 +3790,7 @@ export interface Images { * * {Promise} A promise is returned. * - * @resolve {ImageListResult} - The deserialized result object. + * @resolve {VirtualMachineListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -2965,47 +3798,27 @@ export interface Images { * * {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. + * {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. */ - 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 { + listAll(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listAll(callback: ServiceCallback): void; + listAll(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. + * 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} 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 @@ -3013,32 +3826,20 @@ 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. */ - captureWithHttpOperationResponse(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineCaptureParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listAvailableSizesWithHttpOperationResponse(resourceGroupName: string, vmName: string, 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. + * 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} 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 @@ -3051,7 +3852,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {VirtualMachineCaptureResult} - The deserialized result object. + * @resolve {VirtualMachineSizeListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -3059,403 +3860,209 @@ 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 + * {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. - */ - 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; - - - /** - * 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} parameters Parameters supplied to the Create Virtual Machine - * 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.plan.name] The plan ID. - * - * @param {string} [parameters.plan.publisher] The publisher ID. - * - * @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} [parameters.plan.promotionCode] The promotion code. - * - * @param {object} [parameters.hardwareProfile] Specifies the hardware settings - * for 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} [parameters.storageProfile] Specifies the storage settings - * for the virtual machine disks. + * {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 {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. + * @returns {Promise} A promise is returned * - * @param {string} [parameters.storageProfile.imageReference.id] Resource Id + * @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. + */ + 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 {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} resourceGroupName The name of the resource group. * - * @param {object} [parameters.storageProfile.osDisk.encryptionSettings] - * Specifies the encryption settings for the OS Disk.

    Minimum - * api-version: 2015-06-15 + * @param {string} vmName The name of the virtual machine. * - * @param {object} - * [parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey] - * Specifies the location of the disk encryption key, which is a Key Vault - * Secret. + * @param {object} [options] Optional Parameters. * - * @param {string} - * parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey.secretUrl - * The URL referencing a secret in a Key Vault. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {object} - * parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey.sourceVault - * The relative URL of the Key Vault containing the secret. + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @param {object} - * [parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey] - * Specifies the location of the key encryption key in Key Vault. + * @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.encryptionSettings.keyEncryptionKey.keyUrl - * The URL referencing a key encryption key in Key Vault. + * {Promise} A promise is returned. * - * @param {object} - * parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey.sourceVault - * The relative URL of the Key Vault containing the key. + * @resolve {OperationStatusResponse} - The deserialized result object. * - * @param {boolean} - * [parameters.storageProfile.osDisk.encryptionSettings.enabled] Specifies - * whether disk encryption should be enabled on the virtual machine. + * @reject {Error|ServiceError} - The error object. * - * @param {string} [parameters.storageProfile.osDisk.name] The disk name. + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @param {object} [parameters.storageProfile.osDisk.vhd] The virtual hard - * disk. + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * @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. + * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. + * See {@link OperationStatusResponse} for more + * information. * - * @param {string} [parameters.storageProfile.osDisk.image.uri] Specifies the - * virtual hard disk's uri. + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * @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' + * {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 {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 {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} vmName The name of the virtual machine. * - * @param {number} [parameters.storageProfile.osDisk.diskSizeGB] Specifies the - * size of an empty data disk in gigabytes. This element can be used to - * overwrite the name of the disk in a virtual machine image.

    This - * value cannot be larger than 1023 GB + * @param {object} [options] Optional Parameters. * - * @param {object} [parameters.storageProfile.osDisk.managedDisk] The managed - * disk parameters. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} - * [parameters.storageProfile.osDisk.managedDisk.storageAccountType] Specifies - * the storage account type for the managed disk. Possible values are: - * Standard_LRS or Premium_LRS. Possible values include: 'Standard_LRS', - * 'Premium_LRS' + * @returns {Promise} A promise is returned * - * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource - * Id + * @resolve {HttpOperationResponse} - 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. + */ + restartWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * The operation to restart a virtual machine. * - * @param {object} [parameters.osProfile] Specifies the operating system - * settings for the virtual machine. + * @param {string} resourceGroupName The name of the resource group. * - * @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} vmName The name of the virtual machine. * - * @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 {OperationStatusResponse} - 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) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. + * See {@link OperationStatusResponse} 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. + */ + 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 {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 {array} [parameters.osProfile.secrets] Specifies set of certificates - * that should be installed onto the virtual machine. + * @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.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} [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.

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

    For both - * Windows and Linux virtual machines, Azure also enables you to see a - * screenshot of the VM from the hypervisor. + * @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 {ServiceCallback} [optionalCallback] - The optional callback. * - * @param {string} [parameters.diagnosticsProfile.bootDiagnostics.storageUri] - * Uri of the storage account to use for placing the console output and - * screenshot. + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @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. + * {Promise} A promise is returned. * - * @param {string} [parameters.availabilitySet.id] Resource Id + * @resolve {OperationStatusResponse} - The deserialized result 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 + * @reject {Error|ServiceError} - The error object. * - * @param {object} [parameters.identity] The identity of the virtual machine, - * if configured. + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @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' + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * @param {array} [parameters.identity.identityIds] The list of user identities - * associated with the Virtual Machine. The user identity references will be - * ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. + * See {@link OperationStatusResponse} for more + * information. * - * @param {array} [parameters.zones] The virtual machine zones. + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * @param {string} parameters.location Resource location + * {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 {object} [parameters.tags] Resource tags + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} vmName The name of the virtual machine. * * @param {object} [options] Optional Parameters. * @@ -3464,396 +4071,243 @@ 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. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, vmName: string, parameters: models.VirtualMachine, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + redeployWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * The operation to create or update a virtual machine. + * The operation to redeploy 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 - * 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 {OperationStatusResponse} - 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. + * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. + * See {@link OperationStatusResponse} for more + * information. * - * @param {string} [parameters.storageProfile.imageReference.publisher] The - * image publisher. + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * @param {string} [parameters.storageProfile.imageReference.offer] Specifies - * the offer of the platform image or marketplace image used to create the - * virtual machine. + * {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; + + + /** + * 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. + * + * @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. + */ + performMaintenanceWithHttpOperationResponse(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 {string} [parameters.storageProfile.imageReference.sku] The image - * SKU. + * @param {object} [options] Optional Parameters. * - * @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} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} [parameters.storageProfile.imageReference.id] Resource Id + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @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). + * @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.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' + * {Promise} A promise is returned. * - * @param {object} [parameters.storageProfile.osDisk.encryptionSettings] - * Specifies the encryption settings for the OS Disk.

    Minimum - * api-version: 2015-06-15 + * @resolve {OperationStatusResponse} - The deserialized result object. * - * @param {object} - * [parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey] - * Specifies the location of the disk encryption key, which is a Key Vault - * Secret. + * @reject {Error|ServiceError} - The error object. * - * @param {string} - * parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey.secretUrl - * The URL referencing a secret in a Key Vault. + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @param {object} - * parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey.sourceVault - * The relative URL of the Key Vault containing the secret. + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * @param {object} - * [parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey] - * Specifies the location of the key encryption key in Key Vault. + * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. + * See {@link OperationStatusResponse} for more + * information. * - * @param {string} - * parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey.keyUrl - * The URL referencing a key encryption key in Key Vault. + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * @param {object} - * parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey.sourceVault - * The relative URL of the Key Vault containing the key. + * {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 {boolean} - * [parameters.storageProfile.osDisk.encryptionSettings.enabled] Specifies - * whether disk encryption should be enabled on the virtual machine. + * @param {string} resourceGroupName The name of the resource group. * - * @param {string} [parameters.storageProfile.osDisk.name] The disk name. + * @param {string} vmName The name of the virtual machine. * - * @param {object} [parameters.storageProfile.osDisk.vhd] The virtual hard - * disk. + * @param {object} parameters Parameters supplied to the Run command operation. * - * @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.commandId The run command id. * - * @param {string} [parameters.storageProfile.osDisk.image.uri] Specifies the - * virtual hard disk's uri. + * @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.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 {array} [parameters.parameters] The run command parameters. * - * @param {boolean} [parameters.storageProfile.osDisk.writeAcceleratorEnabled] - * Specifies whether writeAccelerator should be enabled or disabled on the - * disk. + * @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 name of the disk in a virtual machine image.

    This - * value cannot be larger than 1023 GB + * @returns {Promise} A promise is returned * - * @param {object} [parameters.storageProfile.osDisk.managedDisk] The managed - * disk parameters. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {string} - * [parameters.storageProfile.osDisk.managedDisk.storageAccountType] Specifies - * the storage account type for the managed disk. Possible values are: - * Standard_LRS or Premium_LRS. Possible values include: 'Standard_LRS', - * 'Premium_LRS' + * @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.managedDisk.id] Resource - * Id + * @param {string} resourceGroupName The name of the resource group. * - * @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} vmName The name of the virtual machine. * - * @param {object} [parameters.osProfile] Specifies the operating system - * settings for the virtual machine. + * @param {object} parameters Parameters supplied to the Run command 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} parameters.commandId The run command id. * - * @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 {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.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 {array} [parameters.parameters] The run command 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] Optional Parameters. * - * @param {object} [parameters.osProfile.windowsConfiguration] Specifies - * Windows operating system settings on the virtual machine. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @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 {ServiceCallback} [optionalCallback] - The optional callback. * - * @param {boolean} - * [parameters.osProfile.windowsConfiguration.enableAutomaticUpdates] Indicates - * whether virtual machine is enabled for automatic updates. + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @param {string} [parameters.osProfile.windowsConfiguration.timeZone] - * Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time" + * {Promise} A promise is returned. * - * @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. + * @resolve {RunCommandResult} - The deserialized result object. * - * @param {object} [parameters.osProfile.windowsConfiguration.winRM] Specifies - * the Windows Remote Management listeners. This enables remote Windows - * PowerShell. + * @reject {Error|ServiceError} - The error object. * - * @param {array} [parameters.osProfile.windowsConfiguration.winRM.listeners] - * The list of Windows Remote Management listeners + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @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). + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * @param {boolean} - * [parameters.osProfile.linuxConfiguration.disablePasswordAuthentication] - * Specifies whether password authentication should be disabled. + * {RunCommandResult} [result] - The deserialized result object if an error did not occur. + * See {@link RunCommandResult} for more information. * - * @param {object} [parameters.osProfile.linuxConfiguration.ssh] Specifies the - * ssh key configuration for a Linux OS. + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * @param {array} [parameters.osProfile.linuxConfiguration.ssh.publicKeys] The - * list of SSH public keys used to authenticate with linux based VMs. + * {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 {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 {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} parameters Parameters supplied to the Capture Virtual + * Machine operation. + * + * @param {string} parameters.vhdPrefix The captured virtual hard disk's name + * prefix. * - * @param {object} [parameters.diagnosticsProfile] Specifies the boot - * diagnostic settings state.

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

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

    For both - * Windows and Linux virtual machines, Azure also enables you to see a - * screenshot of the VM from the hypervisor. + * @param {boolean} parameters.overwriteVhds Specifies whether to overwrite the + * destination virtual hard disk, in case of conflict. * - * @param {boolean} [parameters.diagnosticsProfile.bootDiagnostics.enabled] - * Whether boot diagnostics should be enabled on the Virtual Machine. + * @param {object} [options] Optional Parameters. * - * @param {string} [parameters.diagnosticsProfile.bootDiagnostics.storageUri] - * Uri of the storage account to use for placing the console output and - * screenshot. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @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. + * @returns {Promise} A promise is returned * - * @param {string} [parameters.availabilitySet.id] Resource Id + * @resolve {HttpOperationResponse} - The deserialized result 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 + * @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.identity] The identity of the virtual machine, - * if configured. + * @param {string} resourceGroupName The name of the resource group. * - * @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} vmName The name of the virtual machine. * - * @param {array} [parameters.identity.identityIds] The list of user identities - * associated with the Virtual Machine. The user identity references will be - * ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + * @param {object} parameters Parameters supplied to the Capture Virtual + * Machine operation. * - * @param {array} [parameters.zones] The virtual machine zones. + * @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. * @@ -3867,7 +4321,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {VirtualMachine} - The deserialized result object. + * @resolve {VirtualMachineCaptureResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -3875,26 +4329,27 @@ 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. + * {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, 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; + 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; /** - * The operation to update a virtual machine. + * 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} parameters Parameters supplied to the Update Virtual Machine + * @param {object} parameters Parameters supplied to the Create Virtual Machine * operation. * * @param {object} [parameters.plan] Specifies information about the @@ -4268,6 +4723,8 @@ 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. @@ -4281,16 +4738,16 @@ export interface VirtualMachines { * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, vmName: string, parameters: models.VirtualMachine, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * The operation to update a virtual machine. + * 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} parameters Parameters supplied to the Update Virtual Machine + * @param {object} parameters Parameters supplied to the Create Virtual Machine * operation. * * @param {object} [parameters.plan] Specifies information about the @@ -4664,6 +5121,8 @@ 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. @@ -4693,267 +5152,393 @@ export interface VirtualMachines { * * {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; - + 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 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. - */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * The operation to delete 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} [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 {OperationStatusResponse} - 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. - * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} 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. - */ - 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 {object} parameters Parameters supplied to the Update Virtual Machine + * operation. * - * @param {string} vmName The name of the virtual machine. + * @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] Optional Parameters. + * @param {string} [parameters.plan.name] The plan ID. * - * @param {string} [options.expand] The expand expression to apply on the - * operation. Possible values include: 'instanceView' + * @param {string} [parameters.plan.publisher] The publisher ID. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @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. * - * @returns {Promise} A promise is returned + * @param {string} [parameters.plan.promotionCode] The promotion code. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {object} [parameters.hardwareProfile] Specifies the hardware settings + * for the virtual machine. * - * @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} [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 {string} resourceGroupName The name of the resource group. + * @param {object} [parameters.storageProfile] Specifies the storage settings + * for the virtual machine disks. * - * @param {string} vmName The name of the 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 {object} [options] Optional Parameters. + * @param {string} [parameters.storageProfile.imageReference.publisher] The + * image publisher. * - * @param {string} [options.expand] The expand expression to apply on the - * operation. Possible values include: 'instanceView' + * @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 {VirtualMachine} - 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. * - * {VirtualMachine} [result] - The deserialized result object if an error did not occur. - * See {@link VirtualMachine} 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. - */ - 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.osDisk.encryptionSettings.keyEncryptionKey.keyUrl + * The URL referencing a key encryption key in Key Vault. * - * @param {string} resourceGroupName The name of the resource group. + * @param {object} + * parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey.sourceVault + * The relative URL of the Key Vault containing the key. * - * @param {string} vmName The name of the virtual machine. + * @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. - */ - instanceViewWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Retrieves information about the run-time state of a virtual machine. + * @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 {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] Optional Parameters. + * @param {number} [parameters.storageProfile.osDisk.diskSizeGB] Specifies the + * size of an empty data disk in gigabytes. This element can be used to + * overwrite the name of the disk in a virtual machine image.

    This + * value cannot be larger than 1023 GB * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {object} [parameters.storageProfile.osDisk.managedDisk] The managed + * disk parameters. * - * @param {ServiceCallback} [optionalCallback] - The optional callback. + * @param {string} + * [parameters.storageProfile.osDisk.managedDisk.storageAccountType] Specifies + * the storage account type for the managed disk. Possible values are: + * Standard_LRS or Premium_LRS. Possible values include: 'Standard_LRS', + * 'Premium_LRS' * - * @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.id] Resource + * Id * - * {Promise} A promise is returned. + * @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). * - * @resolve {VirtualMachineInstanceView} - 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) * - * {VirtualMachineInstanceView} [result] - The deserialized result object if an error did not occur. - * See {@link VirtualMachineInstanceView} for more - * information. + * @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. - */ - 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 {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. - */ - 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 {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 {array} [parameters.osProfile.secrets] Specifies set of certificates + * that should be installed onto 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.

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

    For both + * Windows and Linux virtual machines, Azure also enables you to see a + * screenshot of the VM from the hypervisor. * - * @resolve {OperationStatusResponse} - 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 * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * @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. - */ - 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 {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 {array} [parameters.identity.identityIds] The list of user identities + * associated with the Virtual Machine. The user identity references will be + * ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. * - * @param {string} vmName The name of the virtual machine. + * @param {array} [parameters.zones] The virtual machine zones. + * + * @param {object} [parameters.tags] Resource tags * * @param {object} [options] Optional Parameters. * @@ -4962,253 +5547,394 @@ 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>; + beginUpdateWithHttpOperationResponse(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineUpdate, 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. + * 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} [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 {OperationStatusResponse} - 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. - * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} 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; - - - /** - * Sets the state of the virtual machine to generalized. - * - * @param {string} resourceGroupName The name of the resource group. + * @param {object} parameters Parameters supplied to the Update Virtual Machine + * operation. * - * @param {string} vmName The name of the virtual machine. + * @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] Optional Parameters. + * @param {string} [parameters.plan.name] The plan ID. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {string} [parameters.plan.publisher] The publisher ID. * - * @returns {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 {HttpOperationResponse} - The deserialized result object. + * @param {string} [parameters.plan.promotionCode] The promotion code. * - * @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 {object} [parameters.hardwareProfile] Specifies the hardware settings + * for the virtual machine. * - * @param {string} resourceGroupName The name of the resource group. + * @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 {string} vmName The name of the virtual machine. + * @param {object} [parameters.storageProfile] Specifies the storage settings + * for the virtual machine disks. * - * @param {object} [options] Optional Parameters. + * @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.customHeaders] Headers that will be added to the - * request + * @param {string} [parameters.storageProfile.imageReference.publisher] The + * image publisher. * - * @param {ServiceCallback} [optionalCallback] - The optional callback. + * @param {string} [parameters.storageProfile.imageReference.offer] Specifies + * the offer of the platform image or marketplace image used to create 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.storageProfile.imageReference.sku] The image + * SKU. * - * {Promise} A promise is returned. + * @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. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @param {string} [parameters.storageProfile.imageReference.id] Resource Id * - * @reject {Error|ServiceError} - The error 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). * - * {ServiceCallback} optionalCallback(err, result, request, response) + * @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' * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * @param {object} [parameters.storageProfile.osDisk.encryptionSettings] + * Specifies the encryption settings for the OS Disk.

    Minimum + * api-version: 2015-06-15 * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * @param {object} + * [parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey] + * Specifies the location of the disk encryption key, which is a Key Vault + * Secret. * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @param {string} + * parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey.secretUrl + * The URL referencing a secret in a Key Vault. * - * {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 {object} + * parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey.sourceVault + * The relative URL of the Key Vault containing the secret. * - * @param {string} resourceGroupName The name of the resource group. + * @param {object} + * [parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey] + * Specifies the location of the key encryption key in Key Vault. * - * @param {object} [options] Optional Parameters. + * @param {string} + * parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey.keyUrl + * The URL referencing a key encryption key in Key Vault. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {object} + * parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey.sourceVault + * The relative URL of the Key Vault containing the key. * - * @returns {Promise} A promise is returned + * @param {boolean} + * [parameters.storageProfile.osDisk.encryptionSettings.enabled] Specifies + * whether disk encryption should be enabled on the virtual machine. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {string} [parameters.storageProfile.osDisk.name] The disk name. * - * @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.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 {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 {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' * - * {Promise} A promise is returned. + * @param {number} [parameters.storageProfile.osDisk.diskSizeGB] Specifies the + * size of an empty data disk in gigabytes. This element can be used to + * overwrite the name of the disk in a virtual machine image.

    This + * value cannot be larger than 1023 GB * - * @resolve {VirtualMachineListResult} - The deserialized result object. + * @param {object} [parameters.storageProfile.osDisk.managedDisk] The managed + * disk parameters. * - * @reject {Error|ServiceError} - The error object. + * @param {string} + * [parameters.storageProfile.osDisk.managedDisk.storageAccountType] Specifies + * the storage account type for the managed disk. Possible values are: + * Standard_LRS or Premium_LRS. Possible values include: 'Standard_LRS', + * 'Premium_LRS' * - * {ServiceCallback} optionalCallback(err, result, request, response) + * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource + * Id * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * @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). * - * {VirtualMachineListResult} [result] - The deserialized result object if an error did not occur. - * See {@link VirtualMachineListResult} for more - * information. + * @param {object} [parameters.osProfile] Specifies the operating system + * settings for the virtual machine. * - * {WebResource} [request] - The HTTP Request 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). * - * {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.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) * - * @returns {Promise} A promise is returned + * @param {object} [parameters.osProfile.windowsConfiguration] Specifies + * Windows operating system settings on the virtual machine. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @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. * - * @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 {boolean} + * [parameters.osProfile.windowsConfiguration.enableAutomaticUpdates] Indicates + * whether virtual machine is enabled for automatic updates. * - * @param {object} [options] Optional Parameters. + * @param {string} [parameters.osProfile.windowsConfiguration.timeZone] + * Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time" * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @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 {ServiceCallback} [optionalCallback] - The optional callback. + * @param {object} [parameters.osProfile.windowsConfiguration.winRM] Specifies + * the Windows Remote Management listeners. This enables remote Windows + * PowerShell. * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. + * @param {array} [parameters.osProfile.windowsConfiguration.winRM.listeners] + * The list of Windows Remote Management listeners * - * {Promise} A promise is returned. + * @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). * - * @resolve {VirtualMachineListResult} - The deserialized result object. + * @param {boolean} + * [parameters.osProfile.linuxConfiguration.disablePasswordAuthentication] + * Specifies whether password authentication should be disabled. * - * @reject {Error|ServiceError} - The error object. + * @param {object} [parameters.osProfile.linuxConfiguration.ssh] Specifies the + * ssh key configuration for a Linux OS. * - * {ServiceCallback} optionalCallback(err, result, request, response) + * @param {array} [parameters.osProfile.linuxConfiguration.ssh.publicKeys] The + * list of SSH public keys used to authenticate with linux based VMs. * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * @param {array} [parameters.osProfile.secrets] Specifies set of certificates + * that should be installed onto the virtual machine. * - * {VirtualMachineListResult} [result] - The deserialized result object if an error did not occur. - * See {@link VirtualMachineListResult} for more - * information. + * @param {object} [parameters.networkProfile] Specifies the network interfaces + * of the virtual machine. * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @param {array} [parameters.networkProfile.networkInterfaces] Specifies the + * list of resource Ids for the network interfaces associated with the virtual + * machine. * - * {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.diagnosticsProfile] Specifies the boot + * diagnostic settings state.

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

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

    For both + * Windows and Linux virtual machines, Azure also enables you to see a + * screenshot of the VM from the hypervisor. * - * @param {string} vmName The name of the virtual machine. + * @param {boolean} [parameters.diagnosticsProfile.bootDiagnostics.enabled] + * Whether boot diagnostics should be enabled on the Virtual Machine. * - * @param {object} [options] Optional Parameters. + * @param {string} [parameters.diagnosticsProfile.bootDiagnostics.storageUri] + * Uri of the storage account to use for placing the console output and + * screenshot. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @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. * - * @returns {Promise} A promise is returned + * @param {string} [parameters.availabilitySet.id] Resource Id * - * @resolve {HttpOperationResponse} - The deserialized result 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 * - * @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 {object} [parameters.identity] The identity of the virtual machine, + * if configured. * - * @param {string} resourceGroupName The name of the resource group. + * @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} vmName The name of the virtual machine. + * @param {array} [parameters.identity.identityIds] The list of user identities + * associated with the Virtual Machine. The user identity references will be + * ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + * + * @param {array} [parameters.zones] The virtual machine zones. + * + * @param {object} [parameters.tags] Resource tags * * @param {object} [options] Optional Parameters. * @@ -5222,7 +5948,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {VirtualMachineSizeListResult} - The deserialized result object. + * @resolve {VirtualMachine} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -5230,23 +5956,20 @@ export interface VirtualMachines { * * {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. + * {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. */ - 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; + 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 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. + * The operation to delete a virtual machine. * * @param {string} resourceGroupName The name of the resource group. * @@ -5263,12 +5986,10 @@ export interface VirtualMachines { * * @reject {Error|ServiceError} - The error object. */ - powerOffWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDeleteMethodWithHttpOperationResponse(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. + * The operation to delete a virtual machine. * * @param {string} resourceGroupName The name of the resource group. * @@ -5302,13 +6023,14 @@ export interface VirtualMachines { * * {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; + 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; /** - * The operation to restart a virtual machine. + * 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. * @@ -5325,10 +6047,11 @@ export interface VirtualMachines { * * @reject {Error|ServiceError} - The error object. */ - restartWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginConvertToManagedDisksWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * The operation to restart a virtual machine. + * 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. * @@ -5362,13 +6085,14 @@ export interface VirtualMachines { * * {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; + 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; /** - * The operation to start a virtual machine. + * 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. * @@ -5385,10 +6109,11 @@ export interface VirtualMachines { * * @reject {Error|ServiceError} - The error object. */ - startWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDeallocateWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * The operation to start a virtual machine. + * 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. * @@ -5422,13 +6147,15 @@ export interface VirtualMachines { * * {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; + 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 redeploy 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. * @@ -5445,10 +6172,12 @@ export interface VirtualMachines { * * @reject {Error|ServiceError} - The error object. */ - redeployWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginPowerOffWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * The operation to redeploy 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. * @@ -5482,13 +6211,13 @@ export interface VirtualMachines { * * {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; + 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 perform maintenance on a virtual machine. + * The operation to restart a virtual machine. * * @param {string} resourceGroupName The name of the resource group. * @@ -5505,10 +6234,10 @@ export interface VirtualMachines { * * @reject {Error|ServiceError} - The error object. */ - performMaintenanceWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginRestartWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * The operation to perform maintenance on a virtual machine. + * The operation to restart a virtual machine. * * @param {string} resourceGroupName The name of the resource group. * @@ -5542,28 +6271,18 @@ export interface VirtualMachines { * * {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; + 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; /** - * Run command on the VM. + * 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. * - * @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 @@ -5571,29 +6290,19 @@ 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. */ - runCommandWithHttpOperationResponse(resourceGroupName: string, vmName: string, parameters: models.RunCommandInput, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginStartWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Run command on the VM. + * 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. * - * @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 @@ -5606,7 +6315,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {RunCommandResult} - The deserialized result object. + * @resolve {OperationStatusResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -5614,38 +6323,26 @@ 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. + * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. + * See {@link OperationStatusResponse} 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. */ - 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; + 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; /** - * Captures the VM by copying virtual hard disks of the VM and outputs a - * template that can be used to create similar VMs. + * The operation to redeploy 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 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 @@ -5653,32 +6350,19 @@ 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. */ - beginCaptureWithHttpOperationResponse(resourceGroupName: string, vmName: string, parameters: models.VirtualMachineCaptureParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginRedeployWithHttpOperationResponse(resourceGroupName: string, vmName: string, 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. + * The operation to redeploy 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 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 @@ -5691,7 +6375,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {VirtualMachineCaptureResult} - The deserialized result object. + * @resolve {OperationStatusResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -5699,403 +6383,224 @@ 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 + * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. + * See {@link OperationStatusResponse} 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. */ - 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; - - - /** - * 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} parameters Parameters supplied to the Create Virtual Machine - * 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.plan.name] The plan ID. + 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.plan.publisher] The publisher ID. + * @param {string} resourceGroupName The name of the 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} vmName The name of the virtual machine. * - * @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 {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' + * @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.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. + * @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} [parameters.storageProfile.imageReference.publisher] The - * image publisher. + * @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} vmName The name of the virtual machine. * - * @param {string} [parameters.storageProfile.imageReference.sku] The image - * SKU. + * @param {object} [options] Optional Parameters. * - * @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} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} [parameters.storageProfile.imageReference.id] Resource Id + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @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). + * @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.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' + * {Promise} A promise is returned. * - * @param {object} [parameters.storageProfile.osDisk.encryptionSettings] - * Specifies the encryption settings for the OS Disk.

    Minimum - * api-version: 2015-06-15 + * @resolve {OperationStatusResponse} - The deserialized result object. * - * @param {object} - * [parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey] - * Specifies the location of the disk encryption key, which is a Key Vault - * Secret. + * @reject {Error|ServiceError} - The error object. * - * @param {string} - * parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey.secretUrl - * The URL referencing a secret in a Key Vault. + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @param {object} - * parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey.sourceVault - * The relative URL of the Key Vault containing the secret. + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * @param {object} - * [parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey] - * Specifies the location of the key encryption key in Key Vault. + * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. + * See {@link OperationStatusResponse} for more + * information. * - * @param {string} - * parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey.keyUrl - * The URL referencing a key encryption key in Key Vault. + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * @param {object} - * parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey.sourceVault - * The relative URL of the Key Vault containing the key. + * {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; + + + /** + * Run command on the VM. * - * @param {boolean} - * [parameters.storageProfile.osDisk.encryptionSettings.enabled] Specifies - * whether disk encryption should be enabled on the virtual machine. + * @param {string} resourceGroupName The name of the resource group. * - * @param {string} [parameters.storageProfile.osDisk.name] The disk name. + * @param {string} vmName The name of the virtual machine. * - * @param {object} [parameters.storageProfile.osDisk.vhd] The virtual hard - * disk. + * @param {object} parameters Parameters supplied to the Run command operation. * - * @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.commandId The run command id. * - * @param {string} [parameters.storageProfile.osDisk.image.uri] Specifies the - * virtual hard disk's uri. + * @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.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 {array} [parameters.parameters] The run command parameters. * - * @param {boolean} [parameters.storageProfile.osDisk.writeAcceleratorEnabled] - * Specifies whether writeAccelerator should be enabled or disabled on the - * disk. + * @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 name of the disk in a virtual machine image.

    This - * value cannot be larger than 1023 GB + * @returns {Promise} A promise is returned * - * @param {object} [parameters.storageProfile.osDisk.managedDisk] The managed - * disk parameters. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {string} - * [parameters.storageProfile.osDisk.managedDisk.storageAccountType] Specifies - * the storage account type for the managed disk. Possible values are: - * Standard_LRS or Premium_LRS. Possible values include: 'Standard_LRS', - * 'Premium_LRS' + * @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 {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource - * Id + * @param {string} resourceGroupName The name of the resource group. * - * @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} vmName The name of the virtual machine. * - * @param {object} [parameters.osProfile] Specifies the operating system - * settings for the virtual machine. + * @param {object} parameters Parameters supplied to the Run command 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} parameters.commandId The run command id. * - * @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 {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.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 {array} [parameters.parameters] The run command 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] Optional Parameters. * - * @param {object} [parameters.osProfile.windowsConfiguration] Specifies - * Windows operating system settings on the virtual machine. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @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 {ServiceCallback} [optionalCallback] - The optional callback. * - * @param {boolean} - * [parameters.osProfile.windowsConfiguration.enableAutomaticUpdates] Indicates - * whether virtual machine is enabled for automatic updates. + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @param {string} [parameters.osProfile.windowsConfiguration.timeZone] - * Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time" + * {Promise} A promise is returned. * - * @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. + * @resolve {RunCommandResult} - The deserialized result object. * - * @param {object} [parameters.osProfile.windowsConfiguration.winRM] Specifies - * the Windows Remote Management listeners. This enables remote Windows - * PowerShell. + * @reject {Error|ServiceError} - The error object. * - * @param {array} [parameters.osProfile.windowsConfiguration.winRM.listeners] - * The list of Windows Remote Management listeners + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @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). + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * @param {boolean} - * [parameters.osProfile.linuxConfiguration.disablePasswordAuthentication] - * Specifies whether password authentication should be disabled. + * {RunCommandResult} [result] - The deserialized result object if an error did not occur. + * See {@link RunCommandResult} for more information. * - * @param {object} [parameters.osProfile.linuxConfiguration.ssh] Specifies the - * ssh key configuration for a Linux OS. + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * @param {array} [parameters.osProfile.linuxConfiguration.ssh.publicKeys] The - * list of SSH public keys used to authenticate with linux based VMs. + * {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; + + + /** + * 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 {array} [parameters.osProfile.secrets] Specifies set of certificates - * that should be installed onto the virtual machine. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * - * @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. + * @returns {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.

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

    For both - * Windows and Linux virtual machines, Azure also enables you to see a - * screenshot of the VM from the hypervisor. + * @resolve {HttpOperationResponse} - 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. + */ + 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 {string} [parameters.diagnosticsProfile.bootDiagnostics.storageUri] - * Uri of the storage account to use for placing the console output and - * screenshot. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * - * @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 {array} [parameters.identity.identityIds] The list of user identities - * associated with the Virtual Machine. The user identity references will be - * ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + * @resolve {VirtualMachineListResult} - The deserialized result object. * - * @param {array} [parameters.zones] The virtual machine zones. + * @reject {Error|ServiceError} - The error object. * - * @param {string} parameters.location Resource location + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @param {object} [parameters.tags] Resource tags + * {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. + * + * {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; + + + /** + * 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} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -6104,396 +6609,240 @@ 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>; + listAllNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * The operation to create or update a virtual machine. + * 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} resourceGroupName The name of the resource group. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * - * @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**. + * @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 {VirtualMachineListResult} - The deserialized result object. * - * @param {string} [parameters.plan.promotionCode] The promotion code. + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {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. + * + * {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; +} + +/** + * @class + * VirtualMachineImages + * __NOTE__: An instance of this class is automatically created for an + * instance of the ComputeManagementClient. + */ +export interface VirtualMachineImages { + + + /** + * Gets a virtual machine image. + * + * @param {string} location The name of a supported Azure region. + * + * @param {string} publisherName A valid image publisher. + * + * @param {string} offer A valid image publisher offer. + * + * @param {string} skus A valid image SKU. * - * @param {object} [parameters.hardwareProfile] Specifies the hardware settings - * for the virtual machine. + * @param {string} version A valid image SKU version. * - * @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} [parameters.storageProfile] Specifies the storage settings - * for the virtual machine disks. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @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 {Promise} A promise is returned * - * @param {string} [parameters.storageProfile.imageReference.publisher] The - * image publisher. + * @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. + */ + getWithHttpOperationResponse(location: string, publisherName: string, offer: string, skus: string, version: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets a virtual machine image. * - * @param {string} [parameters.storageProfile.imageReference.sku] The image - * SKU. + * @param {string} location The name of a supported Azure region. * - * @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} publisherName A valid image publisher. * - * @param {string} [parameters.storageProfile.imageReference.id] Resource Id + * @param {string} offer A valid image publisher offer. * - * @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} skus A valid image SKU. * - * @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} version A valid image SKU version. * - * @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. + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @param {object} - * parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey.sourceVault - * The relative URL of the Key Vault containing the secret. + * @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.keyEncryptionKey] - * Specifies the location of the key encryption key in Key Vault. + * {Promise} A promise is returned. * - * @param {string} - * parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey.keyUrl - * The URL referencing a key encryption key in Key Vault. + * @resolve {VirtualMachineImage} - 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. * - * @param {boolean} - * [parameters.storageProfile.osDisk.encryptionSettings.enabled] Specifies - * whether disk encryption should be enabled on the virtual machine. + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @param {string} [parameters.storageProfile.osDisk.name] The disk name. + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * @param {object} [parameters.storageProfile.osDisk.vhd] The virtual hard - * disk. + * {VirtualMachineImage} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualMachineImage} for more information. * - * @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. + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * @param {string} [parameters.storageProfile.osDisk.image.uri] Specifies the - * virtual hard disk's uri. + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + get(location: string, publisherName: string, offer: string, skus: string, version: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(location: string, publisherName: string, offer: string, skus: string, version: string, callback: ServiceCallback): void; + get(location: string, publisherName: string, offer: string, skus: string, version: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets a list of all virtual machine image versions for the specified + * location, publisher, offer, and SKU. * - * @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} location The name of a supported Azure region. * - * @param {boolean} [parameters.storageProfile.osDisk.writeAcceleratorEnabled] - * Specifies whether writeAccelerator should be enabled or disabled on the - * disk. + * @param {string} publisherName A valid image publisher. * - * @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} offer A valid image publisher offer. * - * @param {number} [parameters.storageProfile.osDisk.diskSizeGB] Specifies the - * size of an empty data disk in gigabytes. This element can be used to - * overwrite the name of the disk in a virtual machine image.

    This - * value cannot be larger than 1023 GB + * @param {string} skus A valid image SKU. * - * @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. Possible values are: - * Standard_LRS or Premium_LRS. Possible values include: 'Standard_LRS', - * 'Premium_LRS' + * @param {string} [options.filter] The filter to apply on the operation. * - * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource - * Id + * @param {number} [options.top] * - * @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} [options.orderby] * - * @param {object} [parameters.osProfile] Specifies the operating system - * settings for the virtual machine. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @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). + * @returns {Promise} A promise is returned * - * @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) + * @resolve {HttpOperationResponse} - The deserialized result 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) + * @reject {Error|ServiceError} - The error object. + */ + listWithHttpOperationResponse(location: string, publisherName: string, offer: string, skus: string, options?: { filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets a list of all virtual machine image versions for the specified + * location, publisher, offer, and SKU. * - * @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} location The name of a supported Azure region. * - * @param {object} [parameters.osProfile.windowsConfiguration] Specifies - * Windows operating system settings on the virtual machine. + * @param {string} publisherName A valid image publisher. * - * @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} offer A valid image publisher offer. * - * @param {boolean} - * [parameters.osProfile.windowsConfiguration.enableAutomaticUpdates] Indicates - * whether virtual machine is enabled for automatic updates. + * @param {string} skus A valid image SKU. * - * @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 {string} [options.filter] The filter to apply on the operation. * - * @param {object} [parameters.osProfile.windowsConfiguration.winRM] Specifies - * the Windows Remote Management listeners. This enables remote Windows - * PowerShell. + * @param {number} [options.top] * - * @param {array} [parameters.osProfile.windowsConfiguration.winRM.listeners] - * The list of Windows Remote Management listeners + * @param {string} [options.orderby] * - * @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.customHeaders] Headers that will be added to the + * request * - * @param {boolean} - * [parameters.osProfile.linuxConfiguration.disablePasswordAuthentication] - * Specifies whether password authentication should be disabled. + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @param {object} [parameters.osProfile.linuxConfiguration.ssh] Specifies the - * ssh key configuration for a Linux OS. + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @param {array} [parameters.osProfile.linuxConfiguration.ssh.publicKeys] The - * list of SSH public keys used to authenticate with linux based VMs. + * {Promise} A promise is returned. * - * @param {array} [parameters.osProfile.secrets] Specifies set of certificates - * that should be installed onto the virtual machine. + * @resolve {Array} - The deserialized result object. * - * @param {object} [parameters.networkProfile] Specifies the network interfaces - * of the virtual machine. + * @reject {Error|ServiceError} - The error object. * - * @param {array} [parameters.networkProfile.networkInterfaces] Specifies the - * list of resource Ids for the network interfaces associated with the virtual - * machine. + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @param {object} [parameters.diagnosticsProfile] Specifies the boot - * diagnostic settings state.

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

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

    For both - * Windows and Linux virtual machines, Azure also enables you to see a - * screenshot of the VM from the hypervisor. + * {Array} [result] - The deserialized result object if an error did not occur. * - * @param {boolean} [parameters.diagnosticsProfile.bootDiagnostics.enabled] - * Whether boot diagnostics should be enabled on the Virtual Machine. + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * @param {string} [parameters.diagnosticsProfile.bootDiagnostics.storageUri] - * Uri of the storage account to use for placing the console output and - * screenshot. + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + list(location: string, publisherName: string, offer: string, skus: string, options?: { filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + list(location: string, publisherName: string, offer: string, skus: string, callback: ServiceCallback): void; + list(location: string, publisherName: string, offer: string, skus: string, options: { filter? : string, top? : number, orderby? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets a list of virtual machine image offers for the specified location and + * publisher. * - * @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} location The name of a supported Azure region. * - * @param {string} [parameters.availabilitySet.id] Resource Id + * @param {string} publisherName A valid image publisher. * - * @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] Optional Parameters. * - * @param {object} [parameters.identity] The identity of the virtual machine, - * if configured. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @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' + * @returns {Promise} A promise is returned * - * @param {array} [parameters.identity.identityIds] The list of user identities - * associated with the Virtual Machine. The user identity references will be - * ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {array} [parameters.zones] The virtual machine zones. + * @reject {Error|ServiceError} - The error object. + */ + listOffersWithHttpOperationResponse(location: string, publisherName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets a list of virtual machine image offers for the specified location and + * publisher. * - * @param {string} parameters.location Resource location + * @param {string} location The name of a supported Azure region. * - * @param {object} [parameters.tags] Resource tags + * @param {string} publisherName A valid image publisher. * * @param {object} [options] Optional Parameters. * @@ -6507,7 +6856,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {VirtualMachine} - The deserialized result object. + * @resolve {Array} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -6515,400 +6864,280 @@ 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. + * {Array} [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; + listOffers(location: string, publisherName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listOffers(location: string, publisherName: string, callback: ServiceCallback): void; + listOffers(location: string, publisherName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * The operation to update a virtual machine. + * Gets a list of virtual machine image publishers for the specified Azure + * location. * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} location The name of a supported Azure region. * - * @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. + */ + listPublishersWithHttpOperationResponse(location: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets a list of virtual machine image publishers for the specified Azure + * location. * - * @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} location The name of a supported Azure region. * - * @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 {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 {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. * - * @param {object} [parameters.storageProfile] Specifies the storage settings - * for the virtual machine disks. + * @resolve {Array} - The deserialized result 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. + * @reject {Error|ServiceError} - The error object. * - * @param {string} [parameters.storageProfile.imageReference.publisher] The - * image publisher. + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @param {string} [parameters.storageProfile.imageReference.offer] Specifies - * the offer of the platform image or marketplace image used to create the - * virtual machine. + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * @param {string} [parameters.storageProfile.imageReference.sku] The image - * SKU. + * {Array} [result] - The deserialized result 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. + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * @param {string} [parameters.storageProfile.imageReference.id] Resource Id + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listPublishers(location: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listPublishers(location: string, callback: ServiceCallback): void; + listPublishers(location: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets a list of virtual machine image SKUs for the specified location, + * publisher, and offer. * - * @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} location The name of a supported Azure region. * - * @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} publisherName A valid image publisher. * - * @param {object} [parameters.storageProfile.osDisk.encryptionSettings] - * Specifies the encryption settings for the OS Disk.

    Minimum - * api-version: 2015-06-15 + * @param {string} offer A valid image publisher offer. * - * @param {object} - * [parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey] - * Specifies the location of the disk encryption key, which is a Key Vault - * Secret. + * @param {object} [options] Optional Parameters. * - * @param {string} - * parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey.secretUrl - * The URL referencing a secret in a Key Vault. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {object} - * parameters.storageProfile.osDisk.encryptionSettings.diskEncryptionKey.sourceVault - * The relative URL of the Key Vault containing the secret. + * @returns {Promise} A promise is returned * - * @param {object} - * [parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey] - * Specifies the location of the key encryption key in Key Vault. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {string} - * parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey.keyUrl - * The URL referencing a key encryption key in Key Vault. + * @reject {Error|ServiceError} - The error object. + */ + listSkusWithHttpOperationResponse(location: string, publisherName: string, offer: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets a list of virtual machine image SKUs for the specified location, + * publisher, and offer. * - * @param {object} - * parameters.storageProfile.osDisk.encryptionSettings.keyEncryptionKey.sourceVault - * The relative URL of the Key Vault containing the key. + * @param {string} location The name of a supported Azure region. * - * @param {boolean} - * [parameters.storageProfile.osDisk.encryptionSettings.enabled] Specifies - * whether disk encryption should be enabled on the virtual machine. + * @param {string} publisherName A valid image publisher. * - * @param {string} [parameters.storageProfile.osDisk.name] The disk name. + * @param {string} offer A valid image publisher offer. * - * @param {object} [parameters.storageProfile.osDisk.vhd] The virtual hard - * disk. + * @param {object} [options] Optional Parameters. * - * @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.customHeaders] Headers that will be added to the + * request * - * @param {string} [parameters.storageProfile.osDisk.image.uri] Specifies the - * virtual hard disk's uri. + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @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' + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @param {boolean} [parameters.storageProfile.osDisk.writeAcceleratorEnabled] - * Specifies whether writeAccelerator should be enabled or disabled on the - * disk. + * {Promise} A promise is returned. * - * @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' + * @resolve {Array} - The deserialized result 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 name of the disk in a virtual machine image.

    This - * value cannot be larger than 1023 GB + * @reject {Error|ServiceError} - The error object. * - * @param {object} [parameters.storageProfile.osDisk.managedDisk] The managed - * disk parameters. + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @param {string} - * [parameters.storageProfile.osDisk.managedDisk.storageAccountType] Specifies - * the storage account type for the managed disk. Possible values are: - * Standard_LRS or Premium_LRS. Possible values include: 'Standard_LRS', - * 'Premium_LRS' + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource - * Id + * {Array} [result] - The deserialized result 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). + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * @param {object} [parameters.osProfile] Specifies the operating system - * settings for the virtual machine. + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listSkus(location: string, publisherName: string, offer: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listSkus(location: string, publisherName: string, offer: string, callback: ServiceCallback): void; + listSkus(location: string, publisherName: string, offer: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * UsageOperations + * __NOTE__: An instance of this class is automatically created for an + * instance of the ComputeManagementClient. + */ +export interface UsageOperations { + + + /** + * Gets, for the specified location, the current compute resource usage + * information as well as the limits for compute resources under the + * subscription. * - * @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} location The location for which resource usage is queried. * - * @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) + * @returns {Promise} A promise is returned * - * @param {object} [parameters.osProfile.windowsConfiguration] Specifies - * Windows operating system settings on the virtual machine. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @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. + * @reject {Error|ServiceError} - The error object. + */ + listWithHttpOperationResponse(location: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets, for the specified location, the current compute resource usage + * information as well as the limits for compute resources under the + * subscription. * - * @param {boolean} - * [parameters.osProfile.windowsConfiguration.enableAutomaticUpdates] Indicates - * whether virtual machine is enabled for automatic updates. + * @param {string} location The location for which resource usage is queried. + * + * @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 {ListUsagesResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @param {string} [parameters.osProfile.windowsConfiguration.timeZone] - * Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time" + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * @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. + * {ListUsagesResult} [result] - The deserialized result object if an error did not occur. + * See {@link ListUsagesResult} for more information. * - * @param {object} [parameters.osProfile.windowsConfiguration.winRM] Specifies - * the Windows Remote Management listeners. This enables remote Windows - * PowerShell. + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * @param {array} [parameters.osProfile.windowsConfiguration.winRM.listeners] - * The list of Windows Remote Management listeners + * {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; + + + /** + * Gets, for the specified location, the current compute resource usage + * information as well as the limits for compute resources under the + * subscription. * - * @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} nextPageLink The NextLink from the previous successful call + * to List operation. * - * @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 {array} [parameters.osProfile.secrets] Specifies set of certificates - * that should be installed onto the virtual machine. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {object} [parameters.networkProfile] Specifies the network interfaces - * of the virtual machine. + * @reject {Error|ServiceError} - The error object. + */ + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets, for the specified location, the current compute resource usage + * information as well as the limits for compute resources under the + * subscription. * - * @param {array} [parameters.networkProfile.networkInterfaces] Specifies the - * list of resource Ids for the network interfaces associated with the virtual - * machine. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * - * @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.

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

    For both - * Windows and Linux virtual machines, Azure also enables you to see a - * screenshot of the VM from the hypervisor. + * @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 {ServiceCallback} [optionalCallback] - The optional callback. * - * @param {string} [parameters.diagnosticsProfile.bootDiagnostics.storageUri] - * Uri of the storage account to use for placing the console output and - * screenshot. + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @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. + * {Promise} A promise is returned. * - * @param {string} [parameters.availabilitySet.id] Resource Id + * @resolve {ListUsagesResult} - The deserialized result 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 + * @reject {Error|ServiceError} - The error object. * - * @param {object} [parameters.identity] The identity of the virtual machine, - * if configured. + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @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' + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * @param {array} [parameters.identity.identityIds] The list of user identities - * associated with the Virtual Machine. The user identity references will be - * ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + * {ListUsagesResult} [result] - The deserialized result object if an error did not occur. + * See {@link ListUsagesResult} for more information. * - * @param {array} [parameters.zones] The virtual machine zones. + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * @param {object} [parameters.tags] Resource tags + * {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 + * VirtualMachineSizes + * __NOTE__: An instance of this class is automatically created for an + * instance of the ComputeManagementClient. + */ +export interface VirtualMachineSizes { + + + /** + * Lists all available virtual machine sizes for a subscription in a location. + * + * @param {string} location The location upon which virtual-machine-sizes is + * queried. * * @param {object} [options] Optional Parameters. * @@ -6917,185 +7146,99 @@ 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. + * Lists all available virtual machine sizes for a subscription in a location. * - * @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. + * + * {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} [parameters.storageProfile.imageReference.publisher] The - * image publisher. + * @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** @@ -7103,206 +7246,110 @@ 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 {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 name 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. + * 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.storageAccountType] Specifies - * the storage account type for the managed disk. Possible values are: - * Standard_LRS or Premium_LRS. Possible values include: 'Standard_LRS', + * @param {string} [parameters.storageProfile.osDisk.storageAccountType] + * Specifies the storage account type for the managed disk. Possible values + * are: Standard_LRS or Premium_LRS. Possible values include: 'Standard_LRS', * 'Premium_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.

    * 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.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 {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.osProfile.windowsConfiguration] Specifies - * Windows operating system settings on the virtual machine. + * @param {string} parameters.location Resource location * - * @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} [parameters.tags] Resource tags * - * @param {boolean} - * [parameters.osProfile.windowsConfiguration.enableAutomaticUpdates] Indicates - * whether virtual machine is enabled for automatic updates. + * @param {object} [options] Optional Parameters. * - * @param {string} [parameters.osProfile.windowsConfiguration.timeZone] - * Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time" + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @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. + * @returns {Promise} A promise is returned * - * @param {object} [parameters.osProfile.windowsConfiguration.winRM] Specifies - * the Windows Remote Management listeners. This enables remote Windows - * PowerShell. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {array} [parameters.osProfile.windowsConfiguration.winRM.listeners] - * The list of Windows Remote Management listeners + * @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 {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} resourceGroupName The name of the resource group. * - * @param {boolean} - * [parameters.osProfile.linuxConfiguration.disablePasswordAuthentication] - * Specifies whether password authentication should be disabled. + * @param {string} imageName The name of the image. * - * @param {object} [parameters.osProfile.linuxConfiguration.ssh] Specifies the - * ssh key configuration for a Linux OS. + * @param {object} parameters Parameters supplied to the Create Image + * operation. * - * @param {array} [parameters.osProfile.linuxConfiguration.ssh.publicKeys] The - * list of SSH public keys used to authenticate with linux based VMs. + * @param {object} [parameters.sourceVirtualMachine] The source virtual machine + * from which Image is created. * - * @param {array} [parameters.osProfile.secrets] Specifies set of certificates - * that should be installed onto the virtual machine. + * @param {object} [parameters.storageProfile] Specifies the storage settings + * for the virtual machine disks. * - * @param {object} [parameters.networkProfile] Specifies the network interfaces - * of 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 {array} [parameters.networkProfile.networkInterfaces] Specifies the - * list of resource Ids for the network interfaces associated with 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 a custom image.

    Possible values are:

    **Windows** + *

    **Linux**. Possible values include: 'Windows', 'Linux' * - * @param {object} [parameters.diagnosticsProfile] Specifies the boot - * diagnostic settings state.

    Minimum api-version: 2015-06-15. + * @param {string} parameters.storageProfile.osDisk.osState The OS State. + * Possible values include: 'Generalized', 'Specialized' * - * @param {object} [parameters.diagnosticsProfile.bootDiagnostics] Boot - * Diagnostics is a debugging feature which allows you to view Console Output - * and Screenshot to diagnose VM status.

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

    For both - * Windows and Linux virtual machines, Azure also enables you to see a - * screenshot of the VM from the hypervisor. + * @param {object} [parameters.storageProfile.osDisk.snapshot] The snapshot. * - * @param {boolean} [parameters.diagnosticsProfile.bootDiagnostics.enabled] - * Whether boot diagnostics should be enabled on the Virtual Machine. + * @param {object} [parameters.storageProfile.osDisk.managedDisk] The + * managedDisk. * - * @param {string} [parameters.diagnosticsProfile.bootDiagnostics.storageUri] - * Uri of the storage account to use for placing the console output and - * screenshot. + * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource + * Id * - * @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.blobUri] The Virtual Hard + * Disk. * - * @param {string} [parameters.availabilitySet.id] Resource 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.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 {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 {object} [parameters.identity] The identity of the virtual machine, - * if configured. + * @param {string} [parameters.storageProfile.osDisk.storageAccountType] + * Specifies the storage account type for the managed disk. Possible values + * are: Standard_LRS or Premium_LRS. Possible values include: 'Standard_LRS', + * 'Premium_LRS' * - * @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 {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.identity.identityIds] The list of user identities - * associated with the Virtual Machine. The user identity references will be - * ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'. + * @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 {array} [parameters.zones] The virtual machine zones. + * @param {string} parameters.location Resource location * * @param {object} [parameters.tags] Resource tags * @@ -7318,7 +7365,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. * @@ -7326,85 +7373,85 @@ 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 {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} imageName The name of the image. * - * @param {string} resourceGroupName The name of the resource group. + * @param {object} parameters Parameters supplied to the Update Image + * operation. * - * @param {string} vmName The name of the virtual machine. + * @param {object} [parameters.sourceVirtualMachine] The source virtual machine + * from which Image is created. * - * @param {object} [options] Optional Parameters. + * @param {object} [parameters.storageProfile] Specifies the storage settings + * for the virtual machine disks. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @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 {ServiceCallback} [optionalCallback] - The optional callback. + * @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' * - * @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.osState The OS State. + * Possible values include: 'Generalized', 'Specialized' * - * {Promise} A promise is returned. + * @param {object} [parameters.storageProfile.osDisk.snapshot] The snapshot. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @param {object} [parameters.storageProfile.osDisk.managedDisk] The + * managedDisk. * - * @reject {Error|ServiceError} - The error object. + * @param {string} [parameters.storageProfile.osDisk.managedDisk.id] Resource + * Id * - * {ServiceCallback} optionalCallback(err, result, request, response) + * @param {string} [parameters.storageProfile.osDisk.blobUri] The Virtual Hard + * Disk. * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * @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' * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} for more - * information. + * @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 * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @param {string} [parameters.storageProfile.osDisk.storageAccountType] + * Specifies the storage account type for the managed disk. Possible values + * are: Standard_LRS or Premium_LRS. Possible values include: 'Standard_LRS', + * 'Premium_LRS' * - * {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 {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. * @@ -7413,19 +7460,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. */ - beginConvertToManagedDisksWithHttpOperationResponse(resourceGroupName: string, vmName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + 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} 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. Possible values + * are: Standard_LRS or Premium_LRS. Possible values include: 'Standard_LRS', + * 'Premium_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. * @@ -7439,7 +7546,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {Image} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -7447,26 +7554,24 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} 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. */ - 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. * @@ -7479,15 +7584,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. * @@ -7517,44 +7621,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 * @@ -7565,7 +7671,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {Image} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -7573,26 +7679,23 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} 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. */ - 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 @@ -7600,19 +7703,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 @@ -7625,7 +7726,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {ImageListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -7633,25 +7734,22 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} 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. */ - 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. * @@ -7660,18 +7758,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. * @@ -7685,7 +7781,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {ImageListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -7693,25 +7789,87 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} 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. */ - 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. Possible values + * are: Standard_LRS or Premium_LRS. Possible values include: 'Standard_LRS', + * 'Premium_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. * @@ -7720,18 +7878,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} 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. Possible values + * are: Standard_LRS or Premium_LRS. Possible values include: 'Standard_LRS', + * 'Premium_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. * @@ -7745,7 +7966,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {Image} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -7753,25 +7974,85 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} 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. */ - 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. Possible values + * are: Standard_LRS or Premium_LRS. Possible values include: 'Standard_LRS', + * 'Premium_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. * @@ -7780,18 +8061,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. Possible values + * are: Standard_LRS or Premium_LRS. Possible values include: 'Standard_LRS', + * 'Premium_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. * @@ -7805,7 +8147,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {OperationStatusResponse} - The deserialized result object. + * @resolve {Image} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -7813,35 +8155,24 @@ export interface VirtualMachines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. - * See {@link OperationStatusResponse} 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. */ - 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. * @@ -7850,28 +8181,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. * @@ -7885,7 +8206,7 @@ export interface VirtualMachines { * * {Promise} A promise is returned. * - * @resolve {RunCommandResult} - The deserialized result object. + * @resolve {OperationStatusResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -7893,21 +8214,21 @@ 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. + * {OperationStatusResponse} [result] - The deserialized result object if an error did not occur. + * See {@link OperationStatusResponse} 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. */ - 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. @@ -7919,15 +8240,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. @@ -7944,7 +8264,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. * @@ -7952,22 +8272,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. @@ -7979,15 +8299,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. @@ -8004,7 +8325,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. * @@ -8012,17 +8333,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 26857f8e1c..c6c01da729 100644 --- a/lib/services/computeManagement2/lib/operations/index.js +++ b/lib/services/computeManagement2/lib/operations/index.js @@ -18,11 +18,11 @@ exports.Operations = require('./operations'); exports.AvailabilitySets = require('./availabilitySets'); exports.VirtualMachineExtensionImages = require('./virtualMachineExtensionImages'); exports.VirtualMachineExtensions = require('./virtualMachineExtensions'); +exports.VirtualMachines = require('./virtualMachines'); exports.VirtualMachineImages = require('./virtualMachineImages'); exports.UsageOperations = require('./usageOperations'); 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/virtualMachineExtensions.js b/lib/services/computeManagement2/lib/operations/virtualMachineExtensions.js index 064b547637..669cd7f9c8 100644 --- a/lib/services/computeManagement2/lib/operations/virtualMachineExtensions.js +++ b/lib/services/computeManagement2/lib/operations/virtualMachineExtensions.js @@ -21,7 +21,7 @@ const WebResource = msRest.WebResource; * @param {string} resourceGroupName The name of the resource group. * * @param {string} vmName The name of the virtual machine where the extension - * should be create or updated. + * should be created or updated. * * @param {string} vmExtensionName The name of the virtual machine extension. * @@ -147,6 +147,118 @@ function _createOrUpdate(resourceGroupName, vmName, vmExtensionName, extensionPa } +/** + * The operation to update the extension. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} vmName The name of the virtual machine where the extension + * should be updated. + * + * @param {string} vmExtensionName The name of the virtual machine extension. + * + * @param {object} extensionParameters Parameters supplied to the Update + * Virtual Machine Extension operation. + * + * @param {string} [extensionParameters.forceUpdateTag] How the extension + * handler should be forced to update even if the extension configuration has + * not changed. + * + * @param {string} [extensionParameters.publisher] The name of the extension + * handler publisher. + * + * @param {string} [extensionParameters.type] Specifies the type of the + * extension; an example is "CustomScriptExtension". + * + * @param {string} [extensionParameters.typeHandlerVersion] Specifies the + * version of the script handler. + * + * @param {boolean} [extensionParameters.autoUpgradeMinorVersion] Indicates + * whether the extension should use a newer minor version if one is available + * at deployment time. Once deployed, however, the extension will not upgrade + * minor versions unless redeployed, even with this property set to true. + * + * @param {object} [extensionParameters.settings] Json formatted public + * settings for the extension. + * + * @param {object} [extensionParameters.protectedSettings] The extension can + * contain either protectedSettings or protectedSettingsFromKeyVault or no + * protected settings at all. + * + * @param {object} [extensionParameters.tags] Resource tags + * + * @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 VirtualMachineExtension} 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 _update(resourceGroupName, vmName, vmExtensionName, extensionParameters, 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.'); + } + + // Send request + this.beginUpdate(resourceGroupName, vmName, vmExtensionName, extensionParameters, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['VirtualMachineExtension']().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); + }); + }); +} + + /** * The operation to delete the extension. * @@ -395,7 +507,7 @@ function _get(resourceGroupName, vmName, vmExtensionName, options, callback) { * @param {string} resourceGroupName The name of the resource group. * * @param {string} vmName The name of the virtual machine where the extension - * should be create or updated. + * should be created or updated. * * @param {string} vmExtensionName The name of the virtual machine extension. * @@ -625,15 +737,45 @@ function _beginCreateOrUpdate(resourceGroupName, vmName, vmExtensionName, extens } /** - * The operation to delete the extension. + * The operation to update the extension. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} vmName The name of the virtual machine where the extension - * should be deleted. + * should be updated. * * @param {string} vmExtensionName The name of the virtual machine extension. * + * @param {object} extensionParameters Parameters supplied to the Update + * Virtual Machine Extension operation. + * + * @param {string} [extensionParameters.forceUpdateTag] How the extension + * handler should be forced to update even if the extension configuration has + * not changed. + * + * @param {string} [extensionParameters.publisher] The name of the extension + * handler publisher. + * + * @param {string} [extensionParameters.type] Specifies the type of the + * extension; an example is "CustomScriptExtension". + * + * @param {string} [extensionParameters.typeHandlerVersion] Specifies the + * version of the script handler. + * + * @param {boolean} [extensionParameters.autoUpgradeMinorVersion] Indicates + * whether the extension should use a newer minor version if one is available + * at deployment time. Once deployed, however, the extension will not upgrade + * minor versions unless redeployed, even with this property set to true. + * + * @param {object} [extensionParameters.settings] Json formatted public + * settings for the extension. + * + * @param {object} [extensionParameters.protectedSettings] The extension can + * contain either protectedSettings or protectedSettingsFromKeyVault or no + * protected settings at all. + * + * @param {object} [extensionParameters.tags] Resource tags + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -646,14 +788,14 @@ function _beginCreateOrUpdate(resourceGroupName, vmName, vmExtensionName, extens * {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 OperationStatusResponse} for more + * See {@link VirtualMachineExtension} 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 _beginDeleteMethod(resourceGroupName, vmName, vmExtensionName, options, callback) { +function _beginUpdate(resourceGroupName, vmName, vmExtensionName, extensionParameters, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -675,6 +817,9 @@ function _beginDeleteMethod(resourceGroupName, vmName, vmExtensionName, options, if (vmExtensionName === null || vmExtensionName === undefined || typeof vmExtensionName.valueOf() !== 'string') { throw new Error('vmExtensionName cannot be null or undefined and it must be of type string.'); } + if (extensionParameters === null || extensionParameters === undefined) { + throw new Error('extensionParameters cannot be null or undefined.'); + } 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.'); } @@ -700,7 +845,7 @@ function _beginDeleteMethod(resourceGroupName, vmName, vmExtensionName, options, // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'DELETE'; + httpRequest.method = 'PATCH'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -718,14 +863,28 @@ function _beginDeleteMethod(resourceGroupName, vmName, vmExtensionName, options, } } } - httpRequest.body = null; + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (extensionParameters !== null && extensionParameters !== undefined) { + let requestModelMapper = new client.models['VirtualMachineExtensionUpdate']().mapper(); + requestModel = client.serialize(requestModelMapper, extensionParameters, 'extensionParameters'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(extensionParameters, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200 && statusCode !== 202 && statusCode !== 204) { + if (statusCode !== 200) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -760,7 +919,7 @@ function _beginDeleteMethod(resourceGroupName, vmName, vmExtensionName, options, parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['OperationStatusResponse']().mapper(); + let resultMapper = new client.models['VirtualMachineExtension']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -775,46 +934,199 @@ function _beginDeleteMethod(resourceGroupName, vmName, vmExtensionName, options, }); } -/** Class representing a VirtualMachineExtensions. */ -class VirtualMachineExtensions { - /** - * Create a VirtualMachineExtensions. - * @param {ComputeManagementClient} client Reference to the service client. - */ - constructor(client) { - this.client = client; - this._createOrUpdate = _createOrUpdate; - this._deleteMethod = _deleteMethod; - this._get = _get; - this._beginCreateOrUpdate = _beginCreateOrUpdate; - this._beginDeleteMethod = _beginDeleteMethod; +/** + * The operation to delete the extension. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} vmName The name of the virtual machine where the extension + * should be deleted. + * + * @param {string} vmExtensionName The name of the virtual machine extension. + * + * @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 OperationStatusResponse} 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 _beginDeleteMethod(resourceGroupName, vmName, vmExtensionName, 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 = '2017-12-01'; + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (vmName === null || vmName === undefined || typeof vmName.valueOf() !== 'string') { + throw new Error('vmName cannot be null or undefined and it must be of type string.'); + } + if (vmExtensionName === null || vmExtensionName === undefined || typeof vmExtensionName.valueOf() !== 'string') { + throw new Error('vmExtensionName cannot be null or undefined and it must be of type string.'); + } + 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); } - /** - * The operation to create or update the extension. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} vmName The name of the virtual machine where the extension - * should be create or updated. - * - * @param {string} vmExtensionName The name of the virtual machine extension. - * - * @param {object} extensionParameters Parameters supplied to the Create - * Virtual Machine Extension operation. - * - * @param {string} [extensionParameters.forceUpdateTag] How the extension - * handler should be forced to update even if the extension configuration has - * not changed. - * - * @param {string} [extensionParameters.publisher] The name of the extension - * handler publisher. - * - * @param {string} [extensionParameters.virtualMachineExtensionType] Specifies - * the type of the extension; an example is "CustomScriptExtension". - * - * @param {string} [extensionParameters.typeHandlerVersion] Specifies the - * version of the script handler. + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{vmName}', encodeURIComponent(vmName)); + requestUrl = requestUrl.replace('{vmExtensionName}', encodeURIComponent(vmExtensionName)); + 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 = 'DELETE'; + 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 && statusCode !== 202 && statusCode !== 204) { + 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['OperationStatusResponse']().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); + }); +} + +/** Class representing a VirtualMachineExtensions. */ +class VirtualMachineExtensions { + /** + * Create a VirtualMachineExtensions. + * @param {ComputeManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._createOrUpdate = _createOrUpdate; + this._update = _update; + this._deleteMethod = _deleteMethod; + this._get = _get; + this._beginCreateOrUpdate = _beginCreateOrUpdate; + this._beginUpdate = _beginUpdate; + this._beginDeleteMethod = _beginDeleteMethod; + } + + /** + * The operation to create or update the extension. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} vmName The name of the virtual machine where the extension + * should be created or updated. + * + * @param {string} vmExtensionName The name of the virtual machine extension. + * + * @param {object} extensionParameters Parameters supplied to the Create + * Virtual Machine Extension operation. + * + * @param {string} [extensionParameters.forceUpdateTag] How the extension + * handler should be forced to update even if the extension configuration has + * not changed. + * + * @param {string} [extensionParameters.publisher] The name of the extension + * handler publisher. + * + * @param {string} [extensionParameters.virtualMachineExtensionType] Specifies + * the type of the extension; an example is "CustomScriptExtension". + * + * @param {string} [extensionParameters.typeHandlerVersion] Specifies the + * version of the script handler. * * @param {boolean} [extensionParameters.autoUpgradeMinorVersion] Indicates * whether the extension should use a newer minor version if one is available @@ -881,7 +1193,7 @@ class VirtualMachineExtensions { * @param {string} resourceGroupName The name of the resource group. * * @param {string} vmName The name of the virtual machine where the extension - * should be create or updated. + * should be created or updated. * * @param {string} vmExtensionName The name of the virtual machine extension. * @@ -983,6 +1295,159 @@ class VirtualMachineExtensions { } } + /** + * The operation to update the extension. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} vmName The name of the virtual machine where the extension + * should be updated. + * + * @param {string} vmExtensionName The name of the virtual machine extension. + * + * @param {object} extensionParameters Parameters supplied to the Update + * Virtual Machine Extension operation. + * + * @param {string} [extensionParameters.forceUpdateTag] How the extension + * handler should be forced to update even if the extension configuration has + * not changed. + * + * @param {string} [extensionParameters.publisher] The name of the extension + * handler publisher. + * + * @param {string} [extensionParameters.type] Specifies the type of the + * extension; an example is "CustomScriptExtension". + * + * @param {string} [extensionParameters.typeHandlerVersion] Specifies the + * version of the script handler. + * + * @param {boolean} [extensionParameters.autoUpgradeMinorVersion] Indicates + * whether the extension should use a newer minor version if one is available + * at deployment time. Once deployed, however, the extension will not upgrade + * minor versions unless redeployed, even with this property set to true. + * + * @param {object} [extensionParameters.settings] Json formatted public + * settings for the extension. + * + * @param {object} [extensionParameters.protectedSettings] The extension can + * contain either protectedSettings or protectedSettingsFromKeyVault or no + * protected settings at all. + * + * @param {object} [extensionParameters.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} - The error object. + */ + updateWithHttpOperationResponse(resourceGroupName, vmName, vmExtensionName, extensionParameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._update(resourceGroupName, vmName, vmExtensionName, extensionParameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * The operation to update the extension. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} vmName The name of the virtual machine where the extension + * should be updated. + * + * @param {string} vmExtensionName The name of the virtual machine extension. + * + * @param {object} extensionParameters Parameters supplied to the Update + * Virtual Machine Extension operation. + * + * @param {string} [extensionParameters.forceUpdateTag] How the extension + * handler should be forced to update even if the extension configuration has + * not changed. + * + * @param {string} [extensionParameters.publisher] The name of the extension + * handler publisher. + * + * @param {string} [extensionParameters.type] Specifies the type of the + * extension; an example is "CustomScriptExtension". + * + * @param {string} [extensionParameters.typeHandlerVersion] Specifies the + * version of the script handler. + * + * @param {boolean} [extensionParameters.autoUpgradeMinorVersion] Indicates + * whether the extension should use a newer minor version if one is available + * at deployment time. Once deployed, however, the extension will not upgrade + * minor versions unless redeployed, even with this property set to true. + * + * @param {object} [extensionParameters.settings] Json formatted public + * settings for the extension. + * + * @param {object} [extensionParameters.protectedSettings] The extension can + * contain either protectedSettings or protectedSettingsFromKeyVault or no + * protected settings at all. + * + * @param {object} [extensionParameters.tags] Resource tags + * + * @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 {VirtualMachineExtension} - 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 VirtualMachineExtension} 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. + */ + update(resourceGroupName, vmName, vmExtensionName, extensionParameters, 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._update(resourceGroupName, vmName, vmExtensionName, extensionParameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._update(resourceGroupName, vmName, vmExtensionName, extensionParameters, options, optionalCallback); + } + } + /** * The operation to delete the extension. * @@ -1181,7 +1646,7 @@ class VirtualMachineExtensions { * @param {string} resourceGroupName The name of the resource group. * * @param {string} vmName The name of the virtual machine where the extension - * should be create or updated. + * should be created or updated. * * @param {string} vmExtensionName The name of the virtual machine extension. * @@ -1266,7 +1731,7 @@ class VirtualMachineExtensions { * @param {string} resourceGroupName The name of the resource group. * * @param {string} vmName The name of the virtual machine where the extension - * should be create or updated. + * should be created or updated. * * @param {string} vmExtensionName The name of the virtual machine extension. * @@ -1368,6 +1833,159 @@ class VirtualMachineExtensions { } } + /** + * The operation to update the extension. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} vmName The name of the virtual machine where the extension + * should be updated. + * + * @param {string} vmExtensionName The name of the virtual machine extension. + * + * @param {object} extensionParameters Parameters supplied to the Update + * Virtual Machine Extension operation. + * + * @param {string} [extensionParameters.forceUpdateTag] How the extension + * handler should be forced to update even if the extension configuration has + * not changed. + * + * @param {string} [extensionParameters.publisher] The name of the extension + * handler publisher. + * + * @param {string} [extensionParameters.type] Specifies the type of the + * extension; an example is "CustomScriptExtension". + * + * @param {string} [extensionParameters.typeHandlerVersion] Specifies the + * version of the script handler. + * + * @param {boolean} [extensionParameters.autoUpgradeMinorVersion] Indicates + * whether the extension should use a newer minor version if one is available + * at deployment time. Once deployed, however, the extension will not upgrade + * minor versions unless redeployed, even with this property set to true. + * + * @param {object} [extensionParameters.settings] Json formatted public + * settings for the extension. + * + * @param {object} [extensionParameters.protectedSettings] The extension can + * contain either protectedSettings or protectedSettingsFromKeyVault or no + * protected settings at all. + * + * @param {object} [extensionParameters.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} - The error object. + */ + beginUpdateWithHttpOperationResponse(resourceGroupName, vmName, vmExtensionName, extensionParameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginUpdate(resourceGroupName, vmName, vmExtensionName, extensionParameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * The operation to update the extension. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} vmName The name of the virtual machine where the extension + * should be updated. + * + * @param {string} vmExtensionName The name of the virtual machine extension. + * + * @param {object} extensionParameters Parameters supplied to the Update + * Virtual Machine Extension operation. + * + * @param {string} [extensionParameters.forceUpdateTag] How the extension + * handler should be forced to update even if the extension configuration has + * not changed. + * + * @param {string} [extensionParameters.publisher] The name of the extension + * handler publisher. + * + * @param {string} [extensionParameters.type] Specifies the type of the + * extension; an example is "CustomScriptExtension". + * + * @param {string} [extensionParameters.typeHandlerVersion] Specifies the + * version of the script handler. + * + * @param {boolean} [extensionParameters.autoUpgradeMinorVersion] Indicates + * whether the extension should use a newer minor version if one is available + * at deployment time. Once deployed, however, the extension will not upgrade + * minor versions unless redeployed, even with this property set to true. + * + * @param {object} [extensionParameters.settings] Json formatted public + * settings for the extension. + * + * @param {object} [extensionParameters.protectedSettings] The extension can + * contain either protectedSettings or protectedSettingsFromKeyVault or no + * protected settings at all. + * + * @param {object} [extensionParameters.tags] Resource tags + * + * @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 {VirtualMachineExtension} - 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 VirtualMachineExtension} 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. + */ + beginUpdate(resourceGroupName, vmName, vmExtensionName, extensionParameters, 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._beginUpdate(resourceGroupName, vmName, vmExtensionName, extensionParameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginUpdate(resourceGroupName, vmName, vmExtensionName, extensionParameters, options, optionalCallback); + } + } + /** * The operation to delete the extension. * diff --git a/lib/services/computeManagement2/lib/operations/virtualMachines.js b/lib/services/computeManagement2/lib/operations/virtualMachines.js index 4c966c853c..c5c28bb9c3 100644 --- a/lib/services/computeManagement2/lib/operations/virtualMachines.js +++ b/lib/services/computeManagement2/lib/operations/virtualMachines.js @@ -14,6 +14,161 @@ const msRest = require('ms-rest'); const msRestAzure = require('ms-rest-azure'); const WebResource = msRest.WebResource; +/** + * The operation to get all extensions of a Virtual Machine. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} vmName The name of the virtual machine containing the + * extension. + * + * @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 + * + * @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 VirtualMachineExtensionsListResult} 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 _getExtensions(resourceGroupName, vmName, 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 expand = (options && options.expand !== undefined) ? options.expand : undefined; + let apiVersion = '2017-12-01'; + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (vmName === null || vmName === undefined || typeof vmName.valueOf() !== 'string') { + throw new Error('vmName cannot be null or undefined and it must be of type string.'); + } + if (expand !== null && expand !== undefined && typeof expand.valueOf() !== 'string') { + throw new Error('expand must be of type string.'); + } + 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}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{vmName}', encodeURIComponent(vmName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + if (expand !== null && expand !== undefined) { + queryParameters.push('$expand=' + encodeURIComponent(expand)); + } + 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['VirtualMachineExtensionsListResult']().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 @@ -5476,6 +5631,7 @@ class VirtualMachines { */ constructor(client) { this.client = client; + this._getExtensions = _getExtensions; this._capture = _capture; this._createOrUpdate = _createOrUpdate; this._update = _update; @@ -5510,6 +5666,101 @@ class VirtualMachines { this._listAllNext = _listAllNext; } + /** + * The operation to get all extensions of a Virtual Machine. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} vmName The name of the virtual machine containing the + * extension. + * + * @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. + * + * @reject {Error} - The error object. + */ + getExtensionsWithHttpOperationResponse(resourceGroupName, vmName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._getExtensions(resourceGroupName, vmName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * The operation to get all extensions of a Virtual Machine. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} vmName The name of the virtual machine containing the + * extension. + * + * @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 + * + * @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 {VirtualMachineExtensionsListResult} - 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 VirtualMachineExtensionsListResult} 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. + */ + getExtensions(resourceGroupName, vmName, 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._getExtensions(resourceGroupName, vmName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getExtensions(resourceGroupName, vmName, 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.