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.
/** * 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. */
package com.microsoft.azure.management.compute.implementation; import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsGet; import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsDelete; import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsListing; import retrofit2.Retrofit; import com.google.common.reflect.TypeToken; import com.microsoft.azure.AzureServiceFuture; import com.microsoft.azure.CloudException; import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.management.compute.OrchestrationServiceStateAction; import com.microsoft.azure.management.compute.OrchestrationServiceStateInput; import com.microsoft.azure.management.compute.VirtualMachineScaleSetReimageParameters; import com.microsoft.azure.management.compute.VirtualMachineScaleSetUpdate; import com.microsoft.azure.management.compute.VirtualMachineScaleSetVMInstanceIDs; import com.microsoft.azure.management.compute.VirtualMachineScaleSetVMInstanceRequiredIDs; import com.microsoft.azure.management.compute.VMScaleSetConvertToSinglePlacementGroupInput; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; import com.microsoft.rest.ServiceResponse; import com.microsoft.rest.Validator; import java.io.IOException; import java.util.List; import okhttp3.ResponseBody; import retrofit2.http.Body; import retrofit2.http.GET; import retrofit2.http.Header; import retrofit2.http.Headers; import retrofit2.http.HTTP; import retrofit2.http.PATCH; import retrofit2.http.Path; import retrofit2.http.POST; import retrofit2.http.PUT; import retrofit2.http.Query; import retrofit2.http.Url; import retrofit2.Response; import rx.functions.Func1; import rx.Observable;
An instance of this class provides access to all the operations defined in VirtualMachineScaleSets.
/** * An instance of this class provides access to all the operations defined * in VirtualMachineScaleSets. */
public class VirtualMachineScaleSetsInner implements InnerSupportsGet<VirtualMachineScaleSetInner>, InnerSupportsDelete<Void>, InnerSupportsListing<VirtualMachineScaleSetInner> {
The Retrofit service to perform REST calls.
/** The Retrofit service to perform REST calls. */
private VirtualMachineScaleSetsService service;
The service client containing this operation class.
/** The service client containing this operation class. */
private ComputeManagementClientImpl client;
Initializes an instance of VirtualMachineScaleSetsInner.
Params:
  • retrofit – the Retrofit instance built from a Retrofit Builder.
  • client – the instance of the service client containing this operation class.
/** * Initializes an instance of VirtualMachineScaleSetsInner. * * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */
public VirtualMachineScaleSetsInner(Retrofit retrofit, ComputeManagementClientImpl client) { this.service = retrofit.create(VirtualMachineScaleSetsService.class); this.client = client; }
The interface defining all the services for VirtualMachineScaleSets to be used by Retrofit to perform actually REST calls.
/** * The interface defining all the services for VirtualMachineScaleSets to be * used by Retrofit to perform actually REST calls. */
interface VirtualMachineScaleSetsService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets listByLocation" }) @GET("subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/virtualMachineScaleSets") Observable<Response<ResponseBody>> listByLocation(@Path("location") String location, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets createOrUpdate" }) @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}") Observable<Response<ResponseBody>> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Body VirtualMachineScaleSetInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets beginCreateOrUpdate" }) @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}") Observable<Response<ResponseBody>> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Body VirtualMachineScaleSetInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets update" }) @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}") Observable<Response<ResponseBody>> update(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Body VirtualMachineScaleSetUpdate parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets beginUpdate" }) @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}") Observable<Response<ResponseBody>> beginUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Body VirtualMachineScaleSetUpdate parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets delete" }) @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}", method = "DELETE", hasBody = true) Observable<Response<ResponseBody>> delete(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("forceDeletion") Boolean forceDeletion, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets beginDelete" }) @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}", method = "DELETE", hasBody = true) Observable<Response<ResponseBody>> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("forceDeletion") Boolean forceDeletion, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets getByResourceGroup" }) @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}") Observable<Response<ResponseBody>> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets deallocate" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/deallocate") Observable<Response<ResponseBody>> deallocate(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets beginDeallocate" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/deallocate") Observable<Response<ResponseBody>> beginDeallocate(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets deleteInstances" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/delete") Observable<Response<ResponseBody>> deleteInstances(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("forceDeletion") Boolean forceDeletion, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VirtualMachineScaleSetVMInstanceRequiredIDs vmInstanceIDs, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets beginDeleteInstances" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/delete") Observable<Response<ResponseBody>> beginDeleteInstances(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("forceDeletion") Boolean forceDeletion, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VirtualMachineScaleSetVMInstanceRequiredIDs vmInstanceIDs, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets getInstanceView" }) @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/instanceView") Observable<Response<ResponseBody>> getInstanceView(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets listByResourceGroup" }) @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets") Observable<Response<ResponseBody>> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets list" }) @GET("subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachineScaleSets") Observable<Response<ResponseBody>> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets listSkus" }) @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/skus") Observable<Response<ResponseBody>> listSkus(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets getOSUpgradeHistory" }) @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/osUpgradeHistory") Observable<Response<ResponseBody>> getOSUpgradeHistory(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets powerOff" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/poweroff") Observable<Response<ResponseBody>> powerOff(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("skipShutdown") Boolean skipShutdown, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets beginPowerOff" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/poweroff") Observable<Response<ResponseBody>> beginPowerOff(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("skipShutdown") Boolean skipShutdown, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets restart" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/restart") Observable<Response<ResponseBody>> restart(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets beginRestart" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/restart") Observable<Response<ResponseBody>> beginRestart(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets start" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/start") Observable<Response<ResponseBody>> start(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets beginStart" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/start") Observable<Response<ResponseBody>> beginStart(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets redeploy" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/redeploy") Observable<Response<ResponseBody>> redeploy(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets beginRedeploy" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/redeploy") Observable<Response<ResponseBody>> beginRedeploy(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets performMaintenance" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/performMaintenance") Observable<Response<ResponseBody>> performMaintenance(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets beginPerformMaintenance" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/performMaintenance") Observable<Response<ResponseBody>> beginPerformMaintenance(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets updateInstances" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/manualupgrade") Observable<Response<ResponseBody>> updateInstances(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VirtualMachineScaleSetVMInstanceRequiredIDs vmInstanceIDs, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets beginUpdateInstances" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/manualupgrade") Observable<Response<ResponseBody>> beginUpdateInstances(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VirtualMachineScaleSetVMInstanceRequiredIDs vmInstanceIDs, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets reimage" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimage") Observable<Response<ResponseBody>> reimage(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Body VirtualMachineScaleSetReimageParameters vmScaleSetReimageInput, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets beginReimage" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimage") Observable<Response<ResponseBody>> beginReimage(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Body VirtualMachineScaleSetReimageParameters vmScaleSetReimageInput, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets reimageAll" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimageall") Observable<Response<ResponseBody>> reimageAll(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets beginReimageAll" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimageall") Observable<Response<ResponseBody>> beginReimageAll(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets forceRecoveryServiceFabricPlatformUpdateDomainWalk" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/forceRecoveryServiceFabricPlatformUpdateDomainWalk") Observable<Response<ResponseBody>> forceRecoveryServiceFabricPlatformUpdateDomainWalk(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("platformUpdateDomain") int platformUpdateDomain, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets convertToSinglePlacementGroup" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/convertToSinglePlacementGroup") Observable<Response<ResponseBody>> convertToSinglePlacementGroup(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VMScaleSetConvertToSinglePlacementGroupInput parameters, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets setOrchestrationServiceState" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/setOrchestrationServiceState") Observable<Response<ResponseBody>> setOrchestrationServiceState(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body OrchestrationServiceStateInput parameters, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets beginSetOrchestrationServiceState" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/setOrchestrationServiceState") Observable<Response<ResponseBody>> beginSetOrchestrationServiceState(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body OrchestrationServiceStateInput parameters, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets listByLocationNext" }) @GET Observable<Response<ResponseBody>> listByLocationNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets listByResourceGroupNext" }) @GET Observable<Response<ResponseBody>> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets listNext" }) @GET Observable<Response<ResponseBody>> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets listSkusNext" }) @GET Observable<Response<ResponseBody>> listSkusNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets getOSUpgradeHistoryNext" }) @GET Observable<Response<ResponseBody>> getOSUpgradeHistoryNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); }
Gets all the VM scale sets under the specified subscription for the specified location.
Params:
  • location – The location for which VM scale sets under the subscription are queried.
Throws:
Returns:the PagedList<VirtualMachineScaleSetInner> object if successful.
/** * Gets all the VM scale sets under the specified subscription for the specified location. * * @param location The location for which VM scale sets under the subscription are queried. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList&lt;VirtualMachineScaleSetInner&gt; object if successful. */
public PagedList<VirtualMachineScaleSetInner> listByLocation(final String location) { ServiceResponse<Page<VirtualMachineScaleSetInner>> response = listByLocationSinglePageAsync(location).toBlocking().single(); return new PagedList<VirtualMachineScaleSetInner>(response.body()) { @Override public Page<VirtualMachineScaleSetInner> nextPage(String nextPageLink) { return listByLocationNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
Gets all the VM scale sets under the specified subscription for the specified location.
Params:
  • location – The location for which VM scale sets under the subscription are queried.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Gets all the VM scale sets under the specified subscription for the specified location. * * @param location The location for which VM scale sets under the subscription are queried. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<List<VirtualMachineScaleSetInner>> listByLocationAsync(final String location, final ListOperationCallback<VirtualMachineScaleSetInner> serviceCallback) { return AzureServiceFuture.fromPageResponse( listByLocationSinglePageAsync(location), new Func1<String, Observable<ServiceResponse<Page<VirtualMachineScaleSetInner>>>>() { @Override public Observable<ServiceResponse<Page<VirtualMachineScaleSetInner>>> call(String nextPageLink) { return listByLocationNextSinglePageAsync(nextPageLink); } }, serviceCallback); }
Gets all the VM scale sets under the specified subscription for the specified location.
Params:
  • location – The location for which VM scale sets under the subscription are queried.
Throws:
Returns:the observable to the PagedList<VirtualMachineScaleSetInner> object
/** * Gets all the VM scale sets under the specified subscription for the specified location. * * @param location The location for which VM scale sets under the subscription are queried. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;VirtualMachineScaleSetInner&gt; object */
public Observable<Page<VirtualMachineScaleSetInner>> listByLocationAsync(final String location) { return listByLocationWithServiceResponseAsync(location) .map(new Func1<ServiceResponse<Page<VirtualMachineScaleSetInner>>, Page<VirtualMachineScaleSetInner>>() { @Override public Page<VirtualMachineScaleSetInner> call(ServiceResponse<Page<VirtualMachineScaleSetInner>> response) { return response.body(); } }); }
Gets all the VM scale sets under the specified subscription for the specified location.
Params:
  • location – The location for which VM scale sets under the subscription are queried.
Throws:
Returns:the observable to the PagedList<VirtualMachineScaleSetInner> object
/** * Gets all the VM scale sets under the specified subscription for the specified location. * * @param location The location for which VM scale sets under the subscription are queried. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;VirtualMachineScaleSetInner&gt; object */
public Observable<ServiceResponse<Page<VirtualMachineScaleSetInner>>> listByLocationWithServiceResponseAsync(final String location) { return listByLocationSinglePageAsync(location) .concatMap(new Func1<ServiceResponse<Page<VirtualMachineScaleSetInner>>, Observable<ServiceResponse<Page<VirtualMachineScaleSetInner>>>>() { @Override public Observable<ServiceResponse<Page<VirtualMachineScaleSetInner>>> call(ServiceResponse<Page<VirtualMachineScaleSetInner>> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } return Observable.just(page).concatWith(listByLocationNextWithServiceResponseAsync(nextPageLink)); } }); }
Gets all the VM scale sets under the specified subscription for the specified location. ServiceResponse> * @param location The location for which VM scale sets under the subscription are queried.
Throws:
Returns:the PagedList<VirtualMachineScaleSetInner> object wrapped in ServiceResponse if successful.
/** * Gets all the VM scale sets under the specified subscription for the specified location. * ServiceResponse<PageImpl1<VirtualMachineScaleSetInner>> * @param location The location for which VM scale sets under the subscription are queried. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList&lt;VirtualMachineScaleSetInner&gt; object wrapped in {@link ServiceResponse} if successful. */
public Observable<ServiceResponse<Page<VirtualMachineScaleSetInner>>> listByLocationSinglePageAsync(final String location) { if (location == null) { throw new IllegalArgumentException("Parameter location is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } final String apiVersion = "2020-12-01"; return service.listByLocation(location, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<VirtualMachineScaleSetInner>>>>() { @Override public Observable<ServiceResponse<Page<VirtualMachineScaleSetInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl1<VirtualMachineScaleSetInner>> result = listByLocationDelegate(response); return Observable.just(new ServiceResponse<Page<VirtualMachineScaleSetInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<PageImpl1<VirtualMachineScaleSetInner>> listByLocationDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<PageImpl1<VirtualMachineScaleSetInner>, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<PageImpl1<VirtualMachineScaleSetInner>>() { }.getType()) .registerError(CloudException.class) .build(response); }
Create or update a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set to create or update.
  • parameters – The scale set object.
Throws:
Returns:the VirtualMachineScaleSetInner object if successful.
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the VirtualMachineScaleSetInner object if successful. */
public VirtualMachineScaleSetInner createOrUpdate(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, parameters).toBlocking().last().body(); }
Create or update a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set to create or update.
  • parameters – The scale set object.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<VirtualMachineScaleSetInner> createOrUpdateAsync(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetInner parameters, final ServiceCallback<VirtualMachineScaleSetInner> serviceCallback) { return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, parameters), serviceCallback); }
Create or update a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set to create or update.
  • parameters – The scale set object.
Throws:
Returns:the observable for the request
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<VirtualMachineScaleSetInner> createOrUpdateAsync(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, parameters).map(new Func1<ServiceResponse<VirtualMachineScaleSetInner>, VirtualMachineScaleSetInner>() { @Override public VirtualMachineScaleSetInner call(ServiceResponse<VirtualMachineScaleSetInner> response) { return response.body(); } }); }
Create or update a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set to create or update.
  • parameters – The scale set object.
Throws:
Returns:the observable for the request
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponse<VirtualMachineScaleSetInner>> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetInner parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmScaleSetName == null) { throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); final String apiVersion = "2020-12-01"; Observable<Response<ResponseBody>> observable = service.createOrUpdate(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken<VirtualMachineScaleSetInner>() { }.getType()); }
Create or update a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set to create or update.
  • parameters – The scale set object.
Throws:
Returns:the VirtualMachineScaleSetInner object if successful.
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the VirtualMachineScaleSetInner object if successful. */
public VirtualMachineScaleSetInner beginCreateOrUpdate(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetInner parameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, parameters).toBlocking().single().body(); }
Create or update a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set to create or update.
  • parameters – The scale set object.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<VirtualMachineScaleSetInner> beginCreateOrUpdateAsync(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetInner parameters, final ServiceCallback<VirtualMachineScaleSetInner> serviceCallback) { return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, parameters), serviceCallback); }
Create or update a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set to create or update.
  • parameters – The scale set object.
Throws:
Returns:the observable to the VirtualMachineScaleSetInner object
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the VirtualMachineScaleSetInner object */
public Observable<VirtualMachineScaleSetInner> beginCreateOrUpdateAsync(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetInner parameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, parameters).map(new Func1<ServiceResponse<VirtualMachineScaleSetInner>, VirtualMachineScaleSetInner>() { @Override public VirtualMachineScaleSetInner call(ServiceResponse<VirtualMachineScaleSetInner> response) { return response.body(); } }); }
Create or update a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set to create or update.
  • parameters – The scale set object.
Throws:
Returns:the observable to the VirtualMachineScaleSetInner object
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the VirtualMachineScaleSetInner object */
public Observable<ServiceResponse<VirtualMachineScaleSetInner>> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetInner parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmScaleSetName == null) { throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); final String apiVersion = "2020-12-01"; return service.beginCreateOrUpdate(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<VirtualMachineScaleSetInner>>>() { @Override public Observable<ServiceResponse<VirtualMachineScaleSetInner>> call(Response<ResponseBody> response) { try { ServiceResponse<VirtualMachineScaleSetInner> clientResponse = beginCreateOrUpdateDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<VirtualMachineScaleSetInner> beginCreateOrUpdateDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<VirtualMachineScaleSetInner, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<VirtualMachineScaleSetInner>() { }.getType()) .register(201, new TypeToken<VirtualMachineScaleSetInner>() { }.getType()) .registerError(CloudException.class) .build(response); }
Update a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set to create or update.
  • parameters – The scale set object.
Throws:
Returns:the VirtualMachineScaleSetInner object if successful.
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the VirtualMachineScaleSetInner object if successful. */
public VirtualMachineScaleSetInner update(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetUpdate parameters) { return updateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, parameters).toBlocking().last().body(); }
Update a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set to create or update.
  • parameters – The scale set object.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<VirtualMachineScaleSetInner> updateAsync(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetUpdate parameters, final ServiceCallback<VirtualMachineScaleSetInner> serviceCallback) { return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, parameters), serviceCallback); }
Update a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set to create or update.
  • parameters – The scale set object.
Throws:
Returns:the observable for the request
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<VirtualMachineScaleSetInner> updateAsync(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetUpdate parameters) { return updateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, parameters).map(new Func1<ServiceResponse<VirtualMachineScaleSetInner>, VirtualMachineScaleSetInner>() { @Override public VirtualMachineScaleSetInner call(ServiceResponse<VirtualMachineScaleSetInner> response) { return response.body(); } }); }
Update a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set to create or update.
  • parameters – The scale set object.
Throws:
Returns:the observable for the request
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponse<VirtualMachineScaleSetInner>> updateWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetUpdate parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmScaleSetName == null) { throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); final String apiVersion = "2020-12-01"; Observable<Response<ResponseBody>> observable = service.update(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken<VirtualMachineScaleSetInner>() { }.getType()); }
Update a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set to create or update.
  • parameters – The scale set object.
Throws:
Returns:the VirtualMachineScaleSetInner object if successful.
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the VirtualMachineScaleSetInner object if successful. */
public VirtualMachineScaleSetInner beginUpdate(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetUpdate parameters) { return beginUpdateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, parameters).toBlocking().single().body(); }
Update a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set to create or update.
  • parameters – The scale set object.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<VirtualMachineScaleSetInner> beginUpdateAsync(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetUpdate parameters, final ServiceCallback<VirtualMachineScaleSetInner> serviceCallback) { return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, parameters), serviceCallback); }
Update a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set to create or update.
  • parameters – The scale set object.
Throws:
Returns:the observable to the VirtualMachineScaleSetInner object
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the VirtualMachineScaleSetInner object */
public Observable<VirtualMachineScaleSetInner> beginUpdateAsync(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetUpdate parameters) { return beginUpdateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, parameters).map(new Func1<ServiceResponse<VirtualMachineScaleSetInner>, VirtualMachineScaleSetInner>() { @Override public VirtualMachineScaleSetInner call(ServiceResponse<VirtualMachineScaleSetInner> response) { return response.body(); } }); }
Update a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set to create or update.
  • parameters – The scale set object.
Throws:
Returns:the observable to the VirtualMachineScaleSetInner object
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the VirtualMachineScaleSetInner object */
public Observable<ServiceResponse<VirtualMachineScaleSetInner>> beginUpdateWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetUpdate parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmScaleSetName == null) { throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); final String apiVersion = "2020-12-01"; return service.beginUpdate(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<VirtualMachineScaleSetInner>>>() { @Override public Observable<ServiceResponse<VirtualMachineScaleSetInner>> call(Response<ResponseBody> response) { try { ServiceResponse<VirtualMachineScaleSetInner> clientResponse = beginUpdateDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<VirtualMachineScaleSetInner> beginUpdateDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<VirtualMachineScaleSetInner, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<VirtualMachineScaleSetInner>() { }.getType()) .registerError(CloudException.class) .build(response); }
Deletes a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
/** * Deletes a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */
public void delete(String resourceGroupName, String vmScaleSetName) { deleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); }
Deletes a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Deletes a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<Void> deleteAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); }
Deletes a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
Returns:the observable for the request
/** * Deletes a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<Void> deleteAsync(String resourceGroupName, String vmScaleSetName) { return deleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Deletes a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
Returns:the observable for the request
/** * Deletes a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponse<Void>> deleteWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmScaleSetName == null) { throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } final String apiVersion = "2020-12-01"; final Boolean forceDeletion = null; Observable<Response<ResponseBody>> observable = service.delete(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), forceDeletion, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<Void>() { }.getType()); }
Deletes a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • forceDeletion – Optional parameter to force delete a VM scale set. (Feature in Preview)
Throws:
/** * Deletes a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param forceDeletion Optional parameter to force delete a VM scale set. (Feature in Preview) * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */
public void delete(String resourceGroupName, String vmScaleSetName, Boolean forceDeletion) { deleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, forceDeletion).toBlocking().last().body(); }
Deletes a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • forceDeletion – Optional parameter to force delete a VM scale set. (Feature in Preview)
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Deletes a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param forceDeletion Optional parameter to force delete a VM scale set. (Feature in Preview) * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<Void> deleteAsync(String resourceGroupName, String vmScaleSetName, Boolean forceDeletion, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, forceDeletion), serviceCallback); }
Deletes a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • forceDeletion – Optional parameter to force delete a VM scale set. (Feature in Preview)
Throws:
Returns:the observable for the request
/** * Deletes a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param forceDeletion Optional parameter to force delete a VM scale set. (Feature in Preview) * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<Void> deleteAsync(String resourceGroupName, String vmScaleSetName, Boolean forceDeletion) { return deleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, forceDeletion).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Deletes a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • forceDeletion – Optional parameter to force delete a VM scale set. (Feature in Preview)
Throws:
Returns:the observable for the request
/** * Deletes a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param forceDeletion Optional parameter to force delete a VM scale set. (Feature in Preview) * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponse<Void>> deleteWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, Boolean forceDeletion) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmScaleSetName == null) { throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } final String apiVersion = "2020-12-01"; Observable<Response<ResponseBody>> observable = service.delete(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), forceDeletion, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<Void>() { }.getType()); }
Deletes a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
/** * Deletes a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */
public void beginDelete(String resourceGroupName, String vmScaleSetName) { beginDeleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); }
Deletes a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Deletes a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<Void> beginDeleteAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); }
Deletes a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
Returns:the ServiceResponse object if successful.
/** * Deletes a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<Void> beginDeleteAsync(String resourceGroupName, String vmScaleSetName) { return beginDeleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Deletes a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
Returns:the ServiceResponse object if successful.
/** * Deletes a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<ServiceResponse<Void>> beginDeleteWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmScaleSetName == null) { throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } final String apiVersion = "2020-12-01"; final Boolean forceDeletion = null; return service.beginDelete(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), forceDeletion, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Void>>>() { @Override public Observable<ServiceResponse<Void>> call(Response<ResponseBody> response) { try { ServiceResponse<Void> clientResponse = beginDeleteDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); }
Deletes a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • forceDeletion – Optional parameter to force delete a VM scale set. (Feature in Preview)
Throws:
/** * Deletes a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param forceDeletion Optional parameter to force delete a VM scale set. (Feature in Preview) * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */
public void beginDelete(String resourceGroupName, String vmScaleSetName, Boolean forceDeletion) { beginDeleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, forceDeletion).toBlocking().single().body(); }
Deletes a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • forceDeletion – Optional parameter to force delete a VM scale set. (Feature in Preview)
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Deletes a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param forceDeletion Optional parameter to force delete a VM scale set. (Feature in Preview) * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<Void> beginDeleteAsync(String resourceGroupName, String vmScaleSetName, Boolean forceDeletion, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, forceDeletion), serviceCallback); }
Deletes a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • forceDeletion – Optional parameter to force delete a VM scale set. (Feature in Preview)
Throws:
Returns:the ServiceResponse object if successful.
/** * Deletes a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param forceDeletion Optional parameter to force delete a VM scale set. (Feature in Preview) * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<Void> beginDeleteAsync(String resourceGroupName, String vmScaleSetName, Boolean forceDeletion) { return beginDeleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, forceDeletion).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Deletes a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • forceDeletion – Optional parameter to force delete a VM scale set. (Feature in Preview)
Throws:
Returns:the ServiceResponse object if successful.
/** * Deletes a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param forceDeletion Optional parameter to force delete a VM scale set. (Feature in Preview) * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<ServiceResponse<Void>> beginDeleteWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, Boolean forceDeletion) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmScaleSetName == null) { throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } final String apiVersion = "2020-12-01"; return service.beginDelete(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), forceDeletion, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Void>>>() { @Override public Observable<ServiceResponse<Void>> call(Response<ResponseBody> response) { try { ServiceResponse<Void> clientResponse = beginDeleteDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<Void> beginDeleteDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<Void, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<Void>() { }.getType()) .register(202, new TypeToken<Void>() { }.getType()) .register(204, new TypeToken<Void>() { }.getType()) .registerError(CloudException.class) .build(response); }
Display information about a virtual machine scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
Returns:the VirtualMachineScaleSetInner object if successful.
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the VirtualMachineScaleSetInner object if successful. */
public VirtualMachineScaleSetInner getByResourceGroup(String resourceGroupName, String vmScaleSetName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); }
Display information about a virtual machine scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<VirtualMachineScaleSetInner> getByResourceGroupAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback<VirtualMachineScaleSetInner> serviceCallback) { return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); }
Display information about a virtual machine scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
Returns:the observable to the VirtualMachineScaleSetInner object
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the VirtualMachineScaleSetInner object */
public Observable<VirtualMachineScaleSetInner> getByResourceGroupAsync(String resourceGroupName, String vmScaleSetName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1<ServiceResponse<VirtualMachineScaleSetInner>, VirtualMachineScaleSetInner>() { @Override public VirtualMachineScaleSetInner call(ServiceResponse<VirtualMachineScaleSetInner> response) { return response.body(); } }); }
Display information about a virtual machine scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
Returns:the observable to the VirtualMachineScaleSetInner object
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the VirtualMachineScaleSetInner object */
public Observable<ServiceResponse<VirtualMachineScaleSetInner>> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmScaleSetName == null) { throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } final String apiVersion = "2020-12-01"; return service.getByResourceGroup(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<VirtualMachineScaleSetInner>>>() { @Override public Observable<ServiceResponse<VirtualMachineScaleSetInner>> call(Response<ResponseBody> response) { try { ServiceResponse<VirtualMachineScaleSetInner> clientResponse = getByResourceGroupDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<VirtualMachineScaleSetInner> getByResourceGroupDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<VirtualMachineScaleSetInner, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<VirtualMachineScaleSetInner>() { }.getType()) .registerError(CloudException.class) .build(response); }
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.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */
public void deallocate(String resourceGroupName, String vmScaleSetName) { deallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); }
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.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<Void> deallocateAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(deallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); }
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.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
Returns:the observable for the request
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<Void> deallocateAsync(String resourceGroupName, String vmScaleSetName) { return deallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
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.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
Returns:the observable for the request
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponse<Void>> deallocateWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmScaleSetName == null) { throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } final String apiVersion = "2020-12-01"; final String instanceIdsConverted = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); Observable<Response<ResponseBody>> observable = service.deallocate(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<Void>() { }.getType()); }
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.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
Throws:
/** * 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 instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */
public void deallocate(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { deallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); }
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.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * 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 instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<Void> deallocateAsync(String resourceGroupName, String vmScaleSetName, List<String> instanceIds, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(deallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); }
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.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
Throws:
Returns:the observable for the request
/** * 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 instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<Void> deallocateAsync(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { return deallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
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.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
Throws:
Returns:the observable for the request
/** * 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 instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponse<Void>> deallocateWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmScaleSetName == null) { throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); final String apiVersion = "2020-12-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(instanceIds); } Observable<Response<ResponseBody>> observable = service.deallocate(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<Void>() { }.getType()); }
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.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */
public void beginDeallocate(String resourceGroupName, String vmScaleSetName) { beginDeallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); }
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.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<Void> beginDeallocateAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginDeallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); }
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.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
Returns:the ServiceResponse object if successful.
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<Void> beginDeallocateAsync(String resourceGroupName, String vmScaleSetName) { return beginDeallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
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.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
Returns:the ServiceResponse object if successful.
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<ServiceResponse<Void>> beginDeallocateWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmScaleSetName == null) { throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } final String apiVersion = "2020-12-01"; final List<String> instanceIds = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); return service.beginDeallocate(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Void>>>() { @Override public Observable<ServiceResponse<Void>> call(Response<ResponseBody> response) { try { ServiceResponse<Void> clientResponse = beginDeallocateDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); }
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.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
Throws:
/** * 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 instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */
public void beginDeallocate(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { beginDeallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); }
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.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * 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 instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<Void> beginDeallocateAsync(String resourceGroupName, String vmScaleSetName, List<String> instanceIds, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginDeallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); }
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.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
Throws:
Returns:the ServiceResponse object if successful.
/** * 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 instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<Void> beginDeallocateAsync(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { return beginDeallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
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.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
Throws:
Returns:the ServiceResponse object if successful.
/** * 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 instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<ServiceResponse<Void>> beginDeallocateWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmScaleSetName == null) { throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); final String apiVersion = "2020-12-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(instanceIds); } return service.beginDeallocate(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Void>>>() { @Override public Observable<ServiceResponse<Void>> call(Response<ResponseBody> response) { try { ServiceResponse<Void> clientResponse = beginDeallocateDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<Void> beginDeallocateDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<Void, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<Void>() { }.getType()) .register(202, new TypeToken<Void>() { }.getType()) .registerError(CloudException.class) .build(response); }
Deletes virtual machines in a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids.
Throws:
/** * 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 instanceIds The virtual machine scale set instance ids. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */
public void deleteInstances(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { deleteInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); }
Deletes virtual machines in a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * 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 instanceIds The virtual machine scale set instance ids. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<Void> deleteInstancesAsync(String resourceGroupName, String vmScaleSetName, List<String> instanceIds, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(deleteInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); }
Deletes virtual machines in a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids.
Throws:
Returns:the observable for the request
/** * 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 instanceIds The virtual machine scale set instance ids. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<Void> deleteInstancesAsync(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { return deleteInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Deletes virtual machines in a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids.
Throws:
Returns:the observable for the request
/** * 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 instanceIds The virtual machine scale set instance ids. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponse<Void>> deleteInstancesWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmScaleSetName == null) { throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (instanceIds == null) { throw new IllegalArgumentException("Parameter instanceIds is required and cannot be null."); } Validator.validate(instanceIds); final String apiVersion = "2020-12-01"; final Boolean forceDeletion = null; VirtualMachineScaleSetVMInstanceRequiredIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceRequiredIDs(); vmInstanceIDs.withInstanceIds(instanceIds); Observable<Response<ResponseBody>> observable = service.deleteInstances(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), forceDeletion, apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<Void>() { }.getType()); }
Deletes virtual machines in a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids.
  • forceDeletion – Optional parameter to force delete virtual machines from the VM scale set. (Feature in Preview)
Throws:
/** * 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 instanceIds The virtual machine scale set instance ids. * @param forceDeletion Optional parameter to force delete virtual machines from the VM scale set. (Feature in Preview) * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */
public void deleteInstances(String resourceGroupName, String vmScaleSetName, List<String> instanceIds, Boolean forceDeletion) { deleteInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds, forceDeletion).toBlocking().last().body(); }
Deletes virtual machines in a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids.
  • forceDeletion – Optional parameter to force delete virtual machines from the VM scale set. (Feature in Preview)
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * 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 instanceIds The virtual machine scale set instance ids. * @param forceDeletion Optional parameter to force delete virtual machines from the VM scale set. (Feature in Preview) * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<Void> deleteInstancesAsync(String resourceGroupName, String vmScaleSetName, List<String> instanceIds, Boolean forceDeletion, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(deleteInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds, forceDeletion), serviceCallback); }
Deletes virtual machines in a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids.
  • forceDeletion – Optional parameter to force delete virtual machines from the VM scale set. (Feature in Preview)
Throws:
Returns:the observable for the request
/** * 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 instanceIds The virtual machine scale set instance ids. * @param forceDeletion Optional parameter to force delete virtual machines from the VM scale set. (Feature in Preview) * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<Void> deleteInstancesAsync(String resourceGroupName, String vmScaleSetName, List<String> instanceIds, Boolean forceDeletion) { return deleteInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds, forceDeletion).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Deletes virtual machines in a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids.
  • forceDeletion – Optional parameter to force delete virtual machines from the VM scale set. (Feature in Preview)
Throws:
Returns:the observable for the request
/** * 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 instanceIds The virtual machine scale set instance ids. * @param forceDeletion Optional parameter to force delete virtual machines from the VM scale set. (Feature in Preview) * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponse<Void>> deleteInstancesWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List<String> instanceIds, Boolean forceDeletion) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmScaleSetName == null) { throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (instanceIds == null) { throw new IllegalArgumentException("Parameter instanceIds is required and cannot be null."); } Validator.validate(instanceIds); final String apiVersion = "2020-12-01"; VirtualMachineScaleSetVMInstanceRequiredIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceRequiredIDs(); vmInstanceIDs.withInstanceIds(instanceIds); Observable<Response<ResponseBody>> observable = service.deleteInstances(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), forceDeletion, apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<Void>() { }.getType()); }
Deletes virtual machines in a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids.
Throws:
/** * 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 instanceIds The virtual machine scale set instance ids. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */
public void beginDeleteInstances(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { beginDeleteInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); }
Deletes virtual machines in a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * 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 instanceIds The virtual machine scale set instance ids. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<Void> beginDeleteInstancesAsync(String resourceGroupName, String vmScaleSetName, List<String> instanceIds, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginDeleteInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); }
Deletes virtual machines in a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids.
Throws:
Returns:the ServiceResponse object if successful.
/** * 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 instanceIds The virtual machine scale set instance ids. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<Void> beginDeleteInstancesAsync(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { return beginDeleteInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Deletes virtual machines in a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids.
Throws:
Returns:the ServiceResponse object if successful.
/** * 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 instanceIds The virtual machine scale set instance ids. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<ServiceResponse<Void>> beginDeleteInstancesWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmScaleSetName == null) { throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (instanceIds == null) { throw new IllegalArgumentException("Parameter instanceIds is required and cannot be null."); } Validator.validate(instanceIds); final String apiVersion = "2020-12-01"; final Boolean forceDeletion = null; VirtualMachineScaleSetVMInstanceRequiredIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceRequiredIDs(); vmInstanceIDs.withInstanceIds(instanceIds); return service.beginDeleteInstances(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), forceDeletion, apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Void>>>() { @Override public Observable<ServiceResponse<Void>> call(Response<ResponseBody> response) { try { ServiceResponse<Void> clientResponse = beginDeleteInstancesDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); }
Deletes virtual machines in a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids.
  • forceDeletion – Optional parameter to force delete virtual machines from the VM scale set. (Feature in Preview)
Throws:
/** * 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 instanceIds The virtual machine scale set instance ids. * @param forceDeletion Optional parameter to force delete virtual machines from the VM scale set. (Feature in Preview) * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */
public void beginDeleteInstances(String resourceGroupName, String vmScaleSetName, List<String> instanceIds, Boolean forceDeletion) { beginDeleteInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds, forceDeletion).toBlocking().single().body(); }
Deletes virtual machines in a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids.
  • forceDeletion – Optional parameter to force delete virtual machines from the VM scale set. (Feature in Preview)
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * 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 instanceIds The virtual machine scale set instance ids. * @param forceDeletion Optional parameter to force delete virtual machines from the VM scale set. (Feature in Preview) * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<Void> beginDeleteInstancesAsync(String resourceGroupName, String vmScaleSetName, List<String> instanceIds, Boolean forceDeletion, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginDeleteInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds, forceDeletion), serviceCallback); }
Deletes virtual machines in a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids.
  • forceDeletion – Optional parameter to force delete virtual machines from the VM scale set. (Feature in Preview)
Throws:
Returns:the ServiceResponse object if successful.
/** * 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 instanceIds The virtual machine scale set instance ids. * @param forceDeletion Optional parameter to force delete virtual machines from the VM scale set. (Feature in Preview) * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<Void> beginDeleteInstancesAsync(String resourceGroupName, String vmScaleSetName, List<String> instanceIds, Boolean forceDeletion) { return beginDeleteInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds, forceDeletion).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Deletes virtual machines in a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids.
  • forceDeletion – Optional parameter to force delete virtual machines from the VM scale set. (Feature in Preview)
Throws:
Returns:the ServiceResponse object if successful.
/** * 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 instanceIds The virtual machine scale set instance ids. * @param forceDeletion Optional parameter to force delete virtual machines from the VM scale set. (Feature in Preview) * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<ServiceResponse<Void>> beginDeleteInstancesWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List<String> instanceIds, Boolean forceDeletion) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmScaleSetName == null) { throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (instanceIds == null) { throw new IllegalArgumentException("Parameter instanceIds is required and cannot be null."); } Validator.validate(instanceIds); final String apiVersion = "2020-12-01"; VirtualMachineScaleSetVMInstanceRequiredIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceRequiredIDs(); vmInstanceIDs.withInstanceIds(instanceIds); return service.beginDeleteInstances(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), forceDeletion, apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Void>>>() { @Override public Observable<ServiceResponse<Void>> call(Response<ResponseBody> response) { try { ServiceResponse<Void> clientResponse = beginDeleteInstancesDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<Void> beginDeleteInstancesDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<Void, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<Void>() { }.getType()) .register(202, new TypeToken<Void>() { }.getType()) .registerError(CloudException.class) .build(response); }
Gets the status of a VM scale set instance.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
Returns:the VirtualMachineScaleSetInstanceViewInner object if successful.
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the VirtualMachineScaleSetInstanceViewInner object if successful. */
public VirtualMachineScaleSetInstanceViewInner getInstanceView(String resourceGroupName, String vmScaleSetName) { return getInstanceViewWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); }
Gets the status of a VM scale set instance.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<VirtualMachineScaleSetInstanceViewInner> getInstanceViewAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback<VirtualMachineScaleSetInstanceViewInner> serviceCallback) { return ServiceFuture.fromResponse(getInstanceViewWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); }
Gets the status of a VM scale set instance.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
Returns:the observable to the VirtualMachineScaleSetInstanceViewInner object
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the VirtualMachineScaleSetInstanceViewInner object */
public Observable<VirtualMachineScaleSetInstanceViewInner> getInstanceViewAsync(String resourceGroupName, String vmScaleSetName) { return getInstanceViewWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1<ServiceResponse<VirtualMachineScaleSetInstanceViewInner>, VirtualMachineScaleSetInstanceViewInner>() { @Override public VirtualMachineScaleSetInstanceViewInner call(ServiceResponse<VirtualMachineScaleSetInstanceViewInner> response) { return response.body(); } }); }
Gets the status of a VM scale set instance.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
Returns:the observable to the VirtualMachineScaleSetInstanceViewInner object
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the VirtualMachineScaleSetInstanceViewInner object */
public Observable<ServiceResponse<VirtualMachineScaleSetInstanceViewInner>> getInstanceViewWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmScaleSetName == null) { throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } final String apiVersion = "2020-12-01"; return service.getInstanceView(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<VirtualMachineScaleSetInstanceViewInner>>>() { @Override public Observable<ServiceResponse<VirtualMachineScaleSetInstanceViewInner>> call(Response<ResponseBody> response) { try { ServiceResponse<VirtualMachineScaleSetInstanceViewInner> clientResponse = getInstanceViewDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<VirtualMachineScaleSetInstanceViewInner> getInstanceViewDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<VirtualMachineScaleSetInstanceViewInner, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<VirtualMachineScaleSetInstanceViewInner>() { }.getType()) .registerError(CloudException.class) .build(response); }
Gets a list of all VM scale sets under a resource group.
Params:
  • resourceGroupName – The name of the resource group.
Throws:
Returns:the PagedList<VirtualMachineScaleSetInner> object if successful.
/** * Gets a list of all VM scale sets under a resource group. * * @param resourceGroupName The name of the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList&lt;VirtualMachineScaleSetInner&gt; object if successful. */
public PagedList<VirtualMachineScaleSetInner> listByResourceGroup(final String resourceGroupName) { ServiceResponse<Page<VirtualMachineScaleSetInner>> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); return new PagedList<VirtualMachineScaleSetInner>(response.body()) { @Override public Page<VirtualMachineScaleSetInner> nextPage(String nextPageLink) { return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
Gets a list of all VM scale sets under a resource group.
Params:
  • resourceGroupName – The name of the resource group.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Gets a list of all VM scale sets under a resource group. * * @param resourceGroupName The name of the resource group. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<List<VirtualMachineScaleSetInner>> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback<VirtualMachineScaleSetInner> serviceCallback) { return AzureServiceFuture.fromPageResponse( listByResourceGroupSinglePageAsync(resourceGroupName), new Func1<String, Observable<ServiceResponse<Page<VirtualMachineScaleSetInner>>>>() { @Override public Observable<ServiceResponse<Page<VirtualMachineScaleSetInner>>> call(String nextPageLink) { return listByResourceGroupNextSinglePageAsync(nextPageLink); } }, serviceCallback); }
Gets a list of all VM scale sets under a resource group.
Params:
  • resourceGroupName – The name of the resource group.
Throws:
Returns:the observable to the PagedList<VirtualMachineScaleSetInner> object
/** * Gets a list of all VM scale sets under a resource group. * * @param resourceGroupName The name of the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;VirtualMachineScaleSetInner&gt; object */
public Observable<Page<VirtualMachineScaleSetInner>> listByResourceGroupAsync(final String resourceGroupName) { return listByResourceGroupWithServiceResponseAsync(resourceGroupName) .map(new Func1<ServiceResponse<Page<VirtualMachineScaleSetInner>>, Page<VirtualMachineScaleSetInner>>() { @Override public Page<VirtualMachineScaleSetInner> call(ServiceResponse<Page<VirtualMachineScaleSetInner>> response) { return response.body(); } }); }
Gets a list of all VM scale sets under a resource group.
Params:
  • resourceGroupName – The name of the resource group.
Throws:
Returns:the observable to the PagedList<VirtualMachineScaleSetInner> object
/** * Gets a list of all VM scale sets under a resource group. * * @param resourceGroupName The name of the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;VirtualMachineScaleSetInner&gt; object */
public Observable<ServiceResponse<Page<VirtualMachineScaleSetInner>>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { return listByResourceGroupSinglePageAsync(resourceGroupName) .concatMap(new Func1<ServiceResponse<Page<VirtualMachineScaleSetInner>>, Observable<ServiceResponse<Page<VirtualMachineScaleSetInner>>>>() { @Override public Observable<ServiceResponse<Page<VirtualMachineScaleSetInner>>> call(ServiceResponse<Page<VirtualMachineScaleSetInner>> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); } }); }
Gets a list of all VM scale sets under a resource group. ServiceResponse> * @param resourceGroupName The name of the resource group.
Throws:
Returns:the PagedList<VirtualMachineScaleSetInner> object wrapped in ServiceResponse if successful.
/** * Gets a list of all VM scale sets under a resource group. * ServiceResponse<PageImpl1<VirtualMachineScaleSetInner>> * @param resourceGroupName The name of the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList&lt;VirtualMachineScaleSetInner&gt; object wrapped in {@link ServiceResponse} if successful. */
public Observable<ServiceResponse<Page<VirtualMachineScaleSetInner>>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } final String apiVersion = "2020-12-01"; return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<VirtualMachineScaleSetInner>>>>() { @Override public Observable<ServiceResponse<Page<VirtualMachineScaleSetInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl1<VirtualMachineScaleSetInner>> result = listByResourceGroupDelegate(response); return Observable.just(new ServiceResponse<Page<VirtualMachineScaleSetInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<PageImpl1<VirtualMachineScaleSetInner>> listByResourceGroupDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<PageImpl1<VirtualMachineScaleSetInner>, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<PageImpl1<VirtualMachineScaleSetInner>>() { }.getType()) .registerError(CloudException.class) .build(response); }
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.
Throws:
  • IllegalArgumentException – thrown if parameters fail the validation
  • CloudException – thrown if the request is rejected by server
  • RuntimeException – all other wrapped checked exceptions if the request fails to be sent
Returns:the PagedList<VirtualMachineScaleSetInner> object if successful.
/** * 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. * * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList&lt;VirtualMachineScaleSetInner&gt; object if successful. */
public PagedList<VirtualMachineScaleSetInner> list() { ServiceResponse<Page<VirtualMachineScaleSetInner>> response = listSinglePageAsync().toBlocking().single(); return new PagedList<VirtualMachineScaleSetInner>(response.body()) { @Override public Page<VirtualMachineScaleSetInner> nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
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.
Params:
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<List<VirtualMachineScaleSetInner>> listAsync(final ListOperationCallback<VirtualMachineScaleSetInner> serviceCallback) { return AzureServiceFuture.fromPageResponse( listSinglePageAsync(), new Func1<String, Observable<ServiceResponse<Page<VirtualMachineScaleSetInner>>>>() { @Override public Observable<ServiceResponse<Page<VirtualMachineScaleSetInner>>> call(String nextPageLink) { return listNextSinglePageAsync(nextPageLink); } }, serviceCallback); }
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.
Throws:
  • IllegalArgumentException – thrown if parameters fail the validation
Returns:the observable to the PagedList<VirtualMachineScaleSetInner> object
/** * 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. * * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;VirtualMachineScaleSetInner&gt; object */
public Observable<Page<VirtualMachineScaleSetInner>> listAsync() { return listWithServiceResponseAsync() .map(new Func1<ServiceResponse<Page<VirtualMachineScaleSetInner>>, Page<VirtualMachineScaleSetInner>>() { @Override public Page<VirtualMachineScaleSetInner> call(ServiceResponse<Page<VirtualMachineScaleSetInner>> response) { return response.body(); } }); }
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.
Throws:
  • IllegalArgumentException – thrown if parameters fail the validation
Returns:the observable to the PagedList<VirtualMachineScaleSetInner> object
/** * 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. * * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;VirtualMachineScaleSetInner&gt; object */
public Observable<ServiceResponse<Page<VirtualMachineScaleSetInner>>> listWithServiceResponseAsync() { return listSinglePageAsync() .concatMap(new Func1<ServiceResponse<Page<VirtualMachineScaleSetInner>>, Observable<ServiceResponse<Page<VirtualMachineScaleSetInner>>>>() { @Override public Observable<ServiceResponse<Page<VirtualMachineScaleSetInner>>> call(ServiceResponse<Page<VirtualMachineScaleSetInner>> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); } }); }
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.
Throws:
  • IllegalArgumentException – thrown if parameters fail the validation
Returns:the PagedList<VirtualMachineScaleSetInner> object wrapped in ServiceResponse if successful.
/** * 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. * * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList&lt;VirtualMachineScaleSetInner&gt; object wrapped in {@link ServiceResponse} if successful. */
public Observable<ServiceResponse<Page<VirtualMachineScaleSetInner>>> listSinglePageAsync() { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } final String apiVersion = "2020-12-01"; return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<VirtualMachineScaleSetInner>>>>() { @Override public Observable<ServiceResponse<Page<VirtualMachineScaleSetInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl1<VirtualMachineScaleSetInner>> result = listDelegate(response); return Observable.just(new ServiceResponse<Page<VirtualMachineScaleSetInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<PageImpl1<VirtualMachineScaleSetInner>> listDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<PageImpl1<VirtualMachineScaleSetInner>, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<PageImpl1<VirtualMachineScaleSetInner>>() { }.getType()) .registerError(CloudException.class) .build(response); }
Gets a list of SKUs available for your VM scale set, including the minimum and maximum VM instances allowed for each SKU.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
Returns:the PagedList<VirtualMachineScaleSetSkuInner> object if successful.
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList&lt;VirtualMachineScaleSetSkuInner&gt; object if successful. */
public PagedList<VirtualMachineScaleSetSkuInner> listSkus(final String resourceGroupName, final String vmScaleSetName) { ServiceResponse<Page<VirtualMachineScaleSetSkuInner>> response = listSkusSinglePageAsync(resourceGroupName, vmScaleSetName).toBlocking().single(); return new PagedList<VirtualMachineScaleSetSkuInner>(response.body()) { @Override public Page<VirtualMachineScaleSetSkuInner> nextPage(String nextPageLink) { return listSkusNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
Gets a list of SKUs available for your VM scale set, including the minimum and maximum VM instances allowed for each SKU.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<List<VirtualMachineScaleSetSkuInner>> listSkusAsync(final String resourceGroupName, final String vmScaleSetName, final ListOperationCallback<VirtualMachineScaleSetSkuInner> serviceCallback) { return AzureServiceFuture.fromPageResponse( listSkusSinglePageAsync(resourceGroupName, vmScaleSetName), new Func1<String, Observable<ServiceResponse<Page<VirtualMachineScaleSetSkuInner>>>>() { @Override public Observable<ServiceResponse<Page<VirtualMachineScaleSetSkuInner>>> call(String nextPageLink) { return listSkusNextSinglePageAsync(nextPageLink); } }, serviceCallback); }
Gets a list of SKUs available for your VM scale set, including the minimum and maximum VM instances allowed for each SKU.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
Returns:the observable to the PagedList<VirtualMachineScaleSetSkuInner> object
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;VirtualMachineScaleSetSkuInner&gt; object */
public Observable<Page<VirtualMachineScaleSetSkuInner>> listSkusAsync(final String resourceGroupName, final String vmScaleSetName) { return listSkusWithServiceResponseAsync(resourceGroupName, vmScaleSetName) .map(new Func1<ServiceResponse<Page<VirtualMachineScaleSetSkuInner>>, Page<VirtualMachineScaleSetSkuInner>>() { @Override public Page<VirtualMachineScaleSetSkuInner> call(ServiceResponse<Page<VirtualMachineScaleSetSkuInner>> response) { return response.body(); } }); }
Gets a list of SKUs available for your VM scale set, including the minimum and maximum VM instances allowed for each SKU.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
Returns:the observable to the PagedList<VirtualMachineScaleSetSkuInner> object
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;VirtualMachineScaleSetSkuInner&gt; object */
public Observable<ServiceResponse<Page<VirtualMachineScaleSetSkuInner>>> listSkusWithServiceResponseAsync(final String resourceGroupName, final String vmScaleSetName) { return listSkusSinglePageAsync(resourceGroupName, vmScaleSetName) .concatMap(new Func1<ServiceResponse<Page<VirtualMachineScaleSetSkuInner>>, Observable<ServiceResponse<Page<VirtualMachineScaleSetSkuInner>>>>() { @Override public Observable<ServiceResponse<Page<VirtualMachineScaleSetSkuInner>>> call(ServiceResponse<Page<VirtualMachineScaleSetSkuInner>> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } return Observable.just(page).concatWith(listSkusNextWithServiceResponseAsync(nextPageLink)); } }); }
Gets a list of SKUs available for your VM scale set, including the minimum and maximum VM instances allowed for each SKU. ServiceResponse> * @param resourceGroupName The name of the resource group. ServiceResponse> * @param vmScaleSetName The name of the VM scale set.
Throws:
Returns:the PagedList<VirtualMachineScaleSetSkuInner> object wrapped in ServiceResponse if successful.
/** * Gets a list of SKUs available for your VM scale set, including the minimum and maximum VM instances allowed for each SKU. * ServiceResponse<PageImpl1<VirtualMachineScaleSetSkuInner>> * @param resourceGroupName The name of the resource group. ServiceResponse<PageImpl1<VirtualMachineScaleSetSkuInner>> * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList&lt;VirtualMachineScaleSetSkuInner&gt; object wrapped in {@link ServiceResponse} if successful. */
public Observable<ServiceResponse<Page<VirtualMachineScaleSetSkuInner>>> listSkusSinglePageAsync(final String resourceGroupName, final String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmScaleSetName == null) { throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } final String apiVersion = "2020-12-01"; return service.listSkus(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<VirtualMachineScaleSetSkuInner>>>>() { @Override public Observable<ServiceResponse<Page<VirtualMachineScaleSetSkuInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl1<VirtualMachineScaleSetSkuInner>> result = listSkusDelegate(response); return Observable.just(new ServiceResponse<Page<VirtualMachineScaleSetSkuInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<PageImpl1<VirtualMachineScaleSetSkuInner>> listSkusDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<PageImpl1<VirtualMachineScaleSetSkuInner>, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<PageImpl1<VirtualMachineScaleSetSkuInner>>() { }.getType()) .registerError(CloudException.class) .build(response); }
Gets list of OS upgrades on a VM scale set instance.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
Returns:the PagedList<UpgradeOperationHistoricalStatusInfoInner> object if successful.
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList&lt;UpgradeOperationHistoricalStatusInfoInner&gt; object if successful. */
public PagedList<UpgradeOperationHistoricalStatusInfoInner> getOSUpgradeHistory(final String resourceGroupName, final String vmScaleSetName) { ServiceResponse<Page<UpgradeOperationHistoricalStatusInfoInner>> response = getOSUpgradeHistorySinglePageAsync(resourceGroupName, vmScaleSetName).toBlocking().single(); return new PagedList<UpgradeOperationHistoricalStatusInfoInner>(response.body()) { @Override public Page<UpgradeOperationHistoricalStatusInfoInner> nextPage(String nextPageLink) { return getOSUpgradeHistoryNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
Gets list of OS upgrades on a VM scale set instance.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<List<UpgradeOperationHistoricalStatusInfoInner>> getOSUpgradeHistoryAsync(final String resourceGroupName, final String vmScaleSetName, final ListOperationCallback<UpgradeOperationHistoricalStatusInfoInner> serviceCallback) { return AzureServiceFuture.fromPageResponse( getOSUpgradeHistorySinglePageAsync(resourceGroupName, vmScaleSetName), new Func1<String, Observable<ServiceResponse<Page<UpgradeOperationHistoricalStatusInfoInner>>>>() { @Override public Observable<ServiceResponse<Page<UpgradeOperationHistoricalStatusInfoInner>>> call(String nextPageLink) { return getOSUpgradeHistoryNextSinglePageAsync(nextPageLink); } }, serviceCallback); }
Gets list of OS upgrades on a VM scale set instance.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
Returns:the observable to the PagedList<UpgradeOperationHistoricalStatusInfoInner> object
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;UpgradeOperationHistoricalStatusInfoInner&gt; object */
public Observable<Page<UpgradeOperationHistoricalStatusInfoInner>> getOSUpgradeHistoryAsync(final String resourceGroupName, final String vmScaleSetName) { return getOSUpgradeHistoryWithServiceResponseAsync(resourceGroupName, vmScaleSetName) .map(new Func1<ServiceResponse<Page<UpgradeOperationHistoricalStatusInfoInner>>, Page<UpgradeOperationHistoricalStatusInfoInner>>() { @Override public Page<UpgradeOperationHistoricalStatusInfoInner> call(ServiceResponse<Page<UpgradeOperationHistoricalStatusInfoInner>> response) { return response.body(); } }); }
Gets list of OS upgrades on a VM scale set instance.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
Returns:the observable to the PagedList<UpgradeOperationHistoricalStatusInfoInner> object
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;UpgradeOperationHistoricalStatusInfoInner&gt; object */
public Observable<ServiceResponse<Page<UpgradeOperationHistoricalStatusInfoInner>>> getOSUpgradeHistoryWithServiceResponseAsync(final String resourceGroupName, final String vmScaleSetName) { return getOSUpgradeHistorySinglePageAsync(resourceGroupName, vmScaleSetName) .concatMap(new Func1<ServiceResponse<Page<UpgradeOperationHistoricalStatusInfoInner>>, Observable<ServiceResponse<Page<UpgradeOperationHistoricalStatusInfoInner>>>>() { @Override public Observable<ServiceResponse<Page<UpgradeOperationHistoricalStatusInfoInner>>> call(ServiceResponse<Page<UpgradeOperationHistoricalStatusInfoInner>> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } return Observable.just(page).concatWith(getOSUpgradeHistoryNextWithServiceResponseAsync(nextPageLink)); } }); }
Gets list of OS upgrades on a VM scale set instance. ServiceResponse> * @param resourceGroupName The name of the resource group. ServiceResponse> * @param vmScaleSetName The name of the VM scale set.
Throws:
Returns:the PagedList<UpgradeOperationHistoricalStatusInfoInner> object wrapped in ServiceResponse if successful.
/** * Gets list of OS upgrades on a VM scale set instance. * ServiceResponse<PageImpl1<UpgradeOperationHistoricalStatusInfoInner>> * @param resourceGroupName The name of the resource group. ServiceResponse<PageImpl1<UpgradeOperationHistoricalStatusInfoInner>> * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList&lt;UpgradeOperationHistoricalStatusInfoInner&gt; object wrapped in {@link ServiceResponse} if successful. */
public Observable<ServiceResponse<Page<UpgradeOperationHistoricalStatusInfoInner>>> getOSUpgradeHistorySinglePageAsync(final String resourceGroupName, final String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmScaleSetName == null) { throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } final String apiVersion = "2020-12-01"; return service.getOSUpgradeHistory(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<UpgradeOperationHistoricalStatusInfoInner>>>>() { @Override public Observable<ServiceResponse<Page<UpgradeOperationHistoricalStatusInfoInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl1<UpgradeOperationHistoricalStatusInfoInner>> result = getOSUpgradeHistoryDelegate(response); return Observable.just(new ServiceResponse<Page<UpgradeOperationHistoricalStatusInfoInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<PageImpl1<UpgradeOperationHistoricalStatusInfoInner>> getOSUpgradeHistoryDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<PageImpl1<UpgradeOperationHistoricalStatusInfoInner>, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<PageImpl1<UpgradeOperationHistoricalStatusInfoInner>>() { }.getType()) .registerError(CloudException.class) .build(response); }
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.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */
public void powerOff(String resourceGroupName, String vmScaleSetName) { powerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); }
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.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<Void> powerOffAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(powerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); }
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.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
Returns:the observable for the request
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<Void> powerOffAsync(String resourceGroupName, String vmScaleSetName) { return powerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
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.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
Returns:the observable for the request
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponse<Void>> powerOffWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmScaleSetName == null) { throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } final String apiVersion = "2020-12-01"; final Boolean skipShutdown = null; final String instanceIdsConverted = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); Observable<Response<ResponseBody>> observable = service.powerOff(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), skipShutdown, apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<Void>() { }.getType()); }
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.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • skipShutdown – The parameter to request non-graceful VM shutdown. True value for this flag indicates non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not specified
  • instanceIds – The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
Throws:
/** * 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 skipShutdown The parameter to request non-graceful VM shutdown. True value for this flag indicates non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not specified * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */
public void powerOff(String resourceGroupName, String vmScaleSetName, Boolean skipShutdown, List<String> instanceIds) { powerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, skipShutdown, instanceIds).toBlocking().last().body(); }
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.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • skipShutdown – The parameter to request non-graceful VM shutdown. True value for this flag indicates non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not specified
  • instanceIds – The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * 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 skipShutdown The parameter to request non-graceful VM shutdown. True value for this flag indicates non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not specified * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<Void> powerOffAsync(String resourceGroupName, String vmScaleSetName, Boolean skipShutdown, List<String> instanceIds, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(powerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, skipShutdown, instanceIds), serviceCallback); }
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.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • skipShutdown – The parameter to request non-graceful VM shutdown. True value for this flag indicates non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not specified
  • instanceIds – The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
Throws:
Returns:the observable for the request
/** * 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 skipShutdown The parameter to request non-graceful VM shutdown. True value for this flag indicates non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not specified * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<Void> powerOffAsync(String resourceGroupName, String vmScaleSetName, Boolean skipShutdown, List<String> instanceIds) { return powerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, skipShutdown, instanceIds).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
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.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • skipShutdown – The parameter to request non-graceful VM shutdown. True value for this flag indicates non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not specified
  • instanceIds – The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
Throws:
Returns:the observable for the request
/** * 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 skipShutdown The parameter to request non-graceful VM shutdown. True value for this flag indicates non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not specified * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponse<Void>> powerOffWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, Boolean skipShutdown, List<String> instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmScaleSetName == null) { throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); final String apiVersion = "2020-12-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(instanceIds); } Observable<Response<ResponseBody>> observable = service.powerOff(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), skipShutdown, apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<Void>() { }.getType()); }
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.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */
public void beginPowerOff(String resourceGroupName, String vmScaleSetName) { beginPowerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); }
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.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<Void> beginPowerOffAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginPowerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); }
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.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
Returns:the ServiceResponse object if successful.
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<Void> beginPowerOffAsync(String resourceGroupName, String vmScaleSetName) { return beginPowerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
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.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
Returns:the ServiceResponse object if successful.
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<ServiceResponse<Void>> beginPowerOffWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmScaleSetName == null) { throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } final String apiVersion = "2020-12-01"; final Boolean skipShutdown = null; final List<String> instanceIds = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); return service.beginPowerOff(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), skipShutdown, apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Void>>>() { @Override public Observable<ServiceResponse<Void>> call(Response<ResponseBody> response) { try { ServiceResponse<Void> clientResponse = beginPowerOffDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); }
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.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • skipShutdown – The parameter to request non-graceful VM shutdown. True value for this flag indicates non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not specified
  • instanceIds – The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
Throws:
/** * 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 skipShutdown The parameter to request non-graceful VM shutdown. True value for this flag indicates non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not specified * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */
public void beginPowerOff(String resourceGroupName, String vmScaleSetName, Boolean skipShutdown, List<String> instanceIds) { beginPowerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, skipShutdown, instanceIds).toBlocking().single().body(); }
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.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • skipShutdown – The parameter to request non-graceful VM shutdown. True value for this flag indicates non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not specified
  • instanceIds – The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * 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 skipShutdown The parameter to request non-graceful VM shutdown. True value for this flag indicates non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not specified * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<Void> beginPowerOffAsync(String resourceGroupName, String vmScaleSetName, Boolean skipShutdown, List<String> instanceIds, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginPowerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, skipShutdown, instanceIds), serviceCallback); }
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.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • skipShutdown – The parameter to request non-graceful VM shutdown. True value for this flag indicates non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not specified
  • instanceIds – The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
Throws:
Returns:the ServiceResponse object if successful.
/** * 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 skipShutdown The parameter to request non-graceful VM shutdown. True value for this flag indicates non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not specified * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<Void> beginPowerOffAsync(String resourceGroupName, String vmScaleSetName, Boolean skipShutdown, List<String> instanceIds) { return beginPowerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, skipShutdown, instanceIds).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
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.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • skipShutdown – The parameter to request non-graceful VM shutdown. True value for this flag indicates non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not specified
  • instanceIds – The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
Throws:
Returns:the ServiceResponse object if successful.
/** * 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 skipShutdown The parameter to request non-graceful VM shutdown. True value for this flag indicates non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not specified * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<ServiceResponse<Void>> beginPowerOffWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, Boolean skipShutdown, List<String> instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmScaleSetName == null) { throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); final String apiVersion = "2020-12-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(instanceIds); } return service.beginPowerOff(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), skipShutdown, apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Void>>>() { @Override public Observable<ServiceResponse<Void>> call(Response<ResponseBody> response) { try { ServiceResponse<Void> clientResponse = beginPowerOffDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<Void> beginPowerOffDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<Void, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<Void>() { }.getType()) .register(202, new TypeToken<Void>() { }.getType()) .registerError(CloudException.class) .build(response); }
Restarts one or more virtual machines in a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */
public void restart(String resourceGroupName, String vmScaleSetName) { restartWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); }
Restarts one or more virtual machines in a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<Void> restartAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(restartWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); }
Restarts one or more virtual machines in a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
Returns:the observable for the request
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<Void> restartAsync(String resourceGroupName, String vmScaleSetName) { return restartWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Restarts one or more virtual machines in a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
Returns:the observable for the request
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponse<Void>> restartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmScaleSetName == null) { throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } final String apiVersion = "2020-12-01"; final String instanceIdsConverted = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); Observable<Response<ResponseBody>> observable = service.restart(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<Void>() { }.getType()); }
Restarts one or more virtual machines in a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
Throws:
/** * 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 instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */
public void restart(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { restartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); }
Restarts one or more virtual machines in a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * 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 instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<Void> restartAsync(String resourceGroupName, String vmScaleSetName, List<String> instanceIds, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(restartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); }
Restarts one or more virtual machines in a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
Throws:
Returns:the observable for the request
/** * 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 instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<Void> restartAsync(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { return restartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Restarts one or more virtual machines in a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
Throws:
Returns:the observable for the request
/** * 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 instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponse<Void>> restartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmScaleSetName == null) { throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); final String apiVersion = "2020-12-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(instanceIds); } Observable<Response<ResponseBody>> observable = service.restart(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<Void>() { }.getType()); }
Restarts one or more virtual machines in a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */
public void beginRestart(String resourceGroupName, String vmScaleSetName) { beginRestartWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); }
Restarts one or more virtual machines in a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<Void> beginRestartAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginRestartWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); }
Restarts one or more virtual machines in a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
Returns:the ServiceResponse object if successful.
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<Void> beginRestartAsync(String resourceGroupName, String vmScaleSetName) { return beginRestartWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Restarts one or more virtual machines in a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
Returns:the ServiceResponse object if successful.
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<ServiceResponse<Void>> beginRestartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmScaleSetName == null) { throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } final String apiVersion = "2020-12-01"; final List<String> instanceIds = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); return service.beginRestart(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Void>>>() { @Override public Observable<ServiceResponse<Void>> call(Response<ResponseBody> response) { try { ServiceResponse<Void> clientResponse = beginRestartDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); }
Restarts one or more virtual machines in a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
Throws:
/** * 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 instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */
public void beginRestart(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { beginRestartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); }
Restarts one or more virtual machines in a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * 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 instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<Void> beginRestartAsync(String resourceGroupName, String vmScaleSetName, List<String> instanceIds, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginRestartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); }
Restarts one or more virtual machines in a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
Throws:
Returns:the ServiceResponse object if successful.
/** * 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 instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<Void> beginRestartAsync(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { return beginRestartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Restarts one or more virtual machines in a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
Throws:
Returns:the ServiceResponse object if successful.
/** * 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 instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<ServiceResponse<Void>> beginRestartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmScaleSetName == null) { throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); final String apiVersion = "2020-12-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(instanceIds); } return service.beginRestart(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Void>>>() { @Override public Observable<ServiceResponse<Void>> call(Response<ResponseBody> response) { try { ServiceResponse<Void> clientResponse = beginRestartDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<Void> beginRestartDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<Void, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<Void>() { }.getType()) .register(202, new TypeToken<Void>() { }.getType()) .registerError(CloudException.class) .build(response); }
Starts one or more virtual machines in a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */
public void start(String resourceGroupName, String vmScaleSetName) { startWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); }
Starts one or more virtual machines in a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<Void> startAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(startWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); }
Starts one or more virtual machines in a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
Returns:the observable for the request
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<Void> startAsync(String resourceGroupName, String vmScaleSetName) { return startWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Starts one or more virtual machines in a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
Returns:the observable for the request
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponse<Void>> startWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmScaleSetName == null) { throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } final String apiVersion = "2020-12-01"; final String instanceIdsConverted = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); Observable<Response<ResponseBody>> observable = service.start(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<Void>() { }.getType()); }
Starts one or more virtual machines in a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
Throws:
/** * 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 instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */
public void start(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { startWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); }
Starts one or more virtual machines in a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * 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 instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<Void> startAsync(String resourceGroupName, String vmScaleSetName, List<String> instanceIds, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(startWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); }
Starts one or more virtual machines in a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
Throws:
Returns:the observable for the request
/** * 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 instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<Void> startAsync(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { return startWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Starts one or more virtual machines in a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
Throws:
Returns:the observable for the request
/** * 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 instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponse<Void>> startWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmScaleSetName == null) { throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); final String apiVersion = "2020-12-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(instanceIds); } Observable<Response<ResponseBody>> observable = service.start(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<Void>() { }.getType()); }
Starts one or more virtual machines in a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */
public void beginStart(String resourceGroupName, String vmScaleSetName) { beginStartWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); }
Starts one or more virtual machines in a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<Void> beginStartAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginStartWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); }
Starts one or more virtual machines in a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
Returns:the ServiceResponse object if successful.
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<Void> beginStartAsync(String resourceGroupName, String vmScaleSetName) { return beginStartWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Starts one or more virtual machines in a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
Returns:the ServiceResponse object if successful.
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<ServiceResponse<Void>> beginStartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmScaleSetName == null) { throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } final String apiVersion = "2020-12-01"; final List<String> instanceIds = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); return service.beginStart(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Void>>>() { @Override public Observable<ServiceResponse<Void>> call(Response<ResponseBody> response) { try { ServiceResponse<Void> clientResponse = beginStartDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); }
Starts one or more virtual machines in a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
Throws:
/** * 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 instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */
public void beginStart(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { beginStartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); }
Starts one or more virtual machines in a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * 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 instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<Void> beginStartAsync(String resourceGroupName, String vmScaleSetName, List<String> instanceIds, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginStartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); }
Starts one or more virtual machines in a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
Throws:
Returns:the ServiceResponse object if successful.
/** * 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 instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<Void> beginStartAsync(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { return beginStartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Starts one or more virtual machines in a VM scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
Throws:
Returns:the ServiceResponse object if successful.
/** * 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 instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<ServiceResponse<Void>> beginStartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmScaleSetName == null) { throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); final String apiVersion = "2020-12-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(instanceIds); } return service.beginStart(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Void>>>() { @Override public Observable<ServiceResponse<Void>> call(Response<ResponseBody> response) { try { ServiceResponse<Void> clientResponse = beginStartDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<Void> beginStartDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<Void, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<Void>() { }.getType()) .register(202, new TypeToken<Void>() { }.getType()) .registerError(CloudException.class) .build(response); }
Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them back on.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
/** * Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them back on. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */
public void redeploy(String resourceGroupName, String vmScaleSetName) { redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); }
Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them back on.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them back on. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<Void> redeployAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); }
Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them back on.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
Returns:the observable for the request
/** * Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them back on. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<Void> redeployAsync(String resourceGroupName, String vmScaleSetName) { return redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them back on.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
Returns:the observable for the request
/** * Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them back on. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponse<Void>> redeployWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmScaleSetName == null) { throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } final String apiVersion = "2020-12-01"; final String instanceIdsConverted = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); Observable<Response<ResponseBody>> observable = service.redeploy(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<Void>() { }.getType()); }
Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them back on.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
Throws:
/** * Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them back on. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */
public void redeploy(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); }
Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them back on.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them back on. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<Void> redeployAsync(String resourceGroupName, String vmScaleSetName, List<String> instanceIds, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); }
Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them back on.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
Throws:
Returns:the observable for the request
/** * Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them back on. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<Void> redeployAsync(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { return redeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them back on.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
Throws:
Returns:the observable for the request
/** * Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them back on. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponse<Void>> redeployWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmScaleSetName == null) { throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); final String apiVersion = "2020-12-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(instanceIds); } Observable<Response<ResponseBody>> observable = service.redeploy(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<Void>() { }.getType()); }
Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them back on.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
/** * Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them back on. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */
public void beginRedeploy(String resourceGroupName, String vmScaleSetName) { beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); }
Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them back on.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them back on. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<Void> beginRedeployAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); }
Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them back on.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
Returns:the ServiceResponse object if successful.
/** * Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them back on. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<Void> beginRedeployAsync(String resourceGroupName, String vmScaleSetName) { return beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them back on.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
Returns:the ServiceResponse object if successful.
/** * Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them back on. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<ServiceResponse<Void>> beginRedeployWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmScaleSetName == null) { throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } final String apiVersion = "2020-12-01"; final List<String> instanceIds = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); return service.beginRedeploy(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Void>>>() { @Override public Observable<ServiceResponse<Void>> call(Response<ResponseBody> response) { try { ServiceResponse<Void> clientResponse = beginRedeployDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); }
Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them back on.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
Throws:
/** * Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them back on. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */
public void beginRedeploy(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); }
Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them back on.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them back on. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<Void> beginRedeployAsync(String resourceGroupName, String vmScaleSetName, List<String> instanceIds, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); }
Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them back on.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
Throws:
Returns:the ServiceResponse object if successful.
/** * Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them back on. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<Void> beginRedeployAsync(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { return beginRedeployWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them back on.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
Throws:
Returns:the ServiceResponse object if successful.
/** * Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them back on. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<ServiceResponse<Void>> beginRedeployWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmScaleSetName == null) { throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); final String apiVersion = "2020-12-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(instanceIds); } return service.beginRedeploy(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Void>>>() { @Override public Observable<ServiceResponse<Void>> call(Response<ResponseBody> response) { try { ServiceResponse<Void> clientResponse = beginRedeployDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<Void> beginRedeployDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<Void, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<Void>() { }.getType()) .register(202, new TypeToken<Void>() { }.getType()) .registerError(CloudException.class) .build(response); }
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.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */
public void performMaintenance(String resourceGroupName, String vmScaleSetName) { performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); }
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.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<Void> performMaintenanceAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); }
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.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
Returns:the observable for the request
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<Void> performMaintenanceAsync(String resourceGroupName, String vmScaleSetName) { return performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
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.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
Returns:the observable for the request
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponse<Void>> performMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmScaleSetName == null) { throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } final String apiVersion = "2020-12-01"; final String instanceIdsConverted = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); Observable<Response<ResponseBody>> observable = service.performMaintenance(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<Void>() { }.getType()); }
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.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
Throws:
/** * 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 instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */
public void performMaintenance(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); }
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.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * 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 instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<Void> performMaintenanceAsync(String resourceGroupName, String vmScaleSetName, List<String> instanceIds, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); }
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.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
Throws:
Returns:the observable for the request
/** * 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 instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<Void> performMaintenanceAsync(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { return performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
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.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
Throws:
Returns:the observable for the request
/** * 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 instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponse<Void>> performMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmScaleSetName == null) { throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); final String apiVersion = "2020-12-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(instanceIds); } Observable<Response<ResponseBody>> observable = service.performMaintenance(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<Void>() { }.getType()); }
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.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */
public void beginPerformMaintenance(String resourceGroupName, String vmScaleSetName) { beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); }
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.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<Void> beginPerformMaintenanceAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); }
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.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
Returns:the ServiceResponse object if successful.
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<Void> beginPerformMaintenanceAsync(String resourceGroupName, String vmScaleSetName) { return beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
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.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
Returns:the ServiceResponse object if successful.
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<ServiceResponse<Void>> beginPerformMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmScaleSetName == null) { throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } final String apiVersion = "2020-12-01"; final List<String> instanceIds = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); return service.beginPerformMaintenance(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Void>>>() { @Override public Observable<ServiceResponse<Void>> call(Response<ResponseBody> response) { try { ServiceResponse<Void> clientResponse = beginPerformMaintenanceDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); }
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.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
Throws:
/** * 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 instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */
public void beginPerformMaintenance(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); }
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.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * 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 instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<Void> beginPerformMaintenanceAsync(String resourceGroupName, String vmScaleSetName, List<String> instanceIds, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); }
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.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
Throws:
Returns:the ServiceResponse object if successful.
/** * 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 instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<Void> beginPerformMaintenanceAsync(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { return beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
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.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
Throws:
Returns:the ServiceResponse object if successful.
/** * 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 instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<ServiceResponse<Void>> beginPerformMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmScaleSetName == null) { throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); final String apiVersion = "2020-12-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(instanceIds); } return service.beginPerformMaintenance(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Void>>>() { @Override public Observable<ServiceResponse<Void>> call(Response<ResponseBody> response) { try { ServiceResponse<Void> clientResponse = beginPerformMaintenanceDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<Void> beginPerformMaintenanceDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<Void, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<Void>() { }.getType()) .register(202, new TypeToken<Void>() { }.getType()) .registerError(CloudException.class) .build(response); }
Upgrades one or more virtual machines to the latest SKU set in the VM scale set model.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids.
Throws:
/** * 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 instanceIds The virtual machine scale set instance ids. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */
public void updateInstances(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { updateInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); }
Upgrades one or more virtual machines to the latest SKU set in the VM scale set model.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * 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 instanceIds The virtual machine scale set instance ids. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<Void> updateInstancesAsync(String resourceGroupName, String vmScaleSetName, List<String> instanceIds, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(updateInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); }
Upgrades one or more virtual machines to the latest SKU set in the VM scale set model.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids.
Throws:
Returns:the observable for the request
/** * 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 instanceIds The virtual machine scale set instance ids. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<Void> updateInstancesAsync(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { return updateInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Upgrades one or more virtual machines to the latest SKU set in the VM scale set model.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids.
Throws:
Returns:the observable for the request
/** * 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 instanceIds The virtual machine scale set instance ids. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponse<Void>> updateInstancesWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmScaleSetName == null) { throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (instanceIds == null) { throw new IllegalArgumentException("Parameter instanceIds is required and cannot be null."); } Validator.validate(instanceIds); final String apiVersion = "2020-12-01"; VirtualMachineScaleSetVMInstanceRequiredIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceRequiredIDs(); vmInstanceIDs.withInstanceIds(instanceIds); Observable<Response<ResponseBody>> observable = service.updateInstances(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<Void>() { }.getType()); }
Upgrades one or more virtual machines to the latest SKU set in the VM scale set model.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids.
Throws:
/** * 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 instanceIds The virtual machine scale set instance ids. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */
public void beginUpdateInstances(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { beginUpdateInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); }
Upgrades one or more virtual machines to the latest SKU set in the VM scale set model.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * 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 instanceIds The virtual machine scale set instance ids. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<Void> beginUpdateInstancesAsync(String resourceGroupName, String vmScaleSetName, List<String> instanceIds, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginUpdateInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); }
Upgrades one or more virtual machines to the latest SKU set in the VM scale set model.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids.
Throws:
Returns:the ServiceResponse object if successful.
/** * 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 instanceIds The virtual machine scale set instance ids. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<Void> beginUpdateInstancesAsync(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { return beginUpdateInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Upgrades one or more virtual machines to the latest SKU set in the VM scale set model.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids.
Throws:
Returns:the ServiceResponse object if successful.
/** * 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 instanceIds The virtual machine scale set instance ids. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<ServiceResponse<Void>> beginUpdateInstancesWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmScaleSetName == null) { throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (instanceIds == null) { throw new IllegalArgumentException("Parameter instanceIds is required and cannot be null."); } Validator.validate(instanceIds); final String apiVersion = "2020-12-01"; VirtualMachineScaleSetVMInstanceRequiredIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceRequiredIDs(); vmInstanceIDs.withInstanceIds(instanceIds); return service.beginUpdateInstances(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Void>>>() { @Override public Observable<ServiceResponse<Void>> call(Response<ResponseBody> response) { try { ServiceResponse<Void> clientResponse = beginUpdateInstancesDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<Void> beginUpdateInstancesDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<Void, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<Void>() { }.getType()) .register(202, new TypeToken<Void>() { }.getType()) .registerError(CloudException.class) .build(response); }
Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
/** * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */
public void reimage(String resourceGroupName, String vmScaleSetName) { reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); }
Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<Void> reimageAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); }
Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
Returns:the observable for the request
/** * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<Void> reimageAsync(String resourceGroupName, String vmScaleSetName) { return reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
Returns:the observable for the request
/** * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponse<Void>> reimageWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmScaleSetName == null) { throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } final String apiVersion = "2020-12-01"; final VirtualMachineScaleSetReimageParameters vmScaleSetReimageInput = null; Observable<Response<ResponseBody>> observable = service.reimage(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), vmScaleSetReimageInput, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<Void>() { }.getType()); }
Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • vmScaleSetReimageInput – Parameters for Reimaging VM ScaleSet.
Throws:
/** * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param vmScaleSetReimageInput Parameters for Reimaging VM ScaleSet. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */
public void reimage(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetReimageParameters vmScaleSetReimageInput) { reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, vmScaleSetReimageInput).toBlocking().last().body(); }
Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • vmScaleSetReimageInput – Parameters for Reimaging VM ScaleSet.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param vmScaleSetReimageInput Parameters for Reimaging VM ScaleSet. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<Void> reimageAsync(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetReimageParameters vmScaleSetReimageInput, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, vmScaleSetReimageInput), serviceCallback); }
Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • vmScaleSetReimageInput – Parameters for Reimaging VM ScaleSet.
Throws:
Returns:the observable for the request
/** * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param vmScaleSetReimageInput Parameters for Reimaging VM ScaleSet. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<Void> reimageAsync(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetReimageParameters vmScaleSetReimageInput) { return reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, vmScaleSetReimageInput).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • vmScaleSetReimageInput – Parameters for Reimaging VM ScaleSet.
Throws:
Returns:the observable for the request
/** * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param vmScaleSetReimageInput Parameters for Reimaging VM ScaleSet. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponse<Void>> reimageWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetReimageParameters vmScaleSetReimageInput) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmScaleSetName == null) { throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(vmScaleSetReimageInput); final String apiVersion = "2020-12-01"; Observable<Response<ResponseBody>> observable = service.reimage(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), vmScaleSetReimageInput, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<Void>() { }.getType()); }
Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
/** * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */
public void beginReimage(String resourceGroupName, String vmScaleSetName) { beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); }
Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<Void> beginReimageAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); }
Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
Returns:the ServiceResponse object if successful.
/** * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<Void> beginReimageAsync(String resourceGroupName, String vmScaleSetName) { return beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
Returns:the ServiceResponse object if successful.
/** * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<ServiceResponse<Void>> beginReimageWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmScaleSetName == null) { throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } final String apiVersion = "2020-12-01"; final VirtualMachineScaleSetReimageParameters vmScaleSetReimageInput = null; return service.beginReimage(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), vmScaleSetReimageInput, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Void>>>() { @Override public Observable<ServiceResponse<Void>> call(Response<ResponseBody> response) { try { ServiceResponse<Void> clientResponse = beginReimageDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); }
Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • vmScaleSetReimageInput – Parameters for Reimaging VM ScaleSet.
Throws:
/** * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param vmScaleSetReimageInput Parameters for Reimaging VM ScaleSet. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */
public void beginReimage(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetReimageParameters vmScaleSetReimageInput) { beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, vmScaleSetReimageInput).toBlocking().single().body(); }
Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • vmScaleSetReimageInput – Parameters for Reimaging VM ScaleSet.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param vmScaleSetReimageInput Parameters for Reimaging VM ScaleSet. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<Void> beginReimageAsync(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetReimageParameters vmScaleSetReimageInput, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, vmScaleSetReimageInput), serviceCallback); }
Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • vmScaleSetReimageInput – Parameters for Reimaging VM ScaleSet.
Throws:
Returns:the ServiceResponse object if successful.
/** * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param vmScaleSetReimageInput Parameters for Reimaging VM ScaleSet. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<Void> beginReimageAsync(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetReimageParameters vmScaleSetReimageInput) { return beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, vmScaleSetReimageInput).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • vmScaleSetReimageInput – Parameters for Reimaging VM ScaleSet.
Throws:
Returns:the ServiceResponse object if successful.
/** * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param vmScaleSetReimageInput Parameters for Reimaging VM ScaleSet. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<ServiceResponse<Void>> beginReimageWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetReimageParameters vmScaleSetReimageInput) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmScaleSetName == null) { throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(vmScaleSetReimageInput); final String apiVersion = "2020-12-01"; return service.beginReimage(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), vmScaleSetReimageInput, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Void>>>() { @Override public Observable<ServiceResponse<Void>> call(Response<ResponseBody> response) { try { ServiceResponse<Void> clientResponse = beginReimageDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<Void> beginReimageDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<Void, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<Void>() { }.getType()) .register(202, new TypeToken<Void>() { }.getType()) .registerError(CloudException.class) .build(response); }
Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */
public void reimageAll(String resourceGroupName, String vmScaleSetName) { reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().body(); }
Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<Void> reimageAllAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); }
Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
Returns:the observable for the request
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<Void> reimageAllAsync(String resourceGroupName, String vmScaleSetName) { return reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
Returns:the observable for the request
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponse<Void>> reimageAllWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmScaleSetName == null) { throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } final String apiVersion = "2020-12-01"; final String instanceIdsConverted = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); Observable<Response<ResponseBody>> observable = service.reimageAll(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<Void>() { }.getType()); }
Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
Throws:
/** * 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 instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */
public void reimageAll(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().body(); }
Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * 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 instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<Void> reimageAllAsync(String resourceGroupName, String vmScaleSetName, List<String> instanceIds, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); }
Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
Throws:
Returns:the observable for the request
/** * 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 instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<Void> reimageAllAsync(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { return reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
Throws:
Returns:the observable for the request
/** * 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 instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponse<Void>> reimageAllWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmScaleSetName == null) { throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); final String apiVersion = "2020-12-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(instanceIds); } Observable<Response<ResponseBody>> observable = service.reimageAll(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<Void>() { }.getType()); }
Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */
public void beginReimageAll(String resourceGroupName, String vmScaleSetName) { beginReimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); }
Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<Void> beginReimageAllAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginReimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); }
Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
Returns:the ServiceResponse object if successful.
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<Void> beginReimageAllAsync(String resourceGroupName, String vmScaleSetName) { return beginReimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
Throws:
Returns:the ServiceResponse object if successful.
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<ServiceResponse<Void>> beginReimageAllWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmScaleSetName == null) { throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } final String apiVersion = "2020-12-01"; final List<String> instanceIds = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); return service.beginReimageAll(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Void>>>() { @Override public Observable<ServiceResponse<Void>> call(Response<ResponseBody> response) { try { ServiceResponse<Void> clientResponse = beginReimageAllDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); }
Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
Throws:
/** * 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 instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */
public void beginReimageAll(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { beginReimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); }
Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * 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 instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<Void> beginReimageAllAsync(String resourceGroupName, String vmScaleSetName, List<String> instanceIds, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginReimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds), serviceCallback); }
Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
Throws:
Returns:the ServiceResponse object if successful.
/** * 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 instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<Void> beginReimageAllAsync(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { return beginReimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • instanceIds – The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
Throws:
Returns:the ServiceResponse object if successful.
/** * 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 instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<ServiceResponse<Void>> beginReimageAllWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmScaleSetName == null) { throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); final String apiVersion = "2020-12-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(instanceIds); } return service.beginReimageAll(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Void>>>() { @Override public Observable<ServiceResponse<Void>> call(Response<ResponseBody> response) { try { ServiceResponse<Void> clientResponse = beginReimageAllDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<Void> beginReimageAllDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<Void, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<Void>() { }.getType()) .register(202, new TypeToken<Void>() { }.getType()) .registerError(CloudException.class) .build(response); }
Manual platform update domain walk to update virtual machines in a service fabric virtual machine scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • platformUpdateDomain – The platform update domain for which a manual recovery walk is requested
Throws:
Returns:the RecoveryWalkResponseInner object if successful.
/** * 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 * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the RecoveryWalkResponseInner object if successful. */
public RecoveryWalkResponseInner forceRecoveryServiceFabricPlatformUpdateDomainWalk(String resourceGroupName, String vmScaleSetName, int platformUpdateDomain) { return forceRecoveryServiceFabricPlatformUpdateDomainWalkWithServiceResponseAsync(resourceGroupName, vmScaleSetName, platformUpdateDomain).toBlocking().single().body(); }
Manual platform update domain walk to update virtual machines in a service fabric virtual machine scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • platformUpdateDomain – The platform update domain for which a manual recovery walk is requested
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * 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 serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<RecoveryWalkResponseInner> forceRecoveryServiceFabricPlatformUpdateDomainWalkAsync(String resourceGroupName, String vmScaleSetName, int platformUpdateDomain, final ServiceCallback<RecoveryWalkResponseInner> serviceCallback) { return ServiceFuture.fromResponse(forceRecoveryServiceFabricPlatformUpdateDomainWalkWithServiceResponseAsync(resourceGroupName, vmScaleSetName, platformUpdateDomain), serviceCallback); }
Manual platform update domain walk to update virtual machines in a service fabric virtual machine scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • platformUpdateDomain – The platform update domain for which a manual recovery walk is requested
Throws:
Returns:the observable to the RecoveryWalkResponseInner object
/** * 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 * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the RecoveryWalkResponseInner object */
public Observable<RecoveryWalkResponseInner> forceRecoveryServiceFabricPlatformUpdateDomainWalkAsync(String resourceGroupName, String vmScaleSetName, int platformUpdateDomain) { return forceRecoveryServiceFabricPlatformUpdateDomainWalkWithServiceResponseAsync(resourceGroupName, vmScaleSetName, platformUpdateDomain).map(new Func1<ServiceResponse<RecoveryWalkResponseInner>, RecoveryWalkResponseInner>() { @Override public RecoveryWalkResponseInner call(ServiceResponse<RecoveryWalkResponseInner> response) { return response.body(); } }); }
Manual platform update domain walk to update virtual machines in a service fabric virtual machine scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the VM scale set.
  • platformUpdateDomain – The platform update domain for which a manual recovery walk is requested
Throws:
Returns:the observable to the RecoveryWalkResponseInner object
/** * 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 * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the RecoveryWalkResponseInner object */
public Observable<ServiceResponse<RecoveryWalkResponseInner>> forceRecoveryServiceFabricPlatformUpdateDomainWalkWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, int platformUpdateDomain) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmScaleSetName == null) { throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } final String apiVersion = "2020-12-01"; return service.forceRecoveryServiceFabricPlatformUpdateDomainWalk(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, platformUpdateDomain, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<RecoveryWalkResponseInner>>>() { @Override public Observable<ServiceResponse<RecoveryWalkResponseInner>> call(Response<ResponseBody> response) { try { ServiceResponse<RecoveryWalkResponseInner> clientResponse = forceRecoveryServiceFabricPlatformUpdateDomainWalkDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<RecoveryWalkResponseInner> forceRecoveryServiceFabricPlatformUpdateDomainWalkDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<RecoveryWalkResponseInner, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<RecoveryWalkResponseInner>() { }.getType()) .registerError(CloudException.class) .build(response); }
Converts SinglePlacementGroup property to false for a existing virtual machine scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the virtual machine scale set to create or update.
Throws:
/** * Converts SinglePlacementGroup property to false for a existing virtual machine scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */
public void convertToSinglePlacementGroup(String resourceGroupName, String vmScaleSetName) { convertToSinglePlacementGroupWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); }
Converts SinglePlacementGroup property to false for a existing virtual machine scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the virtual machine scale set to create or update.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Converts SinglePlacementGroup property to false for a existing virtual machine scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set to create or update. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<Void> convertToSinglePlacementGroupAsync(String resourceGroupName, String vmScaleSetName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(convertToSinglePlacementGroupWithServiceResponseAsync(resourceGroupName, vmScaleSetName), serviceCallback); }
Converts SinglePlacementGroup property to false for a existing virtual machine scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the virtual machine scale set to create or update.
Throws:
Returns:the ServiceResponse object if successful.
/** * Converts SinglePlacementGroup property to false for a existing virtual machine scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<Void> convertToSinglePlacementGroupAsync(String resourceGroupName, String vmScaleSetName) { return convertToSinglePlacementGroupWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Converts SinglePlacementGroup property to false for a existing virtual machine scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the virtual machine scale set to create or update.
Throws:
Returns:the ServiceResponse object if successful.
/** * Converts SinglePlacementGroup property to false for a existing virtual machine scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<ServiceResponse<Void>> convertToSinglePlacementGroupWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmScaleSetName == null) { throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } final String apiVersion = "2020-12-01"; final String activePlacementGroupId = null; VMScaleSetConvertToSinglePlacementGroupInput parameters = new VMScaleSetConvertToSinglePlacementGroupInput(); parameters.withActivePlacementGroupId(null); return service.convertToSinglePlacementGroup(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Void>>>() { @Override public Observable<ServiceResponse<Void>> call(Response<ResponseBody> response) { try { ServiceResponse<Void> clientResponse = convertToSinglePlacementGroupDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); }
Converts SinglePlacementGroup property to false for a existing virtual machine scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the virtual machine scale set to create or update.
  • activePlacementGroupId – Id of the placement group in which you want future virtual machine instances to be placed. To query placement group Id, please use Virtual Machine Scale Set VMs - Get API. If not provided, the platform will choose one with maximum number of virtual machine instances.
Throws:
/** * Converts SinglePlacementGroup property to false for a existing virtual machine scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set to create or update. * @param activePlacementGroupId Id of the placement group in which you want future virtual machine instances to be placed. To query placement group Id, please use Virtual Machine Scale Set VMs - Get API. If not provided, the platform will choose one with maximum number of virtual machine instances. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */
public void convertToSinglePlacementGroup(String resourceGroupName, String vmScaleSetName, String activePlacementGroupId) { convertToSinglePlacementGroupWithServiceResponseAsync(resourceGroupName, vmScaleSetName, activePlacementGroupId).toBlocking().single().body(); }
Converts SinglePlacementGroup property to false for a existing virtual machine scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the virtual machine scale set to create or update.
  • activePlacementGroupId – Id of the placement group in which you want future virtual machine instances to be placed. To query placement group Id, please use Virtual Machine Scale Set VMs - Get API. If not provided, the platform will choose one with maximum number of virtual machine instances.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Converts SinglePlacementGroup property to false for a existing virtual machine scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set to create or update. * @param activePlacementGroupId Id of the placement group in which you want future virtual machine instances to be placed. To query placement group Id, please use Virtual Machine Scale Set VMs - Get API. If not provided, the platform will choose one with maximum number of virtual machine instances. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<Void> convertToSinglePlacementGroupAsync(String resourceGroupName, String vmScaleSetName, String activePlacementGroupId, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(convertToSinglePlacementGroupWithServiceResponseAsync(resourceGroupName, vmScaleSetName, activePlacementGroupId), serviceCallback); }
Converts SinglePlacementGroup property to false for a existing virtual machine scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the virtual machine scale set to create or update.
  • activePlacementGroupId – Id of the placement group in which you want future virtual machine instances to be placed. To query placement group Id, please use Virtual Machine Scale Set VMs - Get API. If not provided, the platform will choose one with maximum number of virtual machine instances.
Throws:
Returns:the ServiceResponse object if successful.
/** * Converts SinglePlacementGroup property to false for a existing virtual machine scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set to create or update. * @param activePlacementGroupId Id of the placement group in which you want future virtual machine instances to be placed. To query placement group Id, please use Virtual Machine Scale Set VMs - Get API. If not provided, the platform will choose one with maximum number of virtual machine instances. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<Void> convertToSinglePlacementGroupAsync(String resourceGroupName, String vmScaleSetName, String activePlacementGroupId) { return convertToSinglePlacementGroupWithServiceResponseAsync(resourceGroupName, vmScaleSetName, activePlacementGroupId).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Converts SinglePlacementGroup property to false for a existing virtual machine scale set.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the virtual machine scale set to create or update.
  • activePlacementGroupId – Id of the placement group in which you want future virtual machine instances to be placed. To query placement group Id, please use Virtual Machine Scale Set VMs - Get API. If not provided, the platform will choose one with maximum number of virtual machine instances.
Throws:
Returns:the ServiceResponse object if successful.
/** * Converts SinglePlacementGroup property to false for a existing virtual machine scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set to create or update. * @param activePlacementGroupId Id of the placement group in which you want future virtual machine instances to be placed. To query placement group Id, please use Virtual Machine Scale Set VMs - Get API. If not provided, the platform will choose one with maximum number of virtual machine instances. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<ServiceResponse<Void>> convertToSinglePlacementGroupWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String activePlacementGroupId) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmScaleSetName == null) { throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } final String apiVersion = "2020-12-01"; VMScaleSetConvertToSinglePlacementGroupInput parameters = new VMScaleSetConvertToSinglePlacementGroupInput(); parameters.withActivePlacementGroupId(activePlacementGroupId); return service.convertToSinglePlacementGroup(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Void>>>() { @Override public Observable<ServiceResponse<Void>> call(Response<ResponseBody> response) { try { ServiceResponse<Void> clientResponse = convertToSinglePlacementGroupDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<Void> convertToSinglePlacementGroupDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<Void, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<Void>() { }.getType()) .registerError(CloudException.class) .build(response); }
Changes ServiceState property for a given service.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the virtual machine scale set to create or update.
  • action – The action to be performed. Possible values include: 'Resume', 'Suspend'
Throws:
/** * Changes ServiceState property for a given service. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set to create or update. * @param action The action to be performed. Possible values include: 'Resume', 'Suspend' * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */
public void setOrchestrationServiceState(String resourceGroupName, String vmScaleSetName, OrchestrationServiceStateAction action) { setOrchestrationServiceStateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, action).toBlocking().last().body(); }
Changes ServiceState property for a given service.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the virtual machine scale set to create or update.
  • action – The action to be performed. Possible values include: 'Resume', 'Suspend'
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Changes ServiceState property for a given service. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set to create or update. * @param action The action to be performed. Possible values include: 'Resume', 'Suspend' * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<Void> setOrchestrationServiceStateAsync(String resourceGroupName, String vmScaleSetName, OrchestrationServiceStateAction action, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(setOrchestrationServiceStateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, action), serviceCallback); }
Changes ServiceState property for a given service.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the virtual machine scale set to create or update.
  • action – The action to be performed. Possible values include: 'Resume', 'Suspend'
Throws:
Returns:the observable for the request
/** * Changes ServiceState property for a given service. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set to create or update. * @param action The action to be performed. Possible values include: 'Resume', 'Suspend' * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<Void> setOrchestrationServiceStateAsync(String resourceGroupName, String vmScaleSetName, OrchestrationServiceStateAction action) { return setOrchestrationServiceStateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, action).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Changes ServiceState property for a given service.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the virtual machine scale set to create or update.
  • action – The action to be performed. Possible values include: 'Resume', 'Suspend'
Throws:
Returns:the observable for the request
/** * Changes ServiceState property for a given service. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set to create or update. * @param action The action to be performed. Possible values include: 'Resume', 'Suspend' * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponse<Void>> setOrchestrationServiceStateWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, OrchestrationServiceStateAction action) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmScaleSetName == null) { throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (action == null) { throw new IllegalArgumentException("Parameter action is required and cannot be null."); } final String apiVersion = "2020-12-01"; OrchestrationServiceStateInput parameters = new OrchestrationServiceStateInput(); parameters.withAction(action); Observable<Response<ResponseBody>> observable = service.setOrchestrationServiceState(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<Void>() { }.getType()); }
Changes ServiceState property for a given service.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the virtual machine scale set to create or update.
  • action – The action to be performed. Possible values include: 'Resume', 'Suspend'
Throws:
/** * Changes ServiceState property for a given service. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set to create or update. * @param action The action to be performed. Possible values include: 'Resume', 'Suspend' * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */
public void beginSetOrchestrationServiceState(String resourceGroupName, String vmScaleSetName, OrchestrationServiceStateAction action) { beginSetOrchestrationServiceStateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, action).toBlocking().single().body(); }
Changes ServiceState property for a given service.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the virtual machine scale set to create or update.
  • action – The action to be performed. Possible values include: 'Resume', 'Suspend'
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Changes ServiceState property for a given service. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set to create or update. * @param action The action to be performed. Possible values include: 'Resume', 'Suspend' * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<Void> beginSetOrchestrationServiceStateAsync(String resourceGroupName, String vmScaleSetName, OrchestrationServiceStateAction action, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginSetOrchestrationServiceStateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, action), serviceCallback); }
Changes ServiceState property for a given service.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the virtual machine scale set to create or update.
  • action – The action to be performed. Possible values include: 'Resume', 'Suspend'
Throws:
Returns:the ServiceResponse object if successful.
/** * Changes ServiceState property for a given service. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set to create or update. * @param action The action to be performed. Possible values include: 'Resume', 'Suspend' * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<Void> beginSetOrchestrationServiceStateAsync(String resourceGroupName, String vmScaleSetName, OrchestrationServiceStateAction action) { return beginSetOrchestrationServiceStateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, action).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Changes ServiceState property for a given service.
Params:
  • resourceGroupName – The name of the resource group.
  • vmScaleSetName – The name of the virtual machine scale set to create or update.
  • action – The action to be performed. Possible values include: 'Resume', 'Suspend'
Throws:
Returns:the ServiceResponse object if successful.
/** * Changes ServiceState property for a given service. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set to create or update. * @param action The action to be performed. Possible values include: 'Resume', 'Suspend' * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<ServiceResponse<Void>> beginSetOrchestrationServiceStateWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, OrchestrationServiceStateAction action) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmScaleSetName == null) { throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (action == null) { throw new IllegalArgumentException("Parameter action is required and cannot be null."); } final String apiVersion = "2020-12-01"; OrchestrationServiceStateInput parameters = new OrchestrationServiceStateInput(); parameters.withAction(action); return service.beginSetOrchestrationServiceState(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Void>>>() { @Override public Observable<ServiceResponse<Void>> call(Response<ResponseBody> response) { try { ServiceResponse<Void> clientResponse = beginSetOrchestrationServiceStateDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<Void> beginSetOrchestrationServiceStateDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<Void, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<Void>() { }.getType()) .register(202, new TypeToken<Void>() { }.getType()) .registerError(CloudException.class) .build(response); }
Gets all the VM scale sets under the specified subscription for the specified location.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the PagedList<VirtualMachineScaleSetInner> object if successful.
/** * Gets all the VM scale sets under the specified subscription for the specified location. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList&lt;VirtualMachineScaleSetInner&gt; object if successful. */
public PagedList<VirtualMachineScaleSetInner> listByLocationNext(final String nextPageLink) { ServiceResponse<Page<VirtualMachineScaleSetInner>> response = listByLocationNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList<VirtualMachineScaleSetInner>(response.body()) { @Override public Page<VirtualMachineScaleSetInner> nextPage(String nextPageLink) { return listByLocationNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
Gets all the VM scale sets under the specified subscription for the specified location.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
  • serviceFuture – the ServiceFuture object tracking the Retrofit calls
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Gets all the VM scale sets under the specified subscription for the specified location. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceFuture the ServiceFuture object tracking the Retrofit calls * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<List<VirtualMachineScaleSetInner>> listByLocationNextAsync(final String nextPageLink, final ServiceFuture<List<VirtualMachineScaleSetInner>> serviceFuture, final ListOperationCallback<VirtualMachineScaleSetInner> serviceCallback) { return AzureServiceFuture.fromPageResponse( listByLocationNextSinglePageAsync(nextPageLink), new Func1<String, Observable<ServiceResponse<Page<VirtualMachineScaleSetInner>>>>() { @Override public Observable<ServiceResponse<Page<VirtualMachineScaleSetInner>>> call(String nextPageLink) { return listByLocationNextSinglePageAsync(nextPageLink); } }, serviceCallback); }
Gets all the VM scale sets under the specified subscription for the specified location.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the observable to the PagedList<VirtualMachineScaleSetInner> object
/** * Gets all the VM scale sets under the specified subscription for the specified location. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;VirtualMachineScaleSetInner&gt; object */
public Observable<Page<VirtualMachineScaleSetInner>> listByLocationNextAsync(final String nextPageLink) { return listByLocationNextWithServiceResponseAsync(nextPageLink) .map(new Func1<ServiceResponse<Page<VirtualMachineScaleSetInner>>, Page<VirtualMachineScaleSetInner>>() { @Override public Page<VirtualMachineScaleSetInner> call(ServiceResponse<Page<VirtualMachineScaleSetInner>> response) { return response.body(); } }); }
Gets all the VM scale sets under the specified subscription for the specified location.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the observable to the PagedList<VirtualMachineScaleSetInner> object
/** * Gets all the VM scale sets under the specified subscription for the specified location. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;VirtualMachineScaleSetInner&gt; object */
public Observable<ServiceResponse<Page<VirtualMachineScaleSetInner>>> listByLocationNextWithServiceResponseAsync(final String nextPageLink) { return listByLocationNextSinglePageAsync(nextPageLink) .concatMap(new Func1<ServiceResponse<Page<VirtualMachineScaleSetInner>>, Observable<ServiceResponse<Page<VirtualMachineScaleSetInner>>>>() { @Override public Observable<ServiceResponse<Page<VirtualMachineScaleSetInner>>> call(ServiceResponse<Page<VirtualMachineScaleSetInner>> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } return Observable.just(page).concatWith(listByLocationNextWithServiceResponseAsync(nextPageLink)); } }); }
Gets all the VM scale sets under the specified subscription for the specified location. ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation.
Throws:
Returns:the PagedList<VirtualMachineScaleSetInner> object wrapped in ServiceResponse if successful.
/** * Gets all the VM scale sets under the specified subscription for the specified location. * ServiceResponse<PageImpl1<VirtualMachineScaleSetInner>> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList&lt;VirtualMachineScaleSetInner&gt; object wrapped in {@link ServiceResponse} if successful. */
public Observable<ServiceResponse<Page<VirtualMachineScaleSetInner>>> listByLocationNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } String nextUrl = String.format("%s", nextPageLink); return service.listByLocationNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<VirtualMachineScaleSetInner>>>>() { @Override public Observable<ServiceResponse<Page<VirtualMachineScaleSetInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl1<VirtualMachineScaleSetInner>> result = listByLocationNextDelegate(response); return Observable.just(new ServiceResponse<Page<VirtualMachineScaleSetInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<PageImpl1<VirtualMachineScaleSetInner>> listByLocationNextDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<PageImpl1<VirtualMachineScaleSetInner>, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<PageImpl1<VirtualMachineScaleSetInner>>() { }.getType()) .registerError(CloudException.class) .build(response); }
Gets a list of all VM scale sets under a resource group.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the PagedList<VirtualMachineScaleSetInner> object if successful.
/** * Gets a list of all VM scale sets under a resource group. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList&lt;VirtualMachineScaleSetInner&gt; object if successful. */
public PagedList<VirtualMachineScaleSetInner> listByResourceGroupNext(final String nextPageLink) { ServiceResponse<Page<VirtualMachineScaleSetInner>> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList<VirtualMachineScaleSetInner>(response.body()) { @Override public Page<VirtualMachineScaleSetInner> nextPage(String nextPageLink) { return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
Gets a list of all VM scale sets under a resource group.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
  • serviceFuture – the ServiceFuture object tracking the Retrofit calls
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * 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 serviceFuture the ServiceFuture object tracking the Retrofit calls * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<List<VirtualMachineScaleSetInner>> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture<List<VirtualMachineScaleSetInner>> serviceFuture, final ListOperationCallback<VirtualMachineScaleSetInner> serviceCallback) { return AzureServiceFuture.fromPageResponse( listByResourceGroupNextSinglePageAsync(nextPageLink), new Func1<String, Observable<ServiceResponse<Page<VirtualMachineScaleSetInner>>>>() { @Override public Observable<ServiceResponse<Page<VirtualMachineScaleSetInner>>> call(String nextPageLink) { return listByResourceGroupNextSinglePageAsync(nextPageLink); } }, serviceCallback); }
Gets a list of all VM scale sets under a resource group.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the observable to the PagedList<VirtualMachineScaleSetInner> object
/** * Gets a list of all VM scale sets under a resource group. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;VirtualMachineScaleSetInner&gt; object */
public Observable<Page<VirtualMachineScaleSetInner>> listByResourceGroupNextAsync(final String nextPageLink) { return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) .map(new Func1<ServiceResponse<Page<VirtualMachineScaleSetInner>>, Page<VirtualMachineScaleSetInner>>() { @Override public Page<VirtualMachineScaleSetInner> call(ServiceResponse<Page<VirtualMachineScaleSetInner>> response) { return response.body(); } }); }
Gets a list of all VM scale sets under a resource group.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the observable to the PagedList<VirtualMachineScaleSetInner> object
/** * Gets a list of all VM scale sets under a resource group. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;VirtualMachineScaleSetInner&gt; object */
public Observable<ServiceResponse<Page<VirtualMachineScaleSetInner>>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { return listByResourceGroupNextSinglePageAsync(nextPageLink) .concatMap(new Func1<ServiceResponse<Page<VirtualMachineScaleSetInner>>, Observable<ServiceResponse<Page<VirtualMachineScaleSetInner>>>>() { @Override public Observable<ServiceResponse<Page<VirtualMachineScaleSetInner>>> call(ServiceResponse<Page<VirtualMachineScaleSetInner>> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); } }); }
Gets a list of all VM scale sets under a resource group. ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation.
Throws:
Returns:the PagedList<VirtualMachineScaleSetInner> object wrapped in ServiceResponse if successful.
/** * Gets a list of all VM scale sets under a resource group. * ServiceResponse<PageImpl1<VirtualMachineScaleSetInner>> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList&lt;VirtualMachineScaleSetInner&gt; object wrapped in {@link ServiceResponse} if successful. */
public Observable<ServiceResponse<Page<VirtualMachineScaleSetInner>>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } String nextUrl = String.format("%s", nextPageLink); return service.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<VirtualMachineScaleSetInner>>>>() { @Override public Observable<ServiceResponse<Page<VirtualMachineScaleSetInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl1<VirtualMachineScaleSetInner>> result = listByResourceGroupNextDelegate(response); return Observable.just(new ServiceResponse<Page<VirtualMachineScaleSetInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<PageImpl1<VirtualMachineScaleSetInner>> listByResourceGroupNextDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<PageImpl1<VirtualMachineScaleSetInner>, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<PageImpl1<VirtualMachineScaleSetInner>>() { }.getType()) .registerError(CloudException.class) .build(response); }
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.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the PagedList<VirtualMachineScaleSetInner> object if successful.
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList&lt;VirtualMachineScaleSetInner&gt; object if successful. */
public PagedList<VirtualMachineScaleSetInner> listNext(final String nextPageLink) { ServiceResponse<Page<VirtualMachineScaleSetInner>> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList<VirtualMachineScaleSetInner>(response.body()) { @Override public Page<VirtualMachineScaleSetInner> nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
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.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
  • serviceFuture – the ServiceFuture object tracking the Retrofit calls
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * 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 serviceFuture the ServiceFuture object tracking the Retrofit calls * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<List<VirtualMachineScaleSetInner>> listNextAsync(final String nextPageLink, final ServiceFuture<List<VirtualMachineScaleSetInner>> serviceFuture, final ListOperationCallback<VirtualMachineScaleSetInner> serviceCallback) { return AzureServiceFuture.fromPageResponse( listNextSinglePageAsync(nextPageLink), new Func1<String, Observable<ServiceResponse<Page<VirtualMachineScaleSetInner>>>>() { @Override public Observable<ServiceResponse<Page<VirtualMachineScaleSetInner>>> call(String nextPageLink) { return listNextSinglePageAsync(nextPageLink); } }, serviceCallback); }
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.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the observable to the PagedList<VirtualMachineScaleSetInner> object
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;VirtualMachineScaleSetInner&gt; object */
public Observable<Page<VirtualMachineScaleSetInner>> listNextAsync(final String nextPageLink) { return listNextWithServiceResponseAsync(nextPageLink) .map(new Func1<ServiceResponse<Page<VirtualMachineScaleSetInner>>, Page<VirtualMachineScaleSetInner>>() { @Override public Page<VirtualMachineScaleSetInner> call(ServiceResponse<Page<VirtualMachineScaleSetInner>> response) { return response.body(); } }); }
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.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the observable to the PagedList<VirtualMachineScaleSetInner> object
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;VirtualMachineScaleSetInner&gt; object */
public Observable<ServiceResponse<Page<VirtualMachineScaleSetInner>>> listNextWithServiceResponseAsync(final String nextPageLink) { return listNextSinglePageAsync(nextPageLink) .concatMap(new Func1<ServiceResponse<Page<VirtualMachineScaleSetInner>>, Observable<ServiceResponse<Page<VirtualMachineScaleSetInner>>>>() { @Override public Observable<ServiceResponse<Page<VirtualMachineScaleSetInner>>> call(ServiceResponse<Page<VirtualMachineScaleSetInner>> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); } }); }
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. ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation.
Throws:
Returns:the PagedList<VirtualMachineScaleSetInner> object wrapped in ServiceResponse if successful.
/** * 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. * ServiceResponse<PageImpl1<VirtualMachineScaleSetInner>> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList&lt;VirtualMachineScaleSetInner&gt; object wrapped in {@link ServiceResponse} if successful. */
public Observable<ServiceResponse<Page<VirtualMachineScaleSetInner>>> listNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } String nextUrl = String.format("%s", nextPageLink); return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<VirtualMachineScaleSetInner>>>>() { @Override public Observable<ServiceResponse<Page<VirtualMachineScaleSetInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl1<VirtualMachineScaleSetInner>> result = listNextDelegate(response); return Observable.just(new ServiceResponse<Page<VirtualMachineScaleSetInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<PageImpl1<VirtualMachineScaleSetInner>> listNextDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<PageImpl1<VirtualMachineScaleSetInner>, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<PageImpl1<VirtualMachineScaleSetInner>>() { }.getType()) .registerError(CloudException.class) .build(response); }
Gets a list of SKUs available for your VM scale set, including the minimum and maximum VM instances allowed for each SKU.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the PagedList<VirtualMachineScaleSetSkuInner> object if successful.
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList&lt;VirtualMachineScaleSetSkuInner&gt; object if successful. */
public PagedList<VirtualMachineScaleSetSkuInner> listSkusNext(final String nextPageLink) { ServiceResponse<Page<VirtualMachineScaleSetSkuInner>> response = listSkusNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList<VirtualMachineScaleSetSkuInner>(response.body()) { @Override public Page<VirtualMachineScaleSetSkuInner> nextPage(String nextPageLink) { return listSkusNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
Gets a list of SKUs available for your VM scale set, including the minimum and maximum VM instances allowed for each SKU.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
  • serviceFuture – the ServiceFuture object tracking the Retrofit calls
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * 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 serviceFuture the ServiceFuture object tracking the Retrofit calls * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<List<VirtualMachineScaleSetSkuInner>> listSkusNextAsync(final String nextPageLink, final ServiceFuture<List<VirtualMachineScaleSetSkuInner>> serviceFuture, final ListOperationCallback<VirtualMachineScaleSetSkuInner> serviceCallback) { return AzureServiceFuture.fromPageResponse( listSkusNextSinglePageAsync(nextPageLink), new Func1<String, Observable<ServiceResponse<Page<VirtualMachineScaleSetSkuInner>>>>() { @Override public Observable<ServiceResponse<Page<VirtualMachineScaleSetSkuInner>>> call(String nextPageLink) { return listSkusNextSinglePageAsync(nextPageLink); } }, serviceCallback); }
Gets a list of SKUs available for your VM scale set, including the minimum and maximum VM instances allowed for each SKU.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the observable to the PagedList<VirtualMachineScaleSetSkuInner> object
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;VirtualMachineScaleSetSkuInner&gt; object */
public Observable<Page<VirtualMachineScaleSetSkuInner>> listSkusNextAsync(final String nextPageLink) { return listSkusNextWithServiceResponseAsync(nextPageLink) .map(new Func1<ServiceResponse<Page<VirtualMachineScaleSetSkuInner>>, Page<VirtualMachineScaleSetSkuInner>>() { @Override public Page<VirtualMachineScaleSetSkuInner> call(ServiceResponse<Page<VirtualMachineScaleSetSkuInner>> response) { return response.body(); } }); }
Gets a list of SKUs available for your VM scale set, including the minimum and maximum VM instances allowed for each SKU.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the observable to the PagedList<VirtualMachineScaleSetSkuInner> object
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;VirtualMachineScaleSetSkuInner&gt; object */
public Observable<ServiceResponse<Page<VirtualMachineScaleSetSkuInner>>> listSkusNextWithServiceResponseAsync(final String nextPageLink) { return listSkusNextSinglePageAsync(nextPageLink) .concatMap(new Func1<ServiceResponse<Page<VirtualMachineScaleSetSkuInner>>, Observable<ServiceResponse<Page<VirtualMachineScaleSetSkuInner>>>>() { @Override public Observable<ServiceResponse<Page<VirtualMachineScaleSetSkuInner>>> call(ServiceResponse<Page<VirtualMachineScaleSetSkuInner>> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } return Observable.just(page).concatWith(listSkusNextWithServiceResponseAsync(nextPageLink)); } }); }
Gets a list of SKUs available for your VM scale set, including the minimum and maximum VM instances allowed for each SKU. ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation.
Throws:
Returns:the PagedList<VirtualMachineScaleSetSkuInner> object wrapped in ServiceResponse if successful.
/** * Gets a list of SKUs available for your VM scale set, including the minimum and maximum VM instances allowed for each SKU. * ServiceResponse<PageImpl1<VirtualMachineScaleSetSkuInner>> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList&lt;VirtualMachineScaleSetSkuInner&gt; object wrapped in {@link ServiceResponse} if successful. */
public Observable<ServiceResponse<Page<VirtualMachineScaleSetSkuInner>>> listSkusNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } String nextUrl = String.format("%s", nextPageLink); return service.listSkusNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<VirtualMachineScaleSetSkuInner>>>>() { @Override public Observable<ServiceResponse<Page<VirtualMachineScaleSetSkuInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl1<VirtualMachineScaleSetSkuInner>> result = listSkusNextDelegate(response); return Observable.just(new ServiceResponse<Page<VirtualMachineScaleSetSkuInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<PageImpl1<VirtualMachineScaleSetSkuInner>> listSkusNextDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<PageImpl1<VirtualMachineScaleSetSkuInner>, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<PageImpl1<VirtualMachineScaleSetSkuInner>>() { }.getType()) .registerError(CloudException.class) .build(response); }
Gets list of OS upgrades on a VM scale set instance.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the PagedList<UpgradeOperationHistoricalStatusInfoInner> object if successful.
/** * Gets list of OS upgrades on a VM scale set instance. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList&lt;UpgradeOperationHistoricalStatusInfoInner&gt; object if successful. */
public PagedList<UpgradeOperationHistoricalStatusInfoInner> getOSUpgradeHistoryNext(final String nextPageLink) { ServiceResponse<Page<UpgradeOperationHistoricalStatusInfoInner>> response = getOSUpgradeHistoryNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList<UpgradeOperationHistoricalStatusInfoInner>(response.body()) { @Override public Page<UpgradeOperationHistoricalStatusInfoInner> nextPage(String nextPageLink) { return getOSUpgradeHistoryNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
Gets list of OS upgrades on a VM scale set instance.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
  • serviceFuture – the ServiceFuture object tracking the Retrofit calls
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Gets list of OS upgrades on a VM scale set instance. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceFuture the ServiceFuture object tracking the Retrofit calls * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<List<UpgradeOperationHistoricalStatusInfoInner>> getOSUpgradeHistoryNextAsync(final String nextPageLink, final ServiceFuture<List<UpgradeOperationHistoricalStatusInfoInner>> serviceFuture, final ListOperationCallback<UpgradeOperationHistoricalStatusInfoInner> serviceCallback) { return AzureServiceFuture.fromPageResponse( getOSUpgradeHistoryNextSinglePageAsync(nextPageLink), new Func1<String, Observable<ServiceResponse<Page<UpgradeOperationHistoricalStatusInfoInner>>>>() { @Override public Observable<ServiceResponse<Page<UpgradeOperationHistoricalStatusInfoInner>>> call(String nextPageLink) { return getOSUpgradeHistoryNextSinglePageAsync(nextPageLink); } }, serviceCallback); }
Gets list of OS upgrades on a VM scale set instance.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the observable to the PagedList<UpgradeOperationHistoricalStatusInfoInner> object
/** * Gets list of OS upgrades on a VM scale set instance. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;UpgradeOperationHistoricalStatusInfoInner&gt; object */
public Observable<Page<UpgradeOperationHistoricalStatusInfoInner>> getOSUpgradeHistoryNextAsync(final String nextPageLink) { return getOSUpgradeHistoryNextWithServiceResponseAsync(nextPageLink) .map(new Func1<ServiceResponse<Page<UpgradeOperationHistoricalStatusInfoInner>>, Page<UpgradeOperationHistoricalStatusInfoInner>>() { @Override public Page<UpgradeOperationHistoricalStatusInfoInner> call(ServiceResponse<Page<UpgradeOperationHistoricalStatusInfoInner>> response) { return response.body(); } }); }
Gets list of OS upgrades on a VM scale set instance.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the observable to the PagedList<UpgradeOperationHistoricalStatusInfoInner> object
/** * Gets list of OS upgrades on a VM scale set instance. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;UpgradeOperationHistoricalStatusInfoInner&gt; object */
public Observable<ServiceResponse<Page<UpgradeOperationHistoricalStatusInfoInner>>> getOSUpgradeHistoryNextWithServiceResponseAsync(final String nextPageLink) { return getOSUpgradeHistoryNextSinglePageAsync(nextPageLink) .concatMap(new Func1<ServiceResponse<Page<UpgradeOperationHistoricalStatusInfoInner>>, Observable<ServiceResponse<Page<UpgradeOperationHistoricalStatusInfoInner>>>>() { @Override public Observable<ServiceResponse<Page<UpgradeOperationHistoricalStatusInfoInner>>> call(ServiceResponse<Page<UpgradeOperationHistoricalStatusInfoInner>> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } return Observable.just(page).concatWith(getOSUpgradeHistoryNextWithServiceResponseAsync(nextPageLink)); } }); }
Gets list of OS upgrades on a VM scale set instance. ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation.
Throws:
Returns:the PagedList<UpgradeOperationHistoricalStatusInfoInner> object wrapped in ServiceResponse if successful.
/** * Gets list of OS upgrades on a VM scale set instance. * ServiceResponse<PageImpl1<UpgradeOperationHistoricalStatusInfoInner>> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList&lt;UpgradeOperationHistoricalStatusInfoInner&gt; object wrapped in {@link ServiceResponse} if successful. */
public Observable<ServiceResponse<Page<UpgradeOperationHistoricalStatusInfoInner>>> getOSUpgradeHistoryNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } String nextUrl = String.format("%s", nextPageLink); return service.getOSUpgradeHistoryNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<UpgradeOperationHistoricalStatusInfoInner>>>>() { @Override public Observable<ServiceResponse<Page<UpgradeOperationHistoricalStatusInfoInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl1<UpgradeOperationHistoricalStatusInfoInner>> result = getOSUpgradeHistoryNextDelegate(response); return Observable.just(new ServiceResponse<Page<UpgradeOperationHistoricalStatusInfoInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<PageImpl1<UpgradeOperationHistoricalStatusInfoInner>> getOSUpgradeHistoryNextDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<PageImpl1<UpgradeOperationHistoricalStatusInfoInner>, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<PageImpl1<UpgradeOperationHistoricalStatusInfoInner>>() { }.getType()) .registerError(CloudException.class) .build(response); } }