import { PagedAsyncIterableIterator } from "@azure/core-paging" ; import { VirtualMachineScaleSetVMs } from "../operationsInterfaces" ; import * as coreClient from "@azure/core-client" ; import * as Mappers from "../models/mappers" ; import * as Parameters from "../models/parameters" ; import { ComputeManagementClient } from "../computeManagementClient" ; import { PollerLike , PollOperationState , LroEngine } from "@azure/core-lro" ; import { LroImpl } from "../lroImpl" ; import { VirtualMachineScaleSetVM , VirtualMachineScaleSetVMsListNextOptionalParams , VirtualMachineScaleSetVMsListOptionalParams , VirtualMachineScaleSetVMsReimageOptionalParams , VirtualMachineScaleSetVMsReimageAllOptionalParams , VirtualMachineScaleSetVMsDeallocateOptionalParams , VirtualMachineScaleSetVMsUpdateOptionalParams , VirtualMachineScaleSetVMsUpdateResponse , VirtualMachineScaleSetVMsDeleteOptionalParams , VirtualMachineScaleSetVMsGetOptionalParams , VirtualMachineScaleSetVMsGetResponse , VirtualMachineScaleSetVMsGetInstanceViewOptionalParams , VirtualMachineScaleSetVMsGetInstanceViewResponse , VirtualMachineScaleSetVMsListResponse , VirtualMachineScaleSetVMsPowerOffOptionalParams , VirtualMachineScaleSetVMsRestartOptionalParams , VirtualMachineScaleSetVMsStartOptionalParams , VirtualMachineScaleSetVMsRedeployOptionalParams , VirtualMachineScaleSetVMsRetrieveBootDiagnosticsDataOptionalParams , VirtualMachineScaleSetVMsRetrieveBootDiagnosticsDataResponse , VirtualMachineScaleSetVMsPerformMaintenanceOptionalParams , VirtualMachineScaleSetVMsSimulateEvictionOptionalParams , RunCommandInput , VirtualMachineScaleSetVMsRunCommandOptionalParams , VirtualMachineScaleSetVMsRunCommandResponse , VirtualMachineScaleSetVMsListNextResponse } from "../models" ; /** Class containing VirtualMachineScaleSetVMs operations. */ export class VirtualMachineScaleSetVMsImpl implements VirtualMachineScaleSetVMs { private readonly client : ComputeManagementClient ; param client constructor ( client ) { this . client = client ; } param resourceGroupName param virtualMachineScaleSetName param options public list ( resourceGroupName , virtualMachineScaleSetName , options ? ) { const iter = this . listPagingAll ( resourceGroupName , virtualMachineScaleSetName , options ) ; return { next ( ) { return iter . next ( ) ; } , [ Symbol . asyncIterator ] ( ) { return this ; } , byPage : ( ) => { return this . listPagingPage ( resourceGroupName , virtualMachineScaleSetName , options ) ; } } ; } private async * listPagingPage ( resourceGroupName , virtualMachineScaleSetName , options ? ) { let result = await this . _list ( resourceGroupName , virtualMachineScaleSetName , options ) ; yield result . value || [ ] ; let continuationToken = result . nextLink ; while ( continuationToken ) { result = await this . _listNext ( resourceGroupName , virtualMachineScaleSetName , continuationToken , options ) ; continuationToken = result . nextLink ; yield result . value || [ ] ; } } private async * listPagingAll ( resourceGroupName , virtualMachineScaleSetName , options ? ) { for await ( const page of this . listPagingPage ( resourceGroupName , virtualMachineScaleSetName , options ) ) { yield * page ; } } param resourceGroupName param vmScaleSetName param instanceId param options async beginReimage ( resourceGroupName , vmScaleSetName , instanceId , options ? ) { const directSendOperation = async ( args , spec ) : Promise < void > => { return this . client . sendOperationRequest ( args , spec ) ; } ; const sendOperation = async ( args , spec ) => { let currentRawResponse = undefined ; const providedCallback = args . options ?. onResponse ; const callback = ( rawResponse , flatResponse ) => { currentRawResponse = rawResponse ; providedCallback ?. ( rawResponse , flatResponse ) ; } ; const updatedArgs = { ... args , options : { ... args . options , onResponse : callback } } ; const flatResponse = await directSendOperation ( updatedArgs , spec ) ; return { flatResponse , rawResponse : { statusCode : currentRawResponse ! . status , body : currentRawResponse ! . parsedBody , headers : currentRawResponse ! . headers . toJSON ( ) } } ; } ; const lro = new LroImpl ( sendOperation , { resourceGroupName , vmScaleSetName , instanceId , options } , reimageOperationSpec ) ; return new LroEngine ( lro , { resumeFrom : options ?. resumeFrom , intervalInMs : options ?. updateIntervalInMs } ) ; } param resourceGroupName param vmScaleSetName param instanceId param options async beginReimageAndWait ( resourceGroupName , vmScaleSetName , instanceId , options ? ) { const poller = await this . beginReimage ( resourceGroupName , vmScaleSetName , instanceId , options ) ; return poller . pollUntilDone ( ) ; } param resourceGroupName param vmScaleSetName param instanceId param options async beginReimageAll ( resourceGroupName , vmScaleSetName , instanceId , options ? ) { const directSendOperation = async ( args , spec ) : Promise < void > => { return this . client . sendOperationRequest ( args , spec ) ; } ; const sendOperation = async ( args , spec ) => { let currentRawResponse = undefined ; const providedCallback = args . options ?. onResponse ; const callback = ( rawResponse , flatResponse ) => { currentRawResponse = rawResponse ; providedCallback ?. ( rawResponse , flatResponse ) ; } ; const updatedArgs = { ... args , options : { ... args . options , onResponse : callback } } ; const flatResponse = await directSendOperation ( updatedArgs , spec ) ; return { flatResponse , rawResponse : { statusCode : currentRawResponse ! . status , body : currentRawResponse ! . parsedBody , headers : currentRawResponse ! . headers . toJSON ( ) } } ; } ; const lro = new LroImpl ( sendOperation , { resourceGroupName , vmScaleSetName , instanceId , options } , reimageAllOperationSpec ) ; return new LroEngine ( lro , { resumeFrom : options ?. resumeFrom , intervalInMs : options ?. updateIntervalInMs } ) ; } param resourceGroupName param vmScaleSetName param instanceId param options async beginReimageAllAndWait ( resourceGroupName , vmScaleSetName , instanceId , options ? ) { const poller = await this . beginReimageAll ( resourceGroupName , vmScaleSetName , instanceId , options ) ; return poller . pollUntilDone ( ) ; } param resourceGroupName param vmScaleSetName param instanceId param options async beginDeallocate ( resourceGroupName , vmScaleSetName , instanceId , options ? ) { const directSendOperation = async ( args , spec ) : Promise < void > => { return this . client . sendOperationRequest ( args , spec ) ; } ; const sendOperation = async ( args , spec ) => { let currentRawResponse = undefined ; const providedCallback = args . options ?. onResponse ; const callback = ( rawResponse , flatResponse ) => { currentRawResponse = rawResponse ; providedCallback ?. ( rawResponse , flatResponse ) ; } ; const updatedArgs = { ... args , options : { ... args . options , onResponse : callback } } ; const flatResponse = await directSendOperation ( updatedArgs , spec ) ; return { flatResponse , rawResponse : { statusCode : currentRawResponse ! . status , body : currentRawResponse ! . parsedBody , headers : currentRawResponse ! . headers . toJSON ( ) } } ; } ; const lro = new LroImpl ( sendOperation , { resourceGroupName , vmScaleSetName , instanceId , options } , deallocateOperationSpec ) ; return new LroEngine ( lro , { resumeFrom : options ?. resumeFrom , intervalInMs : options ?. updateIntervalInMs } ) ; } param resourceGroupName param vmScaleSetName param instanceId param options async beginDeallocateAndWait ( resourceGroupName , vmScaleSetName , instanceId , options ? ) { const poller = await this . beginDeallocate ( resourceGroupName , vmScaleSetName , instanceId , options ) ; return poller . pollUntilDone ( ) ; } param resourceGroupName param vmScaleSetName param instanceId param parameters param options async beginUpdate ( resourceGroupName , vmScaleSetName , instanceId , parameters , options ? ) { const directSendOperation = async ( args , spec ) : Promise < VirtualMachineScaleSetVMsUpdateResponse > => { return this . client . sendOperationRequest ( args , spec ) ; } ; const sendOperation = async ( args , spec ) => { let currentRawResponse = undefined ; const providedCallback = args . options ?. onResponse ; const callback = ( rawResponse , flatResponse ) => { currentRawResponse = rawResponse ; providedCallback ?. ( rawResponse , flatResponse ) ; } ; const updatedArgs = { ... args , options : { ... args . options , onResponse : callback } } ; const flatResponse = await directSendOperation ( updatedArgs , spec ) ; return { flatResponse , rawResponse : { statusCode : currentRawResponse ! . status , body : currentRawResponse ! . parsedBody , headers : currentRawResponse ! . headers . toJSON ( ) } } ; } ; const lro = new LroImpl ( sendOperation , { resourceGroupName , vmScaleSetName , instanceId , parameters , options } , updateOperationSpec ) ; return new LroEngine ( lro , { resumeFrom : options ?. resumeFrom , intervalInMs : options ?. updateIntervalInMs } ) ; } param resourceGroupName param vmScaleSetName param instanceId param parameters param options async beginUpdateAndWait ( resourceGroupName , vmScaleSetName , instanceId , parameters , options ? ) { const poller = await this . beginUpdate ( resourceGroupName , vmScaleSetName , instanceId , parameters , options ) ; return poller . pollUntilDone ( ) ; } param resourceGroupName param vmScaleSetName param instanceId param options async beginDelete ( resourceGroupName , vmScaleSetName , instanceId , options ? ) { const directSendOperation = async ( args , spec ) : Promise < void > => { return this . client . sendOperationRequest ( args , spec ) ; } ; const sendOperation = async ( args , spec ) => { let currentRawResponse = undefined ; const providedCallback = args . options ?. onResponse ; const callback = ( rawResponse , flatResponse ) => { currentRawResponse = rawResponse ; providedCallback ?. ( rawResponse , flatResponse ) ; } ; const updatedArgs = { ... args , options : { ... args . options , onResponse : callback } } ; const flatResponse = await directSendOperation ( updatedArgs , spec ) ; return { flatResponse , rawResponse : { statusCode : currentRawResponse ! . status , body : currentRawResponse ! . parsedBody , headers : currentRawResponse ! . headers . toJSON ( ) } } ; } ; const lro = new LroImpl ( sendOperation , { resourceGroupName , vmScaleSetName , instanceId , options } , deleteOperationSpec ) ; return new LroEngine ( lro , { resumeFrom : options ?. resumeFrom , intervalInMs : options ?. updateIntervalInMs } ) ; } param resourceGroupName param vmScaleSetName param instanceId param options async beginDeleteAndWait ( resourceGroupName , vmScaleSetName , instanceId , options ? ) { const poller = await this . beginDelete ( resourceGroupName , vmScaleSetName , instanceId , options ) ; return poller . pollUntilDone ( ) ; } param resourceGroupName param vmScaleSetName param instanceId param options get ( resourceGroupName , vmScaleSetName , instanceId , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , vmScaleSetName , instanceId , options } , getOperationSpec ) ; } param resourceGroupName param vmScaleSetName param instanceId param options getInstanceView ( resourceGroupName , vmScaleSetName , instanceId , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , vmScaleSetName , instanceId , options } , getInstanceViewOperationSpec ) ; } param resourceGroupName param virtualMachineScaleSetName param options private _list ( resourceGroupName , virtualMachineScaleSetName , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , virtualMachineScaleSetName , options } , listOperationSpec ) ; } param resourceGroupName param vmScaleSetName param instanceId param options async beginPowerOff ( resourceGroupName , vmScaleSetName , instanceId , options ? ) { const directSendOperation = async ( args , spec ) : Promise < void > => { return this . client . sendOperationRequest ( args , spec ) ; } ; const sendOperation = async ( args , spec ) => { let currentRawResponse = undefined ; const providedCallback = args . options ?. onResponse ; const callback = ( rawResponse , flatResponse ) => { currentRawResponse = rawResponse ; providedCallback ?. ( rawResponse , flatResponse ) ; } ; const updatedArgs = { ... args , options : { ... args . options , onResponse : callback } } ; const flatResponse = await directSendOperation ( updatedArgs , spec ) ; return { flatResponse , rawResponse : { statusCode : currentRawResponse ! . status , body : currentRawResponse ! . parsedBody , headers : currentRawResponse ! . headers . toJSON ( ) } } ; } ; const lro = new LroImpl ( sendOperation , { resourceGroupName , vmScaleSetName , instanceId , options } , powerOffOperationSpec ) ; return new LroEngine ( lro , { resumeFrom : options ?. resumeFrom , intervalInMs : options ?. updateIntervalInMs } ) ; } param resourceGroupName param vmScaleSetName param instanceId param options async beginPowerOffAndWait ( resourceGroupName , vmScaleSetName , instanceId , options ? ) { const poller = await this . beginPowerOff ( resourceGroupName , vmScaleSetName , instanceId , options ) ; return poller . pollUntilDone ( ) ; } param resourceGroupName param vmScaleSetName param instanceId param options async beginRestart ( resourceGroupName , vmScaleSetName , instanceId , options ? ) { const directSendOperation = async ( args , spec ) : Promise < void > => { return this . client . sendOperationRequest ( args , spec ) ; } ; const sendOperation = async ( args , spec ) => { let currentRawResponse = undefined ; const providedCallback = args . options ?. onResponse ; const callback = ( rawResponse , flatResponse ) => { currentRawResponse = rawResponse ; providedCallback ?. ( rawResponse , flatResponse ) ; } ; const updatedArgs = { ... args , options : { ... args . options , onResponse : callback } } ; const flatResponse = await directSendOperation ( updatedArgs , spec ) ; return { flatResponse , rawResponse : { statusCode : currentRawResponse ! . status , body : currentRawResponse ! . parsedBody , headers : currentRawResponse ! . headers . toJSON ( ) } } ; } ; const lro = new LroImpl ( sendOperation , { resourceGroupName , vmScaleSetName , instanceId , options } , restartOperationSpec ) ; return new LroEngine ( lro , { resumeFrom : options ?. resumeFrom , intervalInMs : options ?. updateIntervalInMs } ) ; } param resourceGroupName param vmScaleSetName param instanceId param options async beginRestartAndWait ( resourceGroupName , vmScaleSetName , instanceId , options ? ) { const poller = await this . beginRestart ( resourceGroupName , vmScaleSetName , instanceId , options ) ; return poller . pollUntilDone ( ) ; } param resourceGroupName param vmScaleSetName param instanceId param options async beginStart ( resourceGroupName , vmScaleSetName , instanceId , options ? ) { const directSendOperation = async ( args , spec ) : Promise < void > => { return this . client . sendOperationRequest ( args , spec ) ; } ; const sendOperation = async ( args , spec ) => { let currentRawResponse = undefined ; const providedCallback = args . options ?. onResponse ; const callback = ( rawResponse , flatResponse ) => { currentRawResponse = rawResponse ; providedCallback ?. ( rawResponse , flatResponse ) ; } ; const updatedArgs = { ... args , options : { ... args . options , onResponse : callback } } ; const flatResponse = await directSendOperation ( updatedArgs , spec ) ; return { flatResponse , rawResponse : { statusCode : currentRawResponse ! . status , body : currentRawResponse ! . parsedBody , headers : currentRawResponse ! . headers . toJSON ( ) } } ; } ; const lro = new LroImpl ( sendOperation , { resourceGroupName , vmScaleSetName , instanceId , options } , startOperationSpec ) ; return new LroEngine ( lro , { resumeFrom : options ?. resumeFrom , intervalInMs : options ?. updateIntervalInMs } ) ; } param resourceGroupName param vmScaleSetName param instanceId param options async beginStartAndWait ( resourceGroupName , vmScaleSetName , instanceId , options ? ) { const poller = await this . beginStart ( resourceGroupName , vmScaleSetName , instanceId , options ) ; return poller . pollUntilDone ( ) ; } param resourceGroupName param vmScaleSetName param instanceId param options async beginRedeploy ( resourceGroupName , vmScaleSetName , instanceId , options ? ) { const directSendOperation = async ( args , spec ) : Promise < void > => { return this . client . sendOperationRequest ( args , spec ) ; } ; const sendOperation = async ( args , spec ) => { let currentRawResponse = undefined ; const providedCallback = args . options ?. onResponse ; const callback = ( rawResponse , flatResponse ) => { currentRawResponse = rawResponse ; providedCallback ?. ( rawResponse , flatResponse ) ; } ; const updatedArgs = { ... args , options : { ... args . options , onResponse : callback } } ; const flatResponse = await directSendOperation ( updatedArgs , spec ) ; return { flatResponse , rawResponse : { statusCode : currentRawResponse ! . status , body : currentRawResponse ! . parsedBody , headers : currentRawResponse ! . headers . toJSON ( ) } } ; } ; const lro = new LroImpl ( sendOperation , { resourceGroupName , vmScaleSetName , instanceId , options } , redeployOperationSpec ) ; return new LroEngine ( lro , { resumeFrom : options ?. resumeFrom , intervalInMs : options ?. updateIntervalInMs } ) ; } param resourceGroupName param vmScaleSetName param instanceId param options async beginRedeployAndWait ( resourceGroupName , vmScaleSetName , instanceId , options ? ) { const poller = await this . beginRedeploy ( resourceGroupName , vmScaleSetName , instanceId , options ) ; return poller . pollUntilDone ( ) ; } param resourceGroupName param vmScaleSetName param instanceId param options retrieveBootDiagnosticsData ( resourceGroupName , vmScaleSetName , instanceId , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , vmScaleSetName , instanceId , options } , retrieveBootDiagnosticsDataOperationSpec ) ; } param resourceGroupName param vmScaleSetName param instanceId param options async beginPerformMaintenance ( resourceGroupName , vmScaleSetName , instanceId , options ? ) { const directSendOperation = async ( args , spec ) : Promise < void > => { return this . client . sendOperationRequest ( args , spec ) ; } ; const sendOperation = async ( args , spec ) => { let currentRawResponse = undefined ; const providedCallback = args . options ?. onResponse ; const callback = ( rawResponse , flatResponse ) => { currentRawResponse = rawResponse ; providedCallback ?. ( rawResponse , flatResponse ) ; } ; const updatedArgs = { ... args , options : { ... args . options , onResponse : callback } } ; const flatResponse = await directSendOperation ( updatedArgs , spec ) ; return { flatResponse , rawResponse : { statusCode : currentRawResponse ! . status , body : currentRawResponse ! . parsedBody , headers : currentRawResponse ! . headers . toJSON ( ) } } ; } ; const lro = new LroImpl ( sendOperation , { resourceGroupName , vmScaleSetName , instanceId , options } , performMaintenanceOperationSpec ) ; return new LroEngine ( lro , { resumeFrom : options ?. resumeFrom , intervalInMs : options ?. updateIntervalInMs } ) ; } param resourceGroupName param vmScaleSetName param instanceId param options async beginPerformMaintenanceAndWait ( resourceGroupName , vmScaleSetName , instanceId , options ? ) { const poller = await this . beginPerformMaintenance ( resourceGroupName , vmScaleSetName , instanceId , options ) ; return poller . pollUntilDone ( ) ; } param resourceGroupName param vmScaleSetName param instanceId param options simulateEviction ( resourceGroupName , vmScaleSetName , instanceId , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , vmScaleSetName , instanceId , options } , simulateEvictionOperationSpec ) ; } param resourceGroupName param vmScaleSetName param instanceId param parameters param options async beginRunCommand ( resourceGroupName , vmScaleSetName , instanceId , parameters , options ? ) { const directSendOperation = async ( args , spec ) : Promise < VirtualMachineScaleSetVMsRunCommandResponse > => { return this . client . sendOperationRequest ( args , spec ) ; } ; const sendOperation = async ( args , spec ) => { let currentRawResponse = undefined ; const providedCallback = args . options ?. onResponse ; const callback = ( rawResponse , flatResponse ) => { currentRawResponse = rawResponse ; providedCallback ?. ( rawResponse , flatResponse ) ; } ; const updatedArgs = { ... args , options : { ... args . options , onResponse : callback } } ; const flatResponse = await directSendOperation ( updatedArgs , spec ) ; return { flatResponse , rawResponse : { statusCode : currentRawResponse ! . status , body : currentRawResponse ! . parsedBody , headers : currentRawResponse ! . headers . toJSON ( ) } } ; } ; const lro = new LroImpl ( sendOperation , { resourceGroupName , vmScaleSetName , instanceId , parameters , options } , runCommandOperationSpec ) ; return new LroEngine ( lro , { resumeFrom : options ?. resumeFrom , intervalInMs : options ?. updateIntervalInMs , lroResourceLocationConfig : "location" } ) ; } param resourceGroupName param vmScaleSetName param instanceId param parameters param options async beginRunCommandAndWait ( resourceGroupName , vmScaleSetName , instanceId , parameters , options ? ) { const poller = await this . beginRunCommand ( resourceGroupName , vmScaleSetName , instanceId , parameters , options ) ; return poller . pollUntilDone ( ) ; } param resourceGroupName param virtualMachineScaleSetName param nextLink param options private _listNext ( resourceGroupName , virtualMachineScaleSetName , nextLink , options ? ) { return this . client . sendOperationRequest ( { resourceGroupName , virtualMachineScaleSetName , nextLink , options } , listNextOperationSpec ) ; } } const serializer = coreClient . createSerializer ( Mappers , false ) ; const reimageOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/reimage" , httpMethod : "POST" , responses : { 200 : { } , 201 : { } , 202 : { } , 204 : { } } , requestBody : Parameters . vmScaleSetVMReimageInput , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . resourceGroupName , Parameters . subscriptionId , Parameters . vmScaleSetName , Parameters . instanceId ] , headerParameters : [ Parameters . contentType ] , mediaType : "json" , serializer } ; const reimageAllOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/reimageall" , httpMethod : "POST" , responses : { 200 : { } , 201 : { } , 202 : { } , 204 : { } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . resourceGroupName , Parameters . subscriptionId , Parameters . vmScaleSetName , Parameters . instanceId ] , serializer } ; const deallocateOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/deallocate" , httpMethod : "POST" , responses : { 200 : { } , 201 : { } , 202 : { } , 204 : { } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . resourceGroupName , Parameters . subscriptionId , Parameters . vmScaleSetName , Parameters . instanceId ] , serializer } ; const updateOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}" , httpMethod : "PUT" , responses : { 200 : { bodyMapper : Mappers . VirtualMachineScaleSetVM } , 201 : { bodyMapper : Mappers . VirtualMachineScaleSetVM } , 202 : { bodyMapper : Mappers . VirtualMachineScaleSetVM } , 204 : { bodyMapper : Mappers . VirtualMachineScaleSetVM } } , requestBody : Parameters . parameters28 , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . resourceGroupName , Parameters . subscriptionId , Parameters . vmScaleSetName , Parameters . instanceId ] , headerParameters : [ Parameters . accept , Parameters . contentType ] , mediaType : "json" , serializer } ; const deleteOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}" , httpMethod : "DELETE" , responses : { 200 : { } , 201 : { } , 202 : { } , 204 : { } } , queryParameters : [ Parameters . apiVersion , Parameters . forceDeletion ] , urlParameters : [ Parameters . $host , Parameters . resourceGroupName , Parameters . subscriptionId , Parameters . vmScaleSetName , Parameters . instanceId ] , serializer } ; const getOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}" , httpMethod : "GET" , responses : { 200 : { bodyMapper : Mappers . VirtualMachineScaleSetVM } } , queryParameters : [ Parameters . apiVersion , Parameters . expand1 ] , urlParameters : [ Parameters . $host , Parameters . resourceGroupName , Parameters . subscriptionId , Parameters . vmScaleSetName , Parameters . instanceId ] , headerParameters : [ Parameters . accept ] , serializer } ; const getInstanceViewOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/instanceView" , httpMethod : "GET" , responses : { 200 : { bodyMapper : Mappers . VirtualMachineScaleSetVMInstanceView } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . resourceGroupName , Parameters . subscriptionId , Parameters . vmScaleSetName , Parameters . instanceId ] , headerParameters : [ Parameters . accept ] , serializer } ; const listOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines" , httpMethod : "GET" , responses : { 200 : { bodyMapper : Mappers . VirtualMachineScaleSetVMListResult } } , queryParameters : [ Parameters . apiVersion , Parameters . expand , Parameters . filter , Parameters . select ] , urlParameters : [ Parameters . $host , Parameters . resourceGroupName , Parameters . subscriptionId , Parameters . virtualMachineScaleSetName ] , headerParameters : [ Parameters . accept ] , serializer } ; const powerOffOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/poweroff" , httpMethod : "POST" , responses : { 200 : { } , 201 : { } , 202 : { } , 204 : { } } , queryParameters : [ Parameters . apiVersion , Parameters . skipShutdown ] , urlParameters : [ Parameters . $host , Parameters . resourceGroupName , Parameters . subscriptionId , Parameters . vmScaleSetName , Parameters . instanceId ] , serializer } ; const restartOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/restart" , httpMethod : "POST" , responses : { 200 : { } , 201 : { } , 202 : { } , 204 : { } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . resourceGroupName , Parameters . subscriptionId , Parameters . vmScaleSetName , Parameters . instanceId ] , serializer } ; const startOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/start" , httpMethod : "POST" , responses : { 200 : { } , 201 : { } , 202 : { } , 204 : { } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . resourceGroupName , Parameters . subscriptionId , Parameters . vmScaleSetName , Parameters . instanceId ] , serializer } ; const redeployOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/redeploy" , httpMethod : "POST" , responses : { 200 : { } , 201 : { } , 202 : { } , 204 : { } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . resourceGroupName , Parameters . subscriptionId , Parameters . vmScaleSetName , Parameters . instanceId ] , serializer } ; const retrieveBootDiagnosticsDataOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/retrieveBootDiagnosticsData" , httpMethod : "POST" , responses : { 200 : { bodyMapper : Mappers . RetrieveBootDiagnosticsDataResult } , default : { bodyMapper : Mappers . CloudError } } , queryParameters : [ Parameters . apiVersion , Parameters . sasUriExpirationTimeInMinutes ] , urlParameters : [ Parameters . $host , Parameters . resourceGroupName , Parameters . subscriptionId , Parameters . vmScaleSetName , Parameters . instanceId ] , headerParameters : [ Parameters . accept ] , serializer } ; const performMaintenanceOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/performMaintenance" , httpMethod : "POST" , responses : { 200 : { } , 201 : { } , 202 : { } , 204 : { } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . resourceGroupName , Parameters . subscriptionId , Parameters . vmScaleSetName , Parameters . instanceId ] , serializer } ; const simulateEvictionOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/simulateEviction" , httpMethod : "POST" , responses : { 204 : { } } , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . resourceGroupName , Parameters . subscriptionId , Parameters . vmScaleSetName , Parameters . instanceId ] , serializer } ; const runCommandOperationSpec = { path : "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/runCommand" , httpMethod : "POST" , responses : { 200 : { bodyMapper : Mappers . RunCommandResult } , 201 : { bodyMapper : Mappers . RunCommandResult } , 202 : { bodyMapper : Mappers . RunCommandResult } , 204 : { bodyMapper : Mappers . RunCommandResult } } , requestBody : Parameters . parameters14 , queryParameters : [ Parameters . apiVersion ] , urlParameters : [ Parameters . $host , Parameters . resourceGroupName , Parameters . subscriptionId , Parameters . vmScaleSetName , Parameters . instanceId ] , headerParameters : [ Parameters . contentType , Parameters . accept1 ] , mediaType : "json" , serializer } ; const listNextOperationSpec = { path : "{nextLink}" , httpMethod : "GET" , responses : { 200 : { bodyMapper : Mappers . VirtualMachineScaleSetVMListResult } } , queryParameters : [ Parameters . apiVersion , Parameters . expand , Parameters . filter , Parameters . select ] , urlParameters : [ Parameters . $host , Parameters . resourceGroupName , Parameters . subscriptionId , Parameters . nextLink , Parameters . virtualMachineScaleSetName ] , headerParameters : [ Parameters . accept ] , serializer } ;