/* * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for * license information. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is * regenerated. */ import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; import * as Models from "../models"; import * as Mappers from "../models/virtualMachineScaleSetsMappers"; import * as Parameters from "../models/parameters"; import { ComputeManagementClientContext } from "../computeManagementClientContext"; /** Class representing a VirtualMachineScaleSets. */ export class VirtualMachineScaleSets { private readonly client: ComputeManagementClientContext; /** * Create a VirtualMachineScaleSets. * @param {ComputeManagementClientContext} client Reference to the service client. */ constructor(client: ComputeManagementClientContext) { this.client = client; } /** * Create or update a VM scale set. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set to create or update. * @param parameters The scale set object. * @param [options] The optional parameters * @returns Promise */ createOrUpdate(resourceGroupName: string, vmScaleSetName: string, parameters: Models.VirtualMachineScaleSet, options?: msRest.RequestOptionsBase): Promise { return this.beginCreateOrUpdate(resourceGroupName,vmScaleSetName,parameters,options) .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } /** * Update a VM scale set. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set to create or update. * @param parameters The scale set object. * @param [options] The optional parameters * @returns Promise */ update(resourceGroupName: string, vmScaleSetName: string, parameters: Models.VirtualMachineScaleSetUpdate, options?: msRest.RequestOptionsBase): Promise { return this.beginUpdate(resourceGroupName,vmScaleSetName,parameters,options) .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } /** * Deletes a VM scale set. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param [options] The optional parameters * @returns Promise */ deleteMethod(resourceGroupName: string, vmScaleSetName: string, options?: msRest.RequestOptionsBase): Promise { return this.beginDeleteMethod(resourceGroupName,vmScaleSetName,options) .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } /** * Display information about a virtual machine scale set. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param [options] The optional parameters * @returns Promise */ get(resourceGroupName: string, vmScaleSetName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param callback The callback */ get(resourceGroupName: string, vmScaleSetName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param options The optional parameters * @param callback The callback */ get(resourceGroupName: string, vmScaleSetName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; get(resourceGroupName: string, vmScaleSetName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, vmScaleSetName, options }, getOperationSpec, callback) as Promise; } /** * Deallocates specific virtual machines in a VM scale set. Shuts down the virtual machines and * releases the compute resources. You are not billed for the compute resources that this virtual * machine scale set deallocates. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param [options] The optional parameters * @returns Promise */ deallocate(resourceGroupName: string, vmScaleSetName: string, options?: Models.VirtualMachineScaleSetsDeallocateOptionalParams): Promise { return this.beginDeallocate(resourceGroupName,vmScaleSetName,options) .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } /** * Deletes virtual machines in a VM scale set. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param vmInstanceIDs A list of virtual machine instance IDs from the VM scale set. * @param [options] The optional parameters * @returns Promise */ deleteInstances(resourceGroupName: string, vmScaleSetName: string, vmInstanceIDs: Models.VirtualMachineScaleSetVMInstanceRequiredIDs, options?: msRest.RequestOptionsBase): Promise { return this.beginDeleteInstances(resourceGroupName,vmScaleSetName,vmInstanceIDs,options) .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } /** * Gets the status of a VM scale set instance. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param [options] The optional parameters * @returns Promise */ getInstanceView(resourceGroupName: string, vmScaleSetName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param callback The callback */ getInstanceView(resourceGroupName: string, vmScaleSetName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param options The optional parameters * @param callback The callback */ getInstanceView(resourceGroupName: string, vmScaleSetName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; getInstanceView(resourceGroupName: string, vmScaleSetName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, vmScaleSetName, options }, getInstanceViewOperationSpec, callback) as Promise; } /** * Gets a list of all VM scale sets under a resource group. * @param resourceGroupName The name of the resource group. * @param [options] The optional parameters * @returns Promise */ list(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName The name of the resource group. * @param callback The callback */ list(resourceGroupName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group. * @param options The optional parameters * @param callback The callback */ list(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; list(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, options }, listOperationSpec, callback) as Promise; } /** * Gets a list of all VM Scale Sets in the subscription, regardless of the associated resource * group. Use nextLink property in the response to get the next page of VM Scale Sets. Do this till * nextLink is null to fetch all the VM Scale Sets. * @param [options] The optional parameters * @returns Promise */ listAll(options?: msRest.RequestOptionsBase): Promise; /** * @param callback The callback */ listAll(callback: msRest.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ listAll(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; listAll(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { options }, listAllOperationSpec, callback) as Promise; } /** * Gets a list of SKUs available for your VM scale set, including the minimum and maximum VM * instances allowed for each SKU. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param [options] The optional parameters * @returns Promise */ listSkus(resourceGroupName: string, vmScaleSetName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param callback The callback */ listSkus(resourceGroupName: string, vmScaleSetName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param options The optional parameters * @param callback The callback */ listSkus(resourceGroupName: string, vmScaleSetName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; listSkus(resourceGroupName: string, vmScaleSetName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, vmScaleSetName, options }, listSkusOperationSpec, callback) as Promise; } /** * Gets list of OS upgrades on a VM scale set instance. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param [options] The optional parameters * @returns Promise */ getOSUpgradeHistory(resourceGroupName: string, vmScaleSetName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param callback The callback */ getOSUpgradeHistory(resourceGroupName: string, vmScaleSetName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param options The optional parameters * @param callback The callback */ getOSUpgradeHistory(resourceGroupName: string, vmScaleSetName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; getOSUpgradeHistory(resourceGroupName: string, vmScaleSetName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, vmScaleSetName, options }, getOSUpgradeHistoryOperationSpec, callback) as Promise; } /** * Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still * attached and you are getting charged for the resources. Instead, use deallocate to release * resources and avoid charges. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param [options] The optional parameters * @returns Promise */ powerOff(resourceGroupName: string, vmScaleSetName: string, options?: Models.VirtualMachineScaleSetsPowerOffOptionalParams): Promise { return this.beginPowerOff(resourceGroupName,vmScaleSetName,options) .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } /** * Restarts one or more virtual machines in a VM scale set. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param [options] The optional parameters * @returns Promise */ restart(resourceGroupName: string, vmScaleSetName: string, options?: Models.VirtualMachineScaleSetsRestartOptionalParams): Promise { return this.beginRestart(resourceGroupName,vmScaleSetName,options) .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } /** * Starts one or more virtual machines in a VM scale set. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param [options] The optional parameters * @returns Promise */ start(resourceGroupName: string, vmScaleSetName: string, options?: Models.VirtualMachineScaleSetsStartOptionalParams): Promise { return this.beginStart(resourceGroupName,vmScaleSetName,options) .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } /** * Redeploy one or more virtual machines in a VM scale set. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param [options] The optional parameters * @returns Promise */ redeploy(resourceGroupName: string, vmScaleSetName: string, options?: Models.VirtualMachineScaleSetsRedeployOptionalParams): Promise { return this.beginRedeploy(resourceGroupName,vmScaleSetName,options) .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } /** * Perform maintenance on one or more virtual machines in a VM scale set. Operation on instances * which are not eligible for perform maintenance will be failed. Please refer to best practices * for more details: * https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param [options] The optional parameters * @returns Promise */ performMaintenance(resourceGroupName: string, vmScaleSetName: string, options?: Models.VirtualMachineScaleSetsPerformMaintenanceOptionalParams): Promise { return this.beginPerformMaintenance(resourceGroupName,vmScaleSetName,options) .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } /** * Upgrades one or more virtual machines to the latest SKU set in the VM scale set model. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param vmInstanceIDs A list of virtual machine instance IDs from the VM scale set. * @param [options] The optional parameters * @returns Promise */ updateInstances(resourceGroupName: string, vmScaleSetName: string, vmInstanceIDs: Models.VirtualMachineScaleSetVMInstanceRequiredIDs, options?: msRest.RequestOptionsBase): Promise { return this.beginUpdateInstances(resourceGroupName,vmScaleSetName,vmInstanceIDs,options) .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } /** * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param [options] The optional parameters * @returns Promise */ reimage(resourceGroupName: string, vmScaleSetName: string, options?: Models.VirtualMachineScaleSetsReimageOptionalParams): Promise { return this.beginReimage(resourceGroupName,vmScaleSetName,options) .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } /** * Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This * operation is only supported for managed disks. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param [options] The optional parameters * @returns Promise */ reimageAll(resourceGroupName: string, vmScaleSetName: string, options?: Models.VirtualMachineScaleSetsReimageAllOptionalParams): Promise { return this.beginReimageAll(resourceGroupName,vmScaleSetName,options) .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } /** * Manual platform update domain walk to update virtual machines in a service fabric virtual * machine scale set. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param platformUpdateDomain The platform update domain for which a manual recovery walk is * requested * @param [options] The optional parameters * @returns * Promise */ forceRecoveryServiceFabricPlatformUpdateDomainWalk(resourceGroupName: string, vmScaleSetName: string, platformUpdateDomain: number, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param platformUpdateDomain The platform update domain for which a manual recovery walk is * requested * @param callback The callback */ forceRecoveryServiceFabricPlatformUpdateDomainWalk(resourceGroupName: string, vmScaleSetName: string, platformUpdateDomain: number, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param platformUpdateDomain The platform update domain for which a manual recovery walk is * requested * @param options The optional parameters * @param callback The callback */ forceRecoveryServiceFabricPlatformUpdateDomainWalk(resourceGroupName: string, vmScaleSetName: string, platformUpdateDomain: number, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; forceRecoveryServiceFabricPlatformUpdateDomainWalk(resourceGroupName: string, vmScaleSetName: string, platformUpdateDomain: number, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, vmScaleSetName, platformUpdateDomain, options }, forceRecoveryServiceFabricPlatformUpdateDomainWalkOperationSpec, callback) as Promise; } /** * Create or update a VM scale set. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set to create or update. * @param parameters The scale set object. * @param [options] The optional parameters * @returns Promise */ beginCreateOrUpdate(resourceGroupName: string, vmScaleSetName: string, parameters: Models.VirtualMachineScaleSet, options?: msRest.RequestOptionsBase): Promise { return this.client.sendLRORequest( { resourceGroupName, vmScaleSetName, parameters, options }, beginCreateOrUpdateOperationSpec, options); } /** * Update a VM scale set. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set to create or update. * @param parameters The scale set object. * @param [options] The optional parameters * @returns Promise */ beginUpdate(resourceGroupName: string, vmScaleSetName: string, parameters: Models.VirtualMachineScaleSetUpdate, options?: msRest.RequestOptionsBase): Promise { return this.client.sendLRORequest( { resourceGroupName, vmScaleSetName, parameters, options }, beginUpdateOperationSpec, options); } /** * Deletes a VM scale set. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param [options] The optional parameters * @returns Promise */ beginDeleteMethod(resourceGroupName: string, vmScaleSetName: string, options?: msRest.RequestOptionsBase): Promise { return this.client.sendLRORequest( { resourceGroupName, vmScaleSetName, options }, beginDeleteMethodOperationSpec, options); } /** * Deallocates specific virtual machines in a VM scale set. Shuts down the virtual machines and * releases the compute resources. You are not billed for the compute resources that this virtual * machine scale set deallocates. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param [options] The optional parameters * @returns Promise */ beginDeallocate(resourceGroupName: string, vmScaleSetName: string, options?: Models.VirtualMachineScaleSetsBeginDeallocateOptionalParams): Promise { return this.client.sendLRORequest( { resourceGroupName, vmScaleSetName, options }, beginDeallocateOperationSpec, options); } /** * Deletes virtual machines in a VM scale set. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param vmInstanceIDs A list of virtual machine instance IDs from the VM scale set. * @param [options] The optional parameters * @returns Promise */ beginDeleteInstances(resourceGroupName: string, vmScaleSetName: string, vmInstanceIDs: Models.VirtualMachineScaleSetVMInstanceRequiredIDs, options?: msRest.RequestOptionsBase): Promise { return this.client.sendLRORequest( { resourceGroupName, vmScaleSetName, vmInstanceIDs, options }, beginDeleteInstancesOperationSpec, options); } /** * Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still * attached and you are getting charged for the resources. Instead, use deallocate to release * resources and avoid charges. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param [options] The optional parameters * @returns Promise */ beginPowerOff(resourceGroupName: string, vmScaleSetName: string, options?: Models.VirtualMachineScaleSetsBeginPowerOffOptionalParams): Promise { return this.client.sendLRORequest( { resourceGroupName, vmScaleSetName, options }, beginPowerOffOperationSpec, options); } /** * Restarts one or more virtual machines in a VM scale set. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param [options] The optional parameters * @returns Promise */ beginRestart(resourceGroupName: string, vmScaleSetName: string, options?: Models.VirtualMachineScaleSetsBeginRestartOptionalParams): Promise { return this.client.sendLRORequest( { resourceGroupName, vmScaleSetName, options }, beginRestartOperationSpec, options); } /** * Starts one or more virtual machines in a VM scale set. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param [options] The optional parameters * @returns Promise */ beginStart(resourceGroupName: string, vmScaleSetName: string, options?: Models.VirtualMachineScaleSetsBeginStartOptionalParams): Promise { return this.client.sendLRORequest( { resourceGroupName, vmScaleSetName, options }, beginStartOperationSpec, options); } /** * Redeploy one or more virtual machines in a VM scale set. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param [options] The optional parameters * @returns Promise */ beginRedeploy(resourceGroupName: string, vmScaleSetName: string, options?: Models.VirtualMachineScaleSetsBeginRedeployOptionalParams): Promise { return this.client.sendLRORequest( { resourceGroupName, vmScaleSetName, options }, beginRedeployOperationSpec, options); } /** * Perform maintenance on one or more virtual machines in a VM scale set. Operation on instances * which are not eligible for perform maintenance will be failed. Please refer to best practices * for more details: * https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param [options] The optional parameters * @returns Promise */ beginPerformMaintenance(resourceGroupName: string, vmScaleSetName: string, options?: Models.VirtualMachineScaleSetsBeginPerformMaintenanceOptionalParams): Promise { return this.client.sendLRORequest( { resourceGroupName, vmScaleSetName, options }, beginPerformMaintenanceOperationSpec, options); } /** * Upgrades one or more virtual machines to the latest SKU set in the VM scale set model. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param vmInstanceIDs A list of virtual machine instance IDs from the VM scale set. * @param [options] The optional parameters * @returns Promise */ beginUpdateInstances(resourceGroupName: string, vmScaleSetName: string, vmInstanceIDs: Models.VirtualMachineScaleSetVMInstanceRequiredIDs, options?: msRest.RequestOptionsBase): Promise { return this.client.sendLRORequest( { resourceGroupName, vmScaleSetName, vmInstanceIDs, options }, beginUpdateInstancesOperationSpec, options); } /** * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param [options] The optional parameters * @returns Promise */ beginReimage(resourceGroupName: string, vmScaleSetName: string, options?: Models.VirtualMachineScaleSetsBeginReimageOptionalParams): Promise { return this.client.sendLRORequest( { resourceGroupName, vmScaleSetName, options }, beginReimageOperationSpec, options); } /** * Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This * operation is only supported for managed disks. * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param [options] The optional parameters * @returns Promise */ beginReimageAll(resourceGroupName: string, vmScaleSetName: string, options?: Models.VirtualMachineScaleSetsBeginReimageAllOptionalParams): Promise { return this.client.sendLRORequest( { resourceGroupName, vmScaleSetName, options }, beginReimageAllOperationSpec, options); } /** * Gets a list of all VM scale sets under a resource group. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters * @returns Promise */ listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, listNextOperationSpec, callback) as Promise; } /** * Gets a list of all VM Scale Sets in the subscription, regardless of the associated resource * group. Use nextLink property in the response to get the next page of VM Scale Sets. Do this till * nextLink is null to fetch all the VM Scale Sets. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters * @returns Promise */ listAllNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ listAllNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ listAllNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; listAllNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, listAllNextOperationSpec, callback) as Promise; } /** * Gets a list of SKUs available for your VM scale set, including the minimum and maximum VM * instances allowed for each SKU. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters * @returns Promise */ listSkusNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ listSkusNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ listSkusNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; listSkusNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, listSkusNextOperationSpec, callback) as Promise; } /** * Gets list of OS upgrades on a VM scale set instance. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters * @returns Promise */ getOSUpgradeHistoryNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ getOSUpgradeHistoryNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ getOSUpgradeHistoryNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; getOSUpgradeHistoryNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, getOSUpgradeHistoryNextOperationSpec, callback) as Promise; } } // Operation Specifications const serializer = new msRest.Serializer(Mappers); const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}", urlParameters: [ Parameters.resourceGroupName, Parameters.vmScaleSetName, Parameters.subscriptionId ], queryParameters: [ Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage ], responses: { 200: { bodyMapper: Mappers.VirtualMachineScaleSet }, default: { bodyMapper: Mappers.CloudError } }, serializer }; const getInstanceViewOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/instanceView", urlParameters: [ Parameters.resourceGroupName, Parameters.vmScaleSetName, Parameters.subscriptionId ], queryParameters: [ Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage ], responses: { 200: { bodyMapper: Mappers.VirtualMachineScaleSetInstanceView }, default: { bodyMapper: Mappers.CloudError } }, serializer }; const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets", urlParameters: [ Parameters.resourceGroupName, Parameters.subscriptionId ], queryParameters: [ Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage ], responses: { 200: { bodyMapper: Mappers.VirtualMachineScaleSetListResult }, default: { bodyMapper: Mappers.CloudError } }, serializer }; const listAllOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachineScaleSets", urlParameters: [ Parameters.subscriptionId ], queryParameters: [ Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage ], responses: { 200: { bodyMapper: Mappers.VirtualMachineScaleSetListWithLinkResult }, default: { bodyMapper: Mappers.CloudError } }, serializer }; const listSkusOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/skus", urlParameters: [ Parameters.resourceGroupName, Parameters.vmScaleSetName, Parameters.subscriptionId ], queryParameters: [ Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage ], responses: { 200: { bodyMapper: Mappers.VirtualMachineScaleSetListSkusResult }, default: { bodyMapper: Mappers.CloudError } }, serializer }; const getOSUpgradeHistoryOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/osUpgradeHistory", urlParameters: [ Parameters.resourceGroupName, Parameters.vmScaleSetName, Parameters.subscriptionId ], queryParameters: [ Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage ], responses: { 200: { bodyMapper: Mappers.VirtualMachineScaleSetListOSUpgradeHistory }, default: { bodyMapper: Mappers.CloudError } }, serializer }; const forceRecoveryServiceFabricPlatformUpdateDomainWalkOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/forceRecoveryServiceFabricPlatformUpdateDomainWalk", urlParameters: [ Parameters.resourceGroupName, Parameters.vmScaleSetName, Parameters.subscriptionId ], queryParameters: [ Parameters.apiVersion0, Parameters.platformUpdateDomain ], headerParameters: [ Parameters.acceptLanguage ], responses: { 200: { bodyMapper: Mappers.RecoveryWalkResponse }, default: { bodyMapper: Mappers.CloudError } }, serializer }; const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}", urlParameters: [ Parameters.resourceGroupName, Parameters.vmScaleSetName, Parameters.subscriptionId ], queryParameters: [ Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage ], requestBody: { parameterPath: "parameters", mapper: { ...Mappers.VirtualMachineScaleSet, required: true } }, responses: { 200: { bodyMapper: Mappers.VirtualMachineScaleSet }, 201: { bodyMapper: Mappers.VirtualMachineScaleSet }, default: { bodyMapper: Mappers.CloudError } }, serializer }; const beginUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PATCH", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}", urlParameters: [ Parameters.resourceGroupName, Parameters.vmScaleSetName, Parameters.subscriptionId ], queryParameters: [ Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage ], requestBody: { parameterPath: "parameters", mapper: { ...Mappers.VirtualMachineScaleSetUpdate, required: true } }, responses: { 200: { bodyMapper: Mappers.VirtualMachineScaleSet }, default: { bodyMapper: Mappers.CloudError } }, serializer }; const beginDeleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}", urlParameters: [ Parameters.resourceGroupName, Parameters.vmScaleSetName, Parameters.subscriptionId ], queryParameters: [ Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage ], responses: { 200: { bodyMapper: Mappers.OperationStatusResponse }, 202: {}, 204: {}, default: { bodyMapper: Mappers.CloudError } }, serializer }; const beginDeallocateOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/deallocate", urlParameters: [ Parameters.resourceGroupName, Parameters.vmScaleSetName, Parameters.subscriptionId ], queryParameters: [ Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage ], requestBody: { parameterPath: [ "options", "vmInstanceIDs" ], mapper: Mappers.VirtualMachineScaleSetVMInstanceIDs }, responses: { 200: { bodyMapper: Mappers.OperationStatusResponse }, 202: {}, default: { bodyMapper: Mappers.CloudError } }, serializer }; const beginDeleteInstancesOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/delete", urlParameters: [ Parameters.resourceGroupName, Parameters.vmScaleSetName, Parameters.subscriptionId ], queryParameters: [ Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage ], requestBody: { parameterPath: "vmInstanceIDs", mapper: { ...Mappers.VirtualMachineScaleSetVMInstanceRequiredIDs, required: true } }, responses: { 200: { bodyMapper: Mappers.OperationStatusResponse }, 202: {}, default: { bodyMapper: Mappers.CloudError } }, serializer }; const beginPowerOffOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/poweroff", urlParameters: [ Parameters.resourceGroupName, Parameters.vmScaleSetName, Parameters.subscriptionId ], queryParameters: [ Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage ], requestBody: { parameterPath: [ "options", "vmInstanceIDs" ], mapper: Mappers.VirtualMachineScaleSetVMInstanceIDs }, responses: { 200: { bodyMapper: Mappers.OperationStatusResponse }, 202: {}, default: { bodyMapper: Mappers.CloudError } }, serializer }; const beginRestartOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/restart", urlParameters: [ Parameters.resourceGroupName, Parameters.vmScaleSetName, Parameters.subscriptionId ], queryParameters: [ Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage ], requestBody: { parameterPath: [ "options", "vmInstanceIDs" ], mapper: Mappers.VirtualMachineScaleSetVMInstanceIDs }, responses: { 200: { bodyMapper: Mappers.OperationStatusResponse }, 202: {}, default: { bodyMapper: Mappers.CloudError } }, serializer }; const beginStartOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/start", urlParameters: [ Parameters.resourceGroupName, Parameters.vmScaleSetName, Parameters.subscriptionId ], queryParameters: [ Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage ], requestBody: { parameterPath: [ "options", "vmInstanceIDs" ], mapper: Mappers.VirtualMachineScaleSetVMInstanceIDs }, responses: { 200: { bodyMapper: Mappers.OperationStatusResponse }, 202: {}, default: { bodyMapper: Mappers.CloudError } }, serializer }; const beginRedeployOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/redeploy", urlParameters: [ Parameters.resourceGroupName, Parameters.vmScaleSetName, Parameters.subscriptionId ], queryParameters: [ Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage ], requestBody: { parameterPath: [ "options", "vmInstanceIDs" ], mapper: Mappers.VirtualMachineScaleSetVMInstanceIDs }, responses: { 200: { bodyMapper: Mappers.OperationStatusResponse }, 202: {}, default: { bodyMapper: Mappers.CloudError } }, serializer }; const beginPerformMaintenanceOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/performMaintenance", urlParameters: [ Parameters.resourceGroupName, Parameters.vmScaleSetName, Parameters.subscriptionId ], queryParameters: [ Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage ], requestBody: { parameterPath: [ "options", "vmInstanceIDs" ], mapper: Mappers.VirtualMachineScaleSetVMInstanceIDs }, responses: { 200: { bodyMapper: Mappers.OperationStatusResponse }, 202: {}, default: { bodyMapper: Mappers.CloudError } }, serializer }; const beginUpdateInstancesOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/manualupgrade", urlParameters: [ Parameters.resourceGroupName, Parameters.vmScaleSetName, Parameters.subscriptionId ], queryParameters: [ Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage ], requestBody: { parameterPath: "vmInstanceIDs", mapper: { ...Mappers.VirtualMachineScaleSetVMInstanceRequiredIDs, required: true } }, responses: { 200: { bodyMapper: Mappers.OperationStatusResponse }, 202: {}, default: { bodyMapper: Mappers.CloudError } }, serializer }; const beginReimageOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimage", urlParameters: [ Parameters.resourceGroupName, Parameters.vmScaleSetName, Parameters.subscriptionId ], queryParameters: [ Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage ], requestBody: { parameterPath: [ "options", "vmInstanceIDs" ], mapper: Mappers.VirtualMachineScaleSetVMInstanceIDs }, responses: { 200: { bodyMapper: Mappers.OperationStatusResponse }, 202: {}, default: { bodyMapper: Mappers.CloudError } }, serializer }; const beginReimageAllOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimageall", urlParameters: [ Parameters.resourceGroupName, Parameters.vmScaleSetName, Parameters.subscriptionId ], queryParameters: [ Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage ], requestBody: { parameterPath: [ "options", "vmInstanceIDs" ], mapper: Mappers.VirtualMachineScaleSetVMInstanceIDs }, responses: { 200: { bodyMapper: Mappers.OperationStatusResponse }, 202: {}, default: { bodyMapper: Mappers.CloudError } }, serializer }; const listNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", urlParameters: [ Parameters.nextPageLink ], headerParameters: [ Parameters.acceptLanguage ], responses: { 200: { bodyMapper: Mappers.VirtualMachineScaleSetListResult }, default: { bodyMapper: Mappers.CloudError } }, serializer }; const listAllNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", urlParameters: [ Parameters.nextPageLink ], headerParameters: [ Parameters.acceptLanguage ], responses: { 200: { bodyMapper: Mappers.VirtualMachineScaleSetListWithLinkResult }, default: { bodyMapper: Mappers.CloudError } }, serializer }; const listSkusNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", urlParameters: [ Parameters.nextPageLink ], headerParameters: [ Parameters.acceptLanguage ], responses: { 200: { bodyMapper: Mappers.VirtualMachineScaleSetListSkusResult }, default: { bodyMapper: Mappers.CloudError } }, serializer }; const getOSUpgradeHistoryNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", urlParameters: [ Parameters.nextPageLink ], headerParameters: [ Parameters.acceptLanguage ], responses: { 200: { bodyMapper: Mappers.VirtualMachineScaleSetListOSUpgradeHistory }, default: { bodyMapper: Mappers.CloudError } }, serializer };