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.InstanceViewTypes; import com.microsoft.azure.management.compute.RunCommandInput; import com.microsoft.azure.management.compute.VirtualMachineCaptureParameters; import com.microsoft.azure.management.compute.VirtualMachineInstallPatchesParameters; import com.microsoft.azure.management.compute.VirtualMachineReimageParameters; import com.microsoft.azure.management.compute.VirtualMachineUpdate; 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; import com.microsoft.azure.LongRunningFinalState; import com.microsoft.azure.LongRunningOperationOptions;
An instance of this class provides access to all the operations defined in VirtualMachines.
/** * An instance of this class provides access to all the operations defined * in VirtualMachines. */
public class VirtualMachinesInner implements InnerSupportsGet<VirtualMachineInner>, InnerSupportsDelete<Void>, InnerSupportsListing<VirtualMachineInner> {
The Retrofit service to perform REST calls.
/** The Retrofit service to perform REST calls. */
private VirtualMachinesService service;
The service client containing this operation class.
/** The service client containing this operation class. */
private ComputeManagementClientImpl client;
Initializes an instance of VirtualMachinesInner.
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 VirtualMachinesInner. * * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */
public VirtualMachinesInner(Retrofit retrofit, ComputeManagementClientImpl client) { this.service = retrofit.create(VirtualMachinesService.class); this.client = client; }
The interface defining all the services for VirtualMachines to be used by Retrofit to perform actually REST calls.
/** * The interface defining all the services for VirtualMachines to be * used by Retrofit to perform actually REST calls. */
interface VirtualMachinesService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachines listByLocation" }) @GET("subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/virtualMachines") 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.VirtualMachines capture" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/capture") Observable<Response<ResponseBody>> capture(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("subscriptionId") String subscriptionId, @Body VirtualMachineCaptureParameters 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.VirtualMachines beginCapture" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/capture") Observable<Response<ResponseBody>> beginCapture(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("subscriptionId") String subscriptionId, @Body VirtualMachineCaptureParameters 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.VirtualMachines createOrUpdate" }) @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}") Observable<Response<ResponseBody>> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("subscriptionId") String subscriptionId, @Body VirtualMachineInner 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.VirtualMachines beginCreateOrUpdate" }) @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}") Observable<Response<ResponseBody>> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("subscriptionId") String subscriptionId, @Body VirtualMachineInner 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.VirtualMachines update" }) @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}") Observable<Response<ResponseBody>> update(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("subscriptionId") String subscriptionId, @Body VirtualMachineUpdate 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.VirtualMachines beginUpdate" }) @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}") Observable<Response<ResponseBody>> beginUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("subscriptionId") String subscriptionId, @Body VirtualMachineUpdate 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.VirtualMachines delete" }) @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}", method = "DELETE", hasBody = true) Observable<Response<ResponseBody>> delete(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @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.VirtualMachines beginDelete" }) @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}", method = "DELETE", hasBody = true) Observable<Response<ResponseBody>> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @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.VirtualMachines getByResourceGroup" }) @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}") Observable<Response<ResponseBody>> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("subscriptionId") String subscriptionId, @Query("$expand") InstanceViewTypes expand, @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.VirtualMachines instanceView" }) @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/instanceView") Observable<Response<ResponseBody>> instanceView(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @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.VirtualMachines convertToManagedDisks" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/convertToManagedDisks") Observable<Response<ResponseBody>> convertToManagedDisks(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @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.VirtualMachines beginConvertToManagedDisks" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/convertToManagedDisks") Observable<Response<ResponseBody>> beginConvertToManagedDisks(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @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.VirtualMachines deallocate" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/deallocate") Observable<Response<ResponseBody>> deallocate(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @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.VirtualMachines beginDeallocate" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/deallocate") Observable<Response<ResponseBody>> beginDeallocate(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @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.VirtualMachines generalize" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/generalize") Observable<Response<ResponseBody>> generalize(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @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.VirtualMachines listByResourceGroup" }) @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines") 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.VirtualMachines list" }) @GET("subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachines") Observable<Response<ResponseBody>> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("statusOnly") String statusOnly, @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.VirtualMachines listAvailableSizes" }) @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/vmSizes") Observable<Response<ResponseBody>> listAvailableSizes(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @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.VirtualMachines powerOff" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/powerOff") Observable<Response<ResponseBody>> powerOff(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("subscriptionId") String subscriptionId, @Query("skipShutdown") Boolean skipShutdown, @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.VirtualMachines beginPowerOff" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/powerOff") Observable<Response<ResponseBody>> beginPowerOff(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("subscriptionId") String subscriptionId, @Query("skipShutdown") Boolean skipShutdown, @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.VirtualMachines reapply" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/reapply") Observable<Response<ResponseBody>> reapply(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @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.VirtualMachines beginReapply" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/reapply") Observable<Response<ResponseBody>> beginReapply(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @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.VirtualMachines restart" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/restart") Observable<Response<ResponseBody>> restart(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @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.VirtualMachines beginRestart" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/restart") Observable<Response<ResponseBody>> beginRestart(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @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.VirtualMachines start" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/start") Observable<Response<ResponseBody>> start(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @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.VirtualMachines beginStart" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/start") Observable<Response<ResponseBody>> beginStart(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @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.VirtualMachines redeploy" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/redeploy") Observable<Response<ResponseBody>> redeploy(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @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.VirtualMachines beginRedeploy" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/redeploy") Observable<Response<ResponseBody>> beginRedeploy(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @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.VirtualMachines reimage" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/reimage") Observable<Response<ResponseBody>> reimage(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VirtualMachineReimageParameters parameters, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachines beginReimage" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/reimage") Observable<Response<ResponseBody>> beginReimage(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VirtualMachineReimageParameters parameters, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachines retrieveBootDiagnosticsData" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/retrieveBootDiagnosticsData") Observable<Response<ResponseBody>> retrieveBootDiagnosticsData(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("subscriptionId") String subscriptionId, @Query("sasUriExpirationTimeInMinutes") Integer sasUriExpirationTimeInMinutes, @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.VirtualMachines performMaintenance" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/performMaintenance") Observable<Response<ResponseBody>> performMaintenance(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @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.VirtualMachines beginPerformMaintenance" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/performMaintenance") Observable<Response<ResponseBody>> beginPerformMaintenance(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @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.VirtualMachines simulateEviction" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/simulateEviction") Observable<Response<ResponseBody>> simulateEviction(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @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.VirtualMachines assessPatches" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/assessPatches") Observable<Response<ResponseBody>> assessPatches(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @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.VirtualMachines beginAssessPatches" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/assessPatches") Observable<Response<ResponseBody>> beginAssessPatches(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @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.VirtualMachines installPatches" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/installPatches") Observable<Response<ResponseBody>> installPatches(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("subscriptionId") String subscriptionId, @Body VirtualMachineInstallPatchesParameters installPatchesInput, @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.VirtualMachines beginInstallPatches" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/installPatches") Observable<Response<ResponseBody>> beginInstallPatches(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("subscriptionId") String subscriptionId, @Body VirtualMachineInstallPatchesParameters installPatchesInput, @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.VirtualMachines runCommand" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommand") Observable<Response<ResponseBody>> runCommand(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("subscriptionId") String subscriptionId, @Body RunCommandInput 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.VirtualMachines beginRunCommand" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommand") Observable<Response<ResponseBody>> beginRunCommand(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("subscriptionId") String subscriptionId, @Body RunCommandInput 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.VirtualMachines 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.VirtualMachines 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.VirtualMachines listNext" }) @GET Observable<Response<ResponseBody>> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); }
Gets all the virtual machines under the specified subscription for the specified location.
Params:
  • location – The location for which virtual machines under the subscription are queried.
Throws:
Returns:the PagedList<VirtualMachineInner> object if successful.
/** * Gets all the virtual machines under the specified subscription for the specified location. * * @param location The location for which virtual machines 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;VirtualMachineInner&gt; object if successful. */
public PagedList<VirtualMachineInner> listByLocation(final String location) { ServiceResponse<Page<VirtualMachineInner>> response = listByLocationSinglePageAsync(location).toBlocking().single(); return new PagedList<VirtualMachineInner>(response.body()) { @Override public Page<VirtualMachineInner> nextPage(String nextPageLink) { return listByLocationNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
Gets all the virtual machines under the specified subscription for the specified location.
Params:
  • location – The location for which virtual machines under the subscription are queried.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Gets all the virtual machines under the specified subscription for the specified location. * * @param location The location for which virtual machines 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<VirtualMachineInner>> listByLocationAsync(final String location, final ListOperationCallback<VirtualMachineInner> serviceCallback) { return AzureServiceFuture.fromPageResponse( listByLocationSinglePageAsync(location), new Func1<String, Observable<ServiceResponse<Page<VirtualMachineInner>>>>() { @Override public Observable<ServiceResponse<Page<VirtualMachineInner>>> call(String nextPageLink) { return listByLocationNextSinglePageAsync(nextPageLink); } }, serviceCallback); }
Gets all the virtual machines under the specified subscription for the specified location.
Params:
  • location – The location for which virtual machines under the subscription are queried.
Throws:
Returns:the observable to the PagedList<VirtualMachineInner> object
/** * Gets all the virtual machines under the specified subscription for the specified location. * * @param location The location for which virtual machines under the subscription are queried. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;VirtualMachineInner&gt; object */
public Observable<Page<VirtualMachineInner>> listByLocationAsync(final String location) { return listByLocationWithServiceResponseAsync(location) .map(new Func1<ServiceResponse<Page<VirtualMachineInner>>, Page<VirtualMachineInner>>() { @Override public Page<VirtualMachineInner> call(ServiceResponse<Page<VirtualMachineInner>> response) { return response.body(); } }); }
Gets all the virtual machines under the specified subscription for the specified location.
Params:
  • location – The location for which virtual machines under the subscription are queried.
Throws:
Returns:the observable to the PagedList<VirtualMachineInner> object
/** * Gets all the virtual machines under the specified subscription for the specified location. * * @param location The location for which virtual machines under the subscription are queried. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;VirtualMachineInner&gt; object */
public Observable<ServiceResponse<Page<VirtualMachineInner>>> listByLocationWithServiceResponseAsync(final String location) { return listByLocationSinglePageAsync(location) .concatMap(new Func1<ServiceResponse<Page<VirtualMachineInner>>, Observable<ServiceResponse<Page<VirtualMachineInner>>>>() { @Override public Observable<ServiceResponse<Page<VirtualMachineInner>>> call(ServiceResponse<Page<VirtualMachineInner>> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } return Observable.just(page).concatWith(listByLocationNextWithServiceResponseAsync(nextPageLink)); } }); }
Gets all the virtual machines under the specified subscription for the specified location. ServiceResponse> * @param location The location for which virtual machines under the subscription are queried.
Throws:
Returns:the PagedList<VirtualMachineInner> object wrapped in ServiceResponse if successful.
/** * Gets all the virtual machines under the specified subscription for the specified location. * ServiceResponse<PageImpl1<VirtualMachineInner>> * @param location The location for which virtual machines under the subscription are queried. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList&lt;VirtualMachineInner&gt; object wrapped in {@link ServiceResponse} if successful. */
public Observable<ServiceResponse<Page<VirtualMachineInner>>> 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<VirtualMachineInner>>>>() { @Override public Observable<ServiceResponse<Page<VirtualMachineInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl1<VirtualMachineInner>> result = listByLocationDelegate(response); return Observable.just(new ServiceResponse<Page<VirtualMachineInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<PageImpl1<VirtualMachineInner>> listByLocationDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<PageImpl1<VirtualMachineInner>, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<PageImpl1<VirtualMachineInner>>() { }.getType()) .registerError(CloudException.class) .build(response); }
Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar VMs.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • parameters – Parameters supplied to the Capture Virtual Machine operation.
Throws:
Returns:the VirtualMachineCaptureResultInner object if successful.
/** * Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar VMs. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param parameters Parameters supplied to the Capture Virtual Machine 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 VirtualMachineCaptureResultInner object if successful. */
public VirtualMachineCaptureResultInner capture(String resourceGroupName, String vmName, VirtualMachineCaptureParameters parameters) { return captureWithServiceResponseAsync(resourceGroupName, vmName, parameters).toBlocking().last().body(); }
Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar VMs.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • parameters – Parameters supplied to the Capture Virtual Machine operation.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar VMs. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param parameters Parameters supplied to the Capture Virtual Machine operation. * @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<VirtualMachineCaptureResultInner> captureAsync(String resourceGroupName, String vmName, VirtualMachineCaptureParameters parameters, final ServiceCallback<VirtualMachineCaptureResultInner> serviceCallback) { return ServiceFuture.fromResponse(captureWithServiceResponseAsync(resourceGroupName, vmName, parameters), serviceCallback); }
Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar VMs.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • parameters – Parameters supplied to the Capture Virtual Machine operation.
Throws:
Returns:the observable for the request
/** * Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar VMs. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param parameters Parameters supplied to the Capture Virtual Machine operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<VirtualMachineCaptureResultInner> captureAsync(String resourceGroupName, String vmName, VirtualMachineCaptureParameters parameters) { return captureWithServiceResponseAsync(resourceGroupName, vmName, parameters).map(new Func1<ServiceResponse<VirtualMachineCaptureResultInner>, VirtualMachineCaptureResultInner>() { @Override public VirtualMachineCaptureResultInner call(ServiceResponse<VirtualMachineCaptureResultInner> response) { return response.body(); } }); }
Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar VMs.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • parameters – Parameters supplied to the Capture Virtual Machine operation.
Throws:
Returns:the observable for the request
/** * Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar VMs. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param parameters Parameters supplied to the Capture Virtual Machine operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponse<VirtualMachineCaptureResultInner>> captureWithServiceResponseAsync(String resourceGroupName, String vmName, VirtualMachineCaptureParameters parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmName == null) { throw new IllegalArgumentException("Parameter vmName 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.capture(resourceGroupName, vmName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken<VirtualMachineCaptureResultInner>() { }.getType()); }
Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar VMs.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • parameters – Parameters supplied to the Capture Virtual Machine operation.
Throws:
Returns:the VirtualMachineCaptureResultInner object if successful.
/** * Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar VMs. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param parameters Parameters supplied to the Capture Virtual Machine 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 VirtualMachineCaptureResultInner object if successful. */
public VirtualMachineCaptureResultInner beginCapture(String resourceGroupName, String vmName, VirtualMachineCaptureParameters parameters) { return beginCaptureWithServiceResponseAsync(resourceGroupName, vmName, parameters).toBlocking().single().body(); }
Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar VMs.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • parameters – Parameters supplied to the Capture Virtual Machine operation.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar VMs. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param parameters Parameters supplied to the Capture Virtual Machine operation. * @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<VirtualMachineCaptureResultInner> beginCaptureAsync(String resourceGroupName, String vmName, VirtualMachineCaptureParameters parameters, final ServiceCallback<VirtualMachineCaptureResultInner> serviceCallback) { return ServiceFuture.fromResponse(beginCaptureWithServiceResponseAsync(resourceGroupName, vmName, parameters), serviceCallback); }
Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar VMs.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • parameters – Parameters supplied to the Capture Virtual Machine operation.
Throws:
Returns:the observable to the VirtualMachineCaptureResultInner object
/** * Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar VMs. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param parameters Parameters supplied to the Capture Virtual Machine operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the VirtualMachineCaptureResultInner object */
public Observable<VirtualMachineCaptureResultInner> beginCaptureAsync(String resourceGroupName, String vmName, VirtualMachineCaptureParameters parameters) { return beginCaptureWithServiceResponseAsync(resourceGroupName, vmName, parameters).map(new Func1<ServiceResponse<VirtualMachineCaptureResultInner>, VirtualMachineCaptureResultInner>() { @Override public VirtualMachineCaptureResultInner call(ServiceResponse<VirtualMachineCaptureResultInner> response) { return response.body(); } }); }
Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar VMs.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • parameters – Parameters supplied to the Capture Virtual Machine operation.
Throws:
Returns:the observable to the VirtualMachineCaptureResultInner object
/** * Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar VMs. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param parameters Parameters supplied to the Capture Virtual Machine operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the VirtualMachineCaptureResultInner object */
public Observable<ServiceResponse<VirtualMachineCaptureResultInner>> beginCaptureWithServiceResponseAsync(String resourceGroupName, String vmName, VirtualMachineCaptureParameters parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmName == null) { throw new IllegalArgumentException("Parameter vmName 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.beginCapture(resourceGroupName, vmName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<VirtualMachineCaptureResultInner>>>() { @Override public Observable<ServiceResponse<VirtualMachineCaptureResultInner>> call(Response<ResponseBody> response) { try { ServiceResponse<VirtualMachineCaptureResultInner> clientResponse = beginCaptureDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<VirtualMachineCaptureResultInner> beginCaptureDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<VirtualMachineCaptureResultInner, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<VirtualMachineCaptureResultInner>() { }.getType()) .register(202, new TypeToken<Void>() { }.getType()) .registerError(CloudException.class) .build(response); }
The operation to create or update a virtual machine. Please note some properties can be set only during virtual machine creation.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • parameters – Parameters supplied to the Create Virtual Machine operation.
Throws:
Returns:the VirtualMachineInner object if successful.
/** * The operation to create or update a virtual machine. Please note some properties can be set only during virtual machine creation. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param parameters Parameters supplied to the Create Virtual Machine 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 VirtualMachineInner object if successful. */
public VirtualMachineInner createOrUpdate(String resourceGroupName, String vmName, VirtualMachineInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, vmName, parameters).toBlocking().last().body(); }
The operation to create or update a virtual machine. Please note some properties can be set only during virtual machine creation.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • parameters – Parameters supplied to the Create Virtual Machine operation.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * The operation to create or update a virtual machine. Please note some properties can be set only during virtual machine creation. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param parameters Parameters supplied to the Create Virtual Machine operation. * @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<VirtualMachineInner> createOrUpdateAsync(String resourceGroupName, String vmName, VirtualMachineInner parameters, final ServiceCallback<VirtualMachineInner> serviceCallback) { return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, vmName, parameters), serviceCallback); }
The operation to create or update a virtual machine. Please note some properties can be set only during virtual machine creation.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • parameters – Parameters supplied to the Create Virtual Machine operation.
Throws:
Returns:the observable for the request
/** * The operation to create or update a virtual machine. Please note some properties can be set only during virtual machine creation. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param parameters Parameters supplied to the Create Virtual Machine operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<VirtualMachineInner> createOrUpdateAsync(String resourceGroupName, String vmName, VirtualMachineInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, vmName, parameters).map(new Func1<ServiceResponse<VirtualMachineInner>, VirtualMachineInner>() { @Override public VirtualMachineInner call(ServiceResponse<VirtualMachineInner> response) { return response.body(); } }); }
The operation to create or update a virtual machine. Please note some properties can be set only during virtual machine creation.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • parameters – Parameters supplied to the Create Virtual Machine operation.
Throws:
Returns:the observable for the request
/** * The operation to create or update a virtual machine. Please note some properties can be set only during virtual machine creation. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param parameters Parameters supplied to the Create Virtual Machine operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponse<VirtualMachineInner>> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String vmName, VirtualMachineInner parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmName == null) { throw new IllegalArgumentException("Parameter vmName 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, vmName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken<VirtualMachineInner>() { }.getType()); }
The operation to create or update a virtual machine. Please note some properties can be set only during virtual machine creation.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • parameters – Parameters supplied to the Create Virtual Machine operation.
Throws:
Returns:the VirtualMachineInner object if successful.
/** * The operation to create or update a virtual machine. Please note some properties can be set only during virtual machine creation. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param parameters Parameters supplied to the Create Virtual Machine 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 VirtualMachineInner object if successful. */
public VirtualMachineInner beginCreateOrUpdate(String resourceGroupName, String vmName, VirtualMachineInner parameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, vmName, parameters).toBlocking().single().body(); }
The operation to create or update a virtual machine. Please note some properties can be set only during virtual machine creation.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • parameters – Parameters supplied to the Create Virtual Machine operation.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * The operation to create or update a virtual machine. Please note some properties can be set only during virtual machine creation. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param parameters Parameters supplied to the Create Virtual Machine operation. * @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<VirtualMachineInner> beginCreateOrUpdateAsync(String resourceGroupName, String vmName, VirtualMachineInner parameters, final ServiceCallback<VirtualMachineInner> serviceCallback) { return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, vmName, parameters), serviceCallback); }
The operation to create or update a virtual machine. Please note some properties can be set only during virtual machine creation.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • parameters – Parameters supplied to the Create Virtual Machine operation.
Throws:
Returns:the observable to the VirtualMachineInner object
/** * The operation to create or update a virtual machine. Please note some properties can be set only during virtual machine creation. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param parameters Parameters supplied to the Create Virtual Machine operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the VirtualMachineInner object */
public Observable<VirtualMachineInner> beginCreateOrUpdateAsync(String resourceGroupName, String vmName, VirtualMachineInner parameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, vmName, parameters).map(new Func1<ServiceResponse<VirtualMachineInner>, VirtualMachineInner>() { @Override public VirtualMachineInner call(ServiceResponse<VirtualMachineInner> response) { return response.body(); } }); }
The operation to create or update a virtual machine. Please note some properties can be set only during virtual machine creation.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • parameters – Parameters supplied to the Create Virtual Machine operation.
Throws:
Returns:the observable to the VirtualMachineInner object
/** * The operation to create or update a virtual machine. Please note some properties can be set only during virtual machine creation. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param parameters Parameters supplied to the Create Virtual Machine operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the VirtualMachineInner object */
public Observable<ServiceResponse<VirtualMachineInner>> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String vmName, VirtualMachineInner parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmName == null) { throw new IllegalArgumentException("Parameter vmName 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, vmName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<VirtualMachineInner>>>() { @Override public Observable<ServiceResponse<VirtualMachineInner>> call(Response<ResponseBody> response) { try { ServiceResponse<VirtualMachineInner> clientResponse = beginCreateOrUpdateDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<VirtualMachineInner> beginCreateOrUpdateDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<VirtualMachineInner, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<VirtualMachineInner>() { }.getType()) .register(201, new TypeToken<VirtualMachineInner>() { }.getType()) .registerError(CloudException.class) .build(response); }
The operation to update a virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • parameters – Parameters supplied to the Update Virtual Machine operation.
Throws:
Returns:the VirtualMachineInner object if successful.
/** * The operation to update a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param parameters Parameters supplied to the Update Virtual Machine 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 VirtualMachineInner object if successful. */
public VirtualMachineInner update(String resourceGroupName, String vmName, VirtualMachineUpdate parameters) { return updateWithServiceResponseAsync(resourceGroupName, vmName, parameters).toBlocking().last().body(); }
The operation to update a virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • parameters – Parameters supplied to the Update Virtual Machine operation.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * The operation to update a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param parameters Parameters supplied to the Update Virtual Machine operation. * @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<VirtualMachineInner> updateAsync(String resourceGroupName, String vmName, VirtualMachineUpdate parameters, final ServiceCallback<VirtualMachineInner> serviceCallback) { return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, vmName, parameters), serviceCallback); }
The operation to update a virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • parameters – Parameters supplied to the Update Virtual Machine operation.
Throws:
Returns:the observable for the request
/** * The operation to update a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param parameters Parameters supplied to the Update Virtual Machine operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<VirtualMachineInner> updateAsync(String resourceGroupName, String vmName, VirtualMachineUpdate parameters) { return updateWithServiceResponseAsync(resourceGroupName, vmName, parameters).map(new Func1<ServiceResponse<VirtualMachineInner>, VirtualMachineInner>() { @Override public VirtualMachineInner call(ServiceResponse<VirtualMachineInner> response) { return response.body(); } }); }
The operation to update a virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • parameters – Parameters supplied to the Update Virtual Machine operation.
Throws:
Returns:the observable for the request
/** * The operation to update a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param parameters Parameters supplied to the Update Virtual Machine operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponse<VirtualMachineInner>> updateWithServiceResponseAsync(String resourceGroupName, String vmName, VirtualMachineUpdate parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmName == null) { throw new IllegalArgumentException("Parameter vmName 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, vmName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken<VirtualMachineInner>() { }.getType()); }
The operation to update a virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • parameters – Parameters supplied to the Update Virtual Machine operation.
Throws:
Returns:the VirtualMachineInner object if successful.
/** * The operation to update a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param parameters Parameters supplied to the Update Virtual Machine 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 VirtualMachineInner object if successful. */
public VirtualMachineInner beginUpdate(String resourceGroupName, String vmName, VirtualMachineUpdate parameters) { return beginUpdateWithServiceResponseAsync(resourceGroupName, vmName, parameters).toBlocking().single().body(); }
The operation to update a virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • parameters – Parameters supplied to the Update Virtual Machine operation.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * The operation to update a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param parameters Parameters supplied to the Update Virtual Machine operation. * @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<VirtualMachineInner> beginUpdateAsync(String resourceGroupName, String vmName, VirtualMachineUpdate parameters, final ServiceCallback<VirtualMachineInner> serviceCallback) { return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, vmName, parameters), serviceCallback); }
The operation to update a virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • parameters – Parameters supplied to the Update Virtual Machine operation.
Throws:
Returns:the observable to the VirtualMachineInner object
/** * The operation to update a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param parameters Parameters supplied to the Update Virtual Machine operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the VirtualMachineInner object */
public Observable<VirtualMachineInner> beginUpdateAsync(String resourceGroupName, String vmName, VirtualMachineUpdate parameters) { return beginUpdateWithServiceResponseAsync(resourceGroupName, vmName, parameters).map(new Func1<ServiceResponse<VirtualMachineInner>, VirtualMachineInner>() { @Override public VirtualMachineInner call(ServiceResponse<VirtualMachineInner> response) { return response.body(); } }); }
The operation to update a virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • parameters – Parameters supplied to the Update Virtual Machine operation.
Throws:
Returns:the observable to the VirtualMachineInner object
/** * The operation to update a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param parameters Parameters supplied to the Update Virtual Machine operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the VirtualMachineInner object */
public Observable<ServiceResponse<VirtualMachineInner>> beginUpdateWithServiceResponseAsync(String resourceGroupName, String vmName, VirtualMachineUpdate parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmName == null) { throw new IllegalArgumentException("Parameter vmName 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, vmName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<VirtualMachineInner>>>() { @Override public Observable<ServiceResponse<VirtualMachineInner>> call(Response<ResponseBody> response) { try { ServiceResponse<VirtualMachineInner> clientResponse = beginUpdateDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<VirtualMachineInner> beginUpdateDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<VirtualMachineInner, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<VirtualMachineInner>() { }.getType()) .registerError(CloudException.class) .build(response); }
The operation to delete a virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
/** * The operation to delete a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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 vmName) { deleteWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().body(); }
The operation to delete a virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * The operation to delete a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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 vmName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); }
The operation to delete a virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the observable for the request
/** * The operation to delete a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<Void> deleteAsync(String resourceGroupName, String vmName) { return deleteWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
The operation to delete a virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the observable for the request
/** * The operation to delete a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponse<Void>> deleteWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmName == null) { throw new IllegalArgumentException("Parameter vmName 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, vmName, this.client.subscriptionId(), forceDeletion, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<Void>() { }.getType()); }
The operation to delete a virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • forceDeletion – Optional parameter to force delete virtual machines.(Feature in Preview)
Throws:
/** * The operation to delete a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param forceDeletion Optional parameter to force delete virtual machines.(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 vmName, Boolean forceDeletion) { deleteWithServiceResponseAsync(resourceGroupName, vmName, forceDeletion).toBlocking().last().body(); }
The operation to delete a virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • forceDeletion – Optional parameter to force delete virtual machines.(Feature in Preview)
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * The operation to delete a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param forceDeletion Optional parameter to force delete virtual machines.(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 vmName, Boolean forceDeletion, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, vmName, forceDeletion), serviceCallback); }
The operation to delete a virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • forceDeletion – Optional parameter to force delete virtual machines.(Feature in Preview)
Throws:
Returns:the observable for the request
/** * The operation to delete a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param forceDeletion Optional parameter to force delete virtual machines.(Feature in Preview) * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<Void> deleteAsync(String resourceGroupName, String vmName, Boolean forceDeletion) { return deleteWithServiceResponseAsync(resourceGroupName, vmName, forceDeletion).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
The operation to delete a virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • forceDeletion – Optional parameter to force delete virtual machines.(Feature in Preview)
Throws:
Returns:the observable for the request
/** * The operation to delete a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param forceDeletion Optional parameter to force delete virtual machines.(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 vmName, Boolean forceDeletion) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmName == null) { throw new IllegalArgumentException("Parameter vmName 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, vmName, this.client.subscriptionId(), forceDeletion, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<Void>() { }.getType()); }
The operation to delete a virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
/** * The operation to delete a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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 vmName) { beginDeleteWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); }
The operation to delete a virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * The operation to delete a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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 vmName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); }
The operation to delete a virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the ServiceResponse object if successful.
/** * The operation to delete a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<Void> beginDeleteAsync(String resourceGroupName, String vmName) { return beginDeleteWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
The operation to delete a virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the ServiceResponse object if successful.
/** * The operation to delete a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<ServiceResponse<Void>> beginDeleteWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmName == null) { throw new IllegalArgumentException("Parameter vmName 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, vmName, 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); } } }); }
The operation to delete a virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • forceDeletion – Optional parameter to force delete virtual machines.(Feature in Preview)
Throws:
/** * The operation to delete a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param forceDeletion Optional parameter to force delete virtual machines.(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 vmName, Boolean forceDeletion) { beginDeleteWithServiceResponseAsync(resourceGroupName, vmName, forceDeletion).toBlocking().single().body(); }
The operation to delete a virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • forceDeletion – Optional parameter to force delete virtual machines.(Feature in Preview)
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * The operation to delete a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param forceDeletion Optional parameter to force delete virtual machines.(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 vmName, Boolean forceDeletion, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, vmName, forceDeletion), serviceCallback); }
The operation to delete a virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • forceDeletion – Optional parameter to force delete virtual machines.(Feature in Preview)
Throws:
Returns:the ServiceResponse object if successful.
/** * The operation to delete a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param forceDeletion Optional parameter to force delete virtual machines.(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 vmName, Boolean forceDeletion) { return beginDeleteWithServiceResponseAsync(resourceGroupName, vmName, forceDeletion).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
The operation to delete a virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • forceDeletion – Optional parameter to force delete virtual machines.(Feature in Preview)
Throws:
Returns:the ServiceResponse object if successful.
/** * The operation to delete a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param forceDeletion Optional parameter to force delete virtual machines.(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 vmName, Boolean forceDeletion) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmName == null) { throw new IllegalArgumentException("Parameter vmName 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, vmName, 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); }
Retrieves information about the model view or the instance view of a virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the VirtualMachineInner object if successful.
/** * Retrieves information about the model view or the instance view of a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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 VirtualMachineInner object if successful. */
public VirtualMachineInner getByResourceGroup(String resourceGroupName, String vmName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); }
Retrieves information about the model view or the instance view of a virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Retrieves information about the model view or the instance view of a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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<VirtualMachineInner> getByResourceGroupAsync(String resourceGroupName, String vmName, final ServiceCallback<VirtualMachineInner> serviceCallback) { return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); }
Retrieves information about the model view or the instance view of a virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the observable to the VirtualMachineInner object
/** * Retrieves information about the model view or the instance view of a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the VirtualMachineInner object */
public Observable<VirtualMachineInner> getByResourceGroupAsync(String resourceGroupName, String vmName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1<ServiceResponse<VirtualMachineInner>, VirtualMachineInner>() { @Override public VirtualMachineInner call(ServiceResponse<VirtualMachineInner> response) { return response.body(); } }); }
Retrieves information about the model view or the instance view of a virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the observable to the VirtualMachineInner object
/** * Retrieves information about the model view or the instance view of a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the VirtualMachineInner object */
public Observable<ServiceResponse<VirtualMachineInner>> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmName == null) { throw new IllegalArgumentException("Parameter vmName 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 InstanceViewTypes expand = null; return service.getByResourceGroup(resourceGroupName, vmName, this.client.subscriptionId(), expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<VirtualMachineInner>>>() { @Override public Observable<ServiceResponse<VirtualMachineInner>> call(Response<ResponseBody> response) { try { ServiceResponse<VirtualMachineInner> clientResponse = getByResourceGroupDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); }
Retrieves information about the model view or the instance view of a virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • expand – The expand expression to apply on the operation. Possible values include: 'instanceView'
Throws:
Returns:the VirtualMachineInner object if successful.
/** * Retrieves information about the model view or the instance view of a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param expand The expand expression to apply on the operation. Possible values include: 'instanceView' * @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 VirtualMachineInner object if successful. */
public VirtualMachineInner getByResourceGroup(String resourceGroupName, String vmName, InstanceViewTypes expand) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, vmName, expand).toBlocking().single().body(); }
Retrieves information about the model view or the instance view of a virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • expand – The expand expression to apply on the operation. Possible values include: 'instanceView'
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Retrieves information about the model view or the instance view of a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param expand The expand expression to apply on the operation. Possible values include: 'instanceView' * @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<VirtualMachineInner> getByResourceGroupAsync(String resourceGroupName, String vmName, InstanceViewTypes expand, final ServiceCallback<VirtualMachineInner> serviceCallback) { return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, vmName, expand), serviceCallback); }
Retrieves information about the model view or the instance view of a virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • expand – The expand expression to apply on the operation. Possible values include: 'instanceView'
Throws:
Returns:the observable to the VirtualMachineInner object
/** * Retrieves information about the model view or the instance view of a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param expand The expand expression to apply on the operation. Possible values include: 'instanceView' * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the VirtualMachineInner object */
public Observable<VirtualMachineInner> getByResourceGroupAsync(String resourceGroupName, String vmName, InstanceViewTypes expand) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, vmName, expand).map(new Func1<ServiceResponse<VirtualMachineInner>, VirtualMachineInner>() { @Override public VirtualMachineInner call(ServiceResponse<VirtualMachineInner> response) { return response.body(); } }); }
Retrieves information about the model view or the instance view of a virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • expand – The expand expression to apply on the operation. Possible values include: 'instanceView'
Throws:
Returns:the observable to the VirtualMachineInner object
/** * Retrieves information about the model view or the instance view of a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param expand The expand expression to apply on the operation. Possible values include: 'instanceView' * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the VirtualMachineInner object */
public Observable<ServiceResponse<VirtualMachineInner>> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String vmName, InstanceViewTypes expand) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmName == null) { throw new IllegalArgumentException("Parameter vmName 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, vmName, this.client.subscriptionId(), expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<VirtualMachineInner>>>() { @Override public Observable<ServiceResponse<VirtualMachineInner>> call(Response<ResponseBody> response) { try { ServiceResponse<VirtualMachineInner> clientResponse = getByResourceGroupDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<VirtualMachineInner> getByResourceGroupDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<VirtualMachineInner, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<VirtualMachineInner>() { }.getType()) .registerError(CloudException.class) .build(response); }
Retrieves information about the run-time state of a virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the VirtualMachineInstanceViewInner object if successful.
/** * Retrieves information about the run-time state of a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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 VirtualMachineInstanceViewInner object if successful. */
public VirtualMachineInstanceViewInner instanceView(String resourceGroupName, String vmName) { return instanceViewWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); }
Retrieves information about the run-time state of a virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Retrieves information about the run-time state of a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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<VirtualMachineInstanceViewInner> instanceViewAsync(String resourceGroupName, String vmName, final ServiceCallback<VirtualMachineInstanceViewInner> serviceCallback) { return ServiceFuture.fromResponse(instanceViewWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); }
Retrieves information about the run-time state of a virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the observable to the VirtualMachineInstanceViewInner object
/** * Retrieves information about the run-time state of a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the VirtualMachineInstanceViewInner object */
public Observable<VirtualMachineInstanceViewInner> instanceViewAsync(String resourceGroupName, String vmName) { return instanceViewWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1<ServiceResponse<VirtualMachineInstanceViewInner>, VirtualMachineInstanceViewInner>() { @Override public VirtualMachineInstanceViewInner call(ServiceResponse<VirtualMachineInstanceViewInner> response) { return response.body(); } }); }
Retrieves information about the run-time state of a virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the observable to the VirtualMachineInstanceViewInner object
/** * Retrieves information about the run-time state of a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the VirtualMachineInstanceViewInner object */
public Observable<ServiceResponse<VirtualMachineInstanceViewInner>> instanceViewWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmName == null) { throw new IllegalArgumentException("Parameter vmName 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.instanceView(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<VirtualMachineInstanceViewInner>>>() { @Override public Observable<ServiceResponse<VirtualMachineInstanceViewInner>> call(Response<ResponseBody> response) { try { ServiceResponse<VirtualMachineInstanceViewInner> clientResponse = instanceViewDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<VirtualMachineInstanceViewInner> instanceViewDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<VirtualMachineInstanceViewInner, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<VirtualMachineInstanceViewInner>() { }.getType()) .registerError(CloudException.class) .build(response); }
Converts virtual machine disks from blob-based to managed disks. Virtual machine must be stop-deallocated before invoking this operation.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
/** * Converts virtual machine disks from blob-based to managed disks. Virtual machine must be stop-deallocated before invoking this operation. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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 convertToManagedDisks(String resourceGroupName, String vmName) { convertToManagedDisksWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().body(); }
Converts virtual machine disks from blob-based to managed disks. Virtual machine must be stop-deallocated before invoking this operation.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Converts virtual machine disks from blob-based to managed disks. Virtual machine must be stop-deallocated before invoking this operation. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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> convertToManagedDisksAsync(String resourceGroupName, String vmName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(convertToManagedDisksWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); }
Converts virtual machine disks from blob-based to managed disks. Virtual machine must be stop-deallocated before invoking this operation.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the observable for the request
/** * Converts virtual machine disks from blob-based to managed disks. Virtual machine must be stop-deallocated before invoking this operation. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<Void> convertToManagedDisksAsync(String resourceGroupName, String vmName) { return convertToManagedDisksWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Converts virtual machine disks from blob-based to managed disks. Virtual machine must be stop-deallocated before invoking this operation.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the observable for the request
/** * Converts virtual machine disks from blob-based to managed disks. Virtual machine must be stop-deallocated before invoking this operation. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponse<Void>> convertToManagedDisksWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmName == null) { throw new IllegalArgumentException("Parameter vmName 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.convertToManagedDisks(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<Void>() { }.getType()); }
Converts virtual machine disks from blob-based to managed disks. Virtual machine must be stop-deallocated before invoking this operation.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
/** * Converts virtual machine disks from blob-based to managed disks. Virtual machine must be stop-deallocated before invoking this operation. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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 beginConvertToManagedDisks(String resourceGroupName, String vmName) { beginConvertToManagedDisksWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); }
Converts virtual machine disks from blob-based to managed disks. Virtual machine must be stop-deallocated before invoking this operation.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Converts virtual machine disks from blob-based to managed disks. Virtual machine must be stop-deallocated before invoking this operation. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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> beginConvertToManagedDisksAsync(String resourceGroupName, String vmName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginConvertToManagedDisksWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); }
Converts virtual machine disks from blob-based to managed disks. Virtual machine must be stop-deallocated before invoking this operation.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the ServiceResponse object if successful.
/** * Converts virtual machine disks from blob-based to managed disks. Virtual machine must be stop-deallocated before invoking this operation. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<Void> beginConvertToManagedDisksAsync(String resourceGroupName, String vmName) { return beginConvertToManagedDisksWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Converts virtual machine disks from blob-based to managed disks. Virtual machine must be stop-deallocated before invoking this operation.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the ServiceResponse object if successful.
/** * Converts virtual machine disks from blob-based to managed disks. Virtual machine must be stop-deallocated before invoking this operation. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<ServiceResponse<Void>> beginConvertToManagedDisksWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmName == null) { throw new IllegalArgumentException("Parameter vmName 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.beginConvertToManagedDisks(resourceGroupName, vmName, this.client.subscriptionId(), 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 = beginConvertToManagedDisksDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<Void> beginConvertToManagedDisksDelegate(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 the virtual machine and releases the compute resources. You are not billed for the compute resources that this virtual machine uses.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
/** * Shuts down the virtual machine and releases the compute resources. You are not billed for the compute resources that this virtual machine uses. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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 vmName) { deallocateWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().body(); }
Shuts down the virtual machine and releases the compute resources. You are not billed for the compute resources that this virtual machine uses.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Shuts down the virtual machine and releases the compute resources. You are not billed for the compute resources that this virtual machine uses. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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 vmName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(deallocateWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); }
Shuts down the virtual machine and releases the compute resources. You are not billed for the compute resources that this virtual machine uses.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the observable for the request
/** * Shuts down the virtual machine and releases the compute resources. You are not billed for the compute resources that this virtual machine uses. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<Void> deallocateAsync(String resourceGroupName, String vmName) { return deallocateWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Shuts down the virtual machine and releases the compute resources. You are not billed for the compute resources that this virtual machine uses.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the observable for the request
/** * Shuts down the virtual machine and releases the compute resources. You are not billed for the compute resources that this virtual machine uses. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponse<Void>> deallocateWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmName == null) { throw new IllegalArgumentException("Parameter vmName 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.deallocate(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<Void>() { }.getType()); }
Shuts down the virtual machine and releases the compute resources. You are not billed for the compute resources that this virtual machine uses.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
/** * Shuts down the virtual machine and releases the compute resources. You are not billed for the compute resources that this virtual machine uses. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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 vmName) { beginDeallocateWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); }
Shuts down the virtual machine and releases the compute resources. You are not billed for the compute resources that this virtual machine uses.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Shuts down the virtual machine and releases the compute resources. You are not billed for the compute resources that this virtual machine uses. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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 vmName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginDeallocateWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); }
Shuts down the virtual machine and releases the compute resources. You are not billed for the compute resources that this virtual machine uses.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the ServiceResponse object if successful.
/** * Shuts down the virtual machine and releases the compute resources. You are not billed for the compute resources that this virtual machine uses. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<Void> beginDeallocateAsync(String resourceGroupName, String vmName) { return beginDeallocateWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Shuts down the virtual machine and releases the compute resources. You are not billed for the compute resources that this virtual machine uses.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the ServiceResponse object if successful.
/** * Shuts down the virtual machine and releases the compute resources. You are not billed for the compute resources that this virtual machine uses. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<ServiceResponse<Void>> beginDeallocateWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmName == null) { throw new IllegalArgumentException("Parameter vmName 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.beginDeallocate(resourceGroupName, vmName, this.client.subscriptionId(), 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 = 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); }
Sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual machine before performing this operation. <br>For Windows, please refer to [Create a managed image of a generalized VM in Azure](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/capture-image-resource).<br>For Linux, please refer to [How to create an image of a virtual machine or VHD](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/capture-image).
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
/** * Sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual machine before performing this operation. &lt;br&gt;For Windows, please refer to [Create a managed image of a generalized VM in Azure](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/capture-image-resource).&lt;br&gt;For Linux, please refer to [How to create an image of a virtual machine or VHD](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/capture-image). * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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 generalize(String resourceGroupName, String vmName) { generalizeWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); }
Sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual machine before performing this operation. <br>For Windows, please refer to [Create a managed image of a generalized VM in Azure](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/capture-image-resource).<br>For Linux, please refer to [How to create an image of a virtual machine or VHD](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/capture-image).
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual machine before performing this operation. &lt;br&gt;For Windows, please refer to [Create a managed image of a generalized VM in Azure](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/capture-image-resource).&lt;br&gt;For Linux, please refer to [How to create an image of a virtual machine or VHD](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/capture-image). * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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> generalizeAsync(String resourceGroupName, String vmName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(generalizeWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); }
Sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual machine before performing this operation. <br>For Windows, please refer to [Create a managed image of a generalized VM in Azure](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/capture-image-resource).<br>For Linux, please refer to [How to create an image of a virtual machine or VHD](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/capture-image).
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the ServiceResponse object if successful.
/** * Sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual machine before performing this operation. &lt;br&gt;For Windows, please refer to [Create a managed image of a generalized VM in Azure](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/capture-image-resource).&lt;br&gt;For Linux, please refer to [How to create an image of a virtual machine or VHD](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/capture-image). * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<Void> generalizeAsync(String resourceGroupName, String vmName) { return generalizeWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual machine before performing this operation. <br>For Windows, please refer to [Create a managed image of a generalized VM in Azure](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/capture-image-resource).<br>For Linux, please refer to [How to create an image of a virtual machine or VHD](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/capture-image).
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the ServiceResponse object if successful.
/** * Sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual machine before performing this operation. &lt;br&gt;For Windows, please refer to [Create a managed image of a generalized VM in Azure](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/capture-image-resource).&lt;br&gt;For Linux, please refer to [How to create an image of a virtual machine or VHD](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/capture-image). * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<ServiceResponse<Void>> generalizeWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmName == null) { throw new IllegalArgumentException("Parameter vmName 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.generalize(resourceGroupName, vmName, this.client.subscriptionId(), 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 = generalizeDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<Void> generalizeDelegate(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); }
Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to get the next page of virtual machines.
Params:
  • resourceGroupName – The name of the resource group.
Throws:
Returns:the PagedList<VirtualMachineInner> object if successful.
/** * Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to get the next page of virtual machines. * * @param 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;VirtualMachineInner&gt; object if successful. */
public PagedList<VirtualMachineInner> listByResourceGroup(final String resourceGroupName) { ServiceResponse<Page<VirtualMachineInner>> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); return new PagedList<VirtualMachineInner>(response.body()) { @Override public Page<VirtualMachineInner> nextPage(String nextPageLink) { return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to get the next page of virtual machines.
Params:
  • resourceGroupName – The name of the resource group.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to get the next page of virtual machines. * * @param 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<VirtualMachineInner>> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback<VirtualMachineInner> serviceCallback) { return AzureServiceFuture.fromPageResponse( listByResourceGroupSinglePageAsync(resourceGroupName), new Func1<String, Observable<ServiceResponse<Page<VirtualMachineInner>>>>() { @Override public Observable<ServiceResponse<Page<VirtualMachineInner>>> call(String nextPageLink) { return listByResourceGroupNextSinglePageAsync(nextPageLink); } }, serviceCallback); }
Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to get the next page of virtual machines.
Params:
  • resourceGroupName – The name of the resource group.
Throws:
Returns:the observable to the PagedList<VirtualMachineInner> object
/** * Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to get the next page of virtual machines. * * @param resourceGroupName The name of the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;VirtualMachineInner&gt; object */
public Observable<Page<VirtualMachineInner>> listByResourceGroupAsync(final String resourceGroupName) { return listByResourceGroupWithServiceResponseAsync(resourceGroupName) .map(new Func1<ServiceResponse<Page<VirtualMachineInner>>, Page<VirtualMachineInner>>() { @Override public Page<VirtualMachineInner> call(ServiceResponse<Page<VirtualMachineInner>> response) { return response.body(); } }); }
Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to get the next page of virtual machines.
Params:
  • resourceGroupName – The name of the resource group.
Throws:
Returns:the observable to the PagedList<VirtualMachineInner> object
/** * Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to get the next page of virtual machines. * * @param resourceGroupName The name of the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;VirtualMachineInner&gt; object */
public Observable<ServiceResponse<Page<VirtualMachineInner>>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { return listByResourceGroupSinglePageAsync(resourceGroupName) .concatMap(new Func1<ServiceResponse<Page<VirtualMachineInner>>, Observable<ServiceResponse<Page<VirtualMachineInner>>>>() { @Override public Observable<ServiceResponse<Page<VirtualMachineInner>>> call(ServiceResponse<Page<VirtualMachineInner>> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); } }); }
Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to get the next page of virtual machines. ServiceResponse> * @param resourceGroupName The name of the resource group.
Throws:
Returns:the PagedList<VirtualMachineInner> object wrapped in ServiceResponse if successful.
/** * Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to get the next page of virtual machines. * ServiceResponse<PageImpl1<VirtualMachineInner>> * @param resourceGroupName The name of the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList&lt;VirtualMachineInner&gt; object wrapped in {@link ServiceResponse} if successful. */
public Observable<ServiceResponse<Page<VirtualMachineInner>>> 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<VirtualMachineInner>>>>() { @Override public Observable<ServiceResponse<Page<VirtualMachineInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl1<VirtualMachineInner>> result = listByResourceGroupDelegate(response); return Observable.just(new ServiceResponse<Page<VirtualMachineInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<PageImpl1<VirtualMachineInner>> listByResourceGroupDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<PageImpl1<VirtualMachineInner>, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<PageImpl1<VirtualMachineInner>>() { }.getType()) .registerError(CloudException.class) .build(response); }
Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines.
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<VirtualMachineInner> object if successful.
/** * Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines. * * @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;VirtualMachineInner&gt; object if successful. */
public PagedList<VirtualMachineInner> list() { ServiceResponse<Page<VirtualMachineInner>> response = listSinglePageAsync().toBlocking().single(); return new PagedList<VirtualMachineInner>(response.body()) { @Override public Page<VirtualMachineInner> nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines.
Params:
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines. * * @param 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<VirtualMachineInner>> listAsync(final ListOperationCallback<VirtualMachineInner> serviceCallback) { return AzureServiceFuture.fromPageResponse( listSinglePageAsync(), new Func1<String, Observable<ServiceResponse<Page<VirtualMachineInner>>>>() { @Override public Observable<ServiceResponse<Page<VirtualMachineInner>>> call(String nextPageLink) { return listNextSinglePageAsync(nextPageLink); } }, serviceCallback); }
Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines.
Throws:
  • IllegalArgumentException – thrown if parameters fail the validation
Returns:the observable to the PagedList<VirtualMachineInner> object
/** * Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines. * * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;VirtualMachineInner&gt; object */
public Observable<Page<VirtualMachineInner>> listAsync() { return listWithServiceResponseAsync() .map(new Func1<ServiceResponse<Page<VirtualMachineInner>>, Page<VirtualMachineInner>>() { @Override public Page<VirtualMachineInner> call(ServiceResponse<Page<VirtualMachineInner>> response) { return response.body(); } }); }
Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines.
Throws:
  • IllegalArgumentException – thrown if parameters fail the validation
Returns:the observable to the PagedList<VirtualMachineInner> object
/** * Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines. * * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;VirtualMachineInner&gt; object */
public Observable<ServiceResponse<Page<VirtualMachineInner>>> listWithServiceResponseAsync() { return listSinglePageAsync() .concatMap(new Func1<ServiceResponse<Page<VirtualMachineInner>>, Observable<ServiceResponse<Page<VirtualMachineInner>>>>() { @Override public Observable<ServiceResponse<Page<VirtualMachineInner>>> call(ServiceResponse<Page<VirtualMachineInner>> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); } }); }
Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines.
Throws:
  • IllegalArgumentException – thrown if parameters fail the validation
Returns:the PagedList<VirtualMachineInner> object wrapped in ServiceResponse if successful.
/** * Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines. * * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList&lt;VirtualMachineInner&gt; object wrapped in {@link ServiceResponse} if successful. */
public Observable<ServiceResponse<Page<VirtualMachineInner>>> 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"; final String statusOnly = null; return service.list(this.client.subscriptionId(), apiVersion, statusOnly, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<VirtualMachineInner>>>>() { @Override public Observable<ServiceResponse<Page<VirtualMachineInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl1<VirtualMachineInner>> result = listDelegate(response); return Observable.just(new ServiceResponse<Page<VirtualMachineInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); }
Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines.
Params:
  • statusOnly – statusOnly=true enables fetching run time status of all Virtual Machines in the subscription.
Throws:
Returns:the PagedList<VirtualMachineInner> object if successful.
/** * Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines. * * @param statusOnly statusOnly=true enables fetching run time status of all Virtual Machines in the subscription. * @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;VirtualMachineInner&gt; object if successful. */
public PagedList<VirtualMachineInner> list(final String statusOnly) { ServiceResponse<Page<VirtualMachineInner>> response = listSinglePageAsync(statusOnly).toBlocking().single(); return new PagedList<VirtualMachineInner>(response.body()) { @Override public Page<VirtualMachineInner> nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines.
Params:
  • statusOnly – statusOnly=true enables fetching run time status of all Virtual Machines in the subscription.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines. * * @param statusOnly statusOnly=true enables fetching run time status of all Virtual Machines in the subscription. * @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<VirtualMachineInner>> listAsync(final String statusOnly, final ListOperationCallback<VirtualMachineInner> serviceCallback) { return AzureServiceFuture.fromPageResponse( listSinglePageAsync(statusOnly), new Func1<String, Observable<ServiceResponse<Page<VirtualMachineInner>>>>() { @Override public Observable<ServiceResponse<Page<VirtualMachineInner>>> call(String nextPageLink) { return listNextSinglePageAsync(nextPageLink); } }, serviceCallback); }
Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines.
Params:
  • statusOnly – statusOnly=true enables fetching run time status of all Virtual Machines in the subscription.
Throws:
Returns:the observable to the PagedList<VirtualMachineInner> object
/** * Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines. * * @param statusOnly statusOnly=true enables fetching run time status of all Virtual Machines in the subscription. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;VirtualMachineInner&gt; object */
public Observable<Page<VirtualMachineInner>> listAsync(final String statusOnly) { return listWithServiceResponseAsync(statusOnly) .map(new Func1<ServiceResponse<Page<VirtualMachineInner>>, Page<VirtualMachineInner>>() { @Override public Page<VirtualMachineInner> call(ServiceResponse<Page<VirtualMachineInner>> response) { return response.body(); } }); }
Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines.
Params:
  • statusOnly – statusOnly=true enables fetching run time status of all Virtual Machines in the subscription.
Throws:
Returns:the observable to the PagedList<VirtualMachineInner> object
/** * Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines. * * @param statusOnly statusOnly=true enables fetching run time status of all Virtual Machines in the subscription. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;VirtualMachineInner&gt; object */
public Observable<ServiceResponse<Page<VirtualMachineInner>>> listWithServiceResponseAsync(final String statusOnly) { return listSinglePageAsync(statusOnly) .concatMap(new Func1<ServiceResponse<Page<VirtualMachineInner>>, Observable<ServiceResponse<Page<VirtualMachineInner>>>>() { @Override public Observable<ServiceResponse<Page<VirtualMachineInner>>> call(ServiceResponse<Page<VirtualMachineInner>> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); } }); }
Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines. ServiceResponse> * @param statusOnly statusOnly=true enables fetching run time status of all Virtual Machines in the subscription.
Throws:
Returns:the PagedList<VirtualMachineInner> object wrapped in ServiceResponse if successful.
/** * Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines. * ServiceResponse<PageImpl1<VirtualMachineInner>> * @param statusOnly statusOnly=true enables fetching run time status of all Virtual Machines in the subscription. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList&lt;VirtualMachineInner&gt; object wrapped in {@link ServiceResponse} if successful. */
public Observable<ServiceResponse<Page<VirtualMachineInner>>> listSinglePageAsync(final String statusOnly) { 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, statusOnly, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<VirtualMachineInner>>>>() { @Override public Observable<ServiceResponse<Page<VirtualMachineInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl1<VirtualMachineInner>> result = listDelegate(response); return Observable.just(new ServiceResponse<Page<VirtualMachineInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<PageImpl1<VirtualMachineInner>> listDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<PageImpl1<VirtualMachineInner>, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<PageImpl1<VirtualMachineInner>>() { }.getType()) .registerError(CloudException.class) .build(response); }
Lists all available virtual machine sizes to which the specified virtual machine can be resized.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the List<VirtualMachineSizeInner> object if successful.
/** * Lists all available virtual machine sizes to which the specified virtual machine can be resized. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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 List&lt;VirtualMachineSizeInner&gt; object if successful. */
public List<VirtualMachineSizeInner> listAvailableSizes(String resourceGroupName, String vmName) { return listAvailableSizesWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); }
Lists all available virtual machine sizes to which the specified virtual machine can be resized.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Lists all available virtual machine sizes to which the specified virtual machine can be resized. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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<VirtualMachineSizeInner>> listAvailableSizesAsync(String resourceGroupName, String vmName, final ServiceCallback<List<VirtualMachineSizeInner>> serviceCallback) { return ServiceFuture.fromResponse(listAvailableSizesWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); }
Lists all available virtual machine sizes to which the specified virtual machine can be resized.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the observable to the List<VirtualMachineSizeInner> object
/** * Lists all available virtual machine sizes to which the specified virtual machine can be resized. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the List&lt;VirtualMachineSizeInner&gt; object */
public Observable<List<VirtualMachineSizeInner>> listAvailableSizesAsync(String resourceGroupName, String vmName) { return listAvailableSizesWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1<ServiceResponse<List<VirtualMachineSizeInner>>, List<VirtualMachineSizeInner>>() { @Override public List<VirtualMachineSizeInner> call(ServiceResponse<List<VirtualMachineSizeInner>> response) { return response.body(); } }); }
Lists all available virtual machine sizes to which the specified virtual machine can be resized.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the observable to the List<VirtualMachineSizeInner> object
/** * Lists all available virtual machine sizes to which the specified virtual machine can be resized. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the List&lt;VirtualMachineSizeInner&gt; object */
public Observable<ServiceResponse<List<VirtualMachineSizeInner>>> listAvailableSizesWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmName == null) { throw new IllegalArgumentException("Parameter vmName 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.listAvailableSizes(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<List<VirtualMachineSizeInner>>>>() { @Override public Observable<ServiceResponse<List<VirtualMachineSizeInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl<VirtualMachineSizeInner>> result = listAvailableSizesDelegate(response); List<VirtualMachineSizeInner> items = null; if (result.body() != null) { items = result.body().items(); } ServiceResponse<List<VirtualMachineSizeInner>> clientResponse = new ServiceResponse<List<VirtualMachineSizeInner>>(items, result.response()); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<PageImpl<VirtualMachineSizeInner>> listAvailableSizesDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<PageImpl<VirtualMachineSizeInner>, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<PageImpl<VirtualMachineSizeInner>>() { }.getType()) .registerError(CloudException.class) .build(response); }
The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
/** * The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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 vmName) { powerOffWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().body(); }
The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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 vmName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(powerOffWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); }
The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the observable for the request
/** * The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<Void> powerOffAsync(String resourceGroupName, String vmName) { return powerOffWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the observable for the request
/** * The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponse<Void>> powerOffWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmName == null) { throw new IllegalArgumentException("Parameter vmName 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; Observable<Response<ResponseBody>> observable = service.powerOff(resourceGroupName, vmName, this.client.subscriptionId(), skipShutdown, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<Void>() { }.getType()); }
The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • 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
Throws:
/** * The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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 * @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 vmName, Boolean skipShutdown) { powerOffWithServiceResponseAsync(resourceGroupName, vmName, skipShutdown).toBlocking().last().body(); }
The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • 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
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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 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 vmName, Boolean skipShutdown, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(powerOffWithServiceResponseAsync(resourceGroupName, vmName, skipShutdown), serviceCallback); }
The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • 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
Throws:
Returns:the observable for the request
/** * The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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 * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<Void> powerOffAsync(String resourceGroupName, String vmName, Boolean skipShutdown) { return powerOffWithServiceResponseAsync(resourceGroupName, vmName, skipShutdown).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • 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
Throws:
Returns:the observable for the request
/** * The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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 * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponse<Void>> powerOffWithServiceResponseAsync(String resourceGroupName, String vmName, Boolean skipShutdown) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmName == null) { throw new IllegalArgumentException("Parameter vmName 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.powerOff(resourceGroupName, vmName, this.client.subscriptionId(), skipShutdown, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<Void>() { }.getType()); }
The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
/** * The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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 vmName) { beginPowerOffWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); }
The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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 vmName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginPowerOffWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); }
The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the ServiceResponse object if successful.
/** * The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<Void> beginPowerOffAsync(String resourceGroupName, String vmName) { return beginPowerOffWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the ServiceResponse object if successful.
/** * The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<ServiceResponse<Void>> beginPowerOffWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmName == null) { throw new IllegalArgumentException("Parameter vmName 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; return service.beginPowerOff(resourceGroupName, vmName, this.client.subscriptionId(), skipShutdown, 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 = beginPowerOffDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); }
The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • 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
Throws:
/** * The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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 * @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 vmName, Boolean skipShutdown) { beginPowerOffWithServiceResponseAsync(resourceGroupName, vmName, skipShutdown).toBlocking().single().body(); }
The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • 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
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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 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 vmName, Boolean skipShutdown, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginPowerOffWithServiceResponseAsync(resourceGroupName, vmName, skipShutdown), serviceCallback); }
The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • 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
Throws:
Returns:the ServiceResponse object if successful.
/** * The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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 * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<Void> beginPowerOffAsync(String resourceGroupName, String vmName, Boolean skipShutdown) { return beginPowerOffWithServiceResponseAsync(resourceGroupName, vmName, skipShutdown).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • 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
Throws:
Returns:the ServiceResponse object if successful.
/** * The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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 * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<ServiceResponse<Void>> beginPowerOffWithServiceResponseAsync(String resourceGroupName, String vmName, Boolean skipShutdown) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmName == null) { throw new IllegalArgumentException("Parameter vmName 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.beginPowerOff(resourceGroupName, vmName, this.client.subscriptionId(), skipShutdown, 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 = 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); }
The operation to reapply a virtual machine's state.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
/** * The operation to reapply a virtual machine's state. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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 reapply(String resourceGroupName, String vmName) { reapplyWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().body(); }
The operation to reapply a virtual machine's state.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * The operation to reapply a virtual machine's state. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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> reapplyAsync(String resourceGroupName, String vmName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(reapplyWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); }
The operation to reapply a virtual machine's state.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the observable for the request
/** * The operation to reapply a virtual machine's state. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<Void> reapplyAsync(String resourceGroupName, String vmName) { return reapplyWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
The operation to reapply a virtual machine's state.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the observable for the request
/** * The operation to reapply a virtual machine's state. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponse<Void>> reapplyWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmName == null) { throw new IllegalArgumentException("Parameter vmName 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.reapply(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<Void>() { }.getType()); }
The operation to reapply a virtual machine's state.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
/** * The operation to reapply a virtual machine's state. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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 beginReapply(String resourceGroupName, String vmName) { beginReapplyWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); }
The operation to reapply a virtual machine's state.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * The operation to reapply a virtual machine's state. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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> beginReapplyAsync(String resourceGroupName, String vmName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginReapplyWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); }
The operation to reapply a virtual machine's state.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the ServiceResponse object if successful.
/** * The operation to reapply a virtual machine's state. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<Void> beginReapplyAsync(String resourceGroupName, String vmName) { return beginReapplyWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
The operation to reapply a virtual machine's state.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the ServiceResponse object if successful.
/** * The operation to reapply a virtual machine's state. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<ServiceResponse<Void>> beginReapplyWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmName == null) { throw new IllegalArgumentException("Parameter vmName 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.beginReapply(resourceGroupName, vmName, this.client.subscriptionId(), 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 = beginReapplyDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<Void> beginReapplyDelegate(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); }
The operation to restart a virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
/** * The operation to restart a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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 vmName) { restartWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().body(); }
The operation to restart a virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * The operation to restart a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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 vmName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(restartWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); }
The operation to restart a virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the observable for the request
/** * The operation to restart a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<Void> restartAsync(String resourceGroupName, String vmName) { return restartWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
The operation to restart a virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the observable for the request
/** * The operation to restart a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponse<Void>> restartWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmName == null) { throw new IllegalArgumentException("Parameter vmName 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.restart(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<Void>() { }.getType()); }
The operation to restart a virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
/** * The operation to restart a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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 vmName) { beginRestartWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); }
The operation to restart a virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * The operation to restart a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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 vmName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginRestartWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); }
The operation to restart a virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the ServiceResponse object if successful.
/** * The operation to restart a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<Void> beginRestartAsync(String resourceGroupName, String vmName) { return beginRestartWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
The operation to restart a virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the ServiceResponse object if successful.
/** * The operation to restart a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<ServiceResponse<Void>> beginRestartWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmName == null) { throw new IllegalArgumentException("Parameter vmName 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.beginRestart(resourceGroupName, vmName, this.client.subscriptionId(), 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 = 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); }
The operation to start a virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
/** * The operation to start a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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 vmName) { startWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().body(); }
The operation to start a virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * The operation to start a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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 vmName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(startWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); }
The operation to start a virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the observable for the request
/** * The operation to start a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<Void> startAsync(String resourceGroupName, String vmName) { return startWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
The operation to start a virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the observable for the request
/** * The operation to start a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponse<Void>> startWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmName == null) { throw new IllegalArgumentException("Parameter vmName 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.start(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<Void>() { }.getType()); }
The operation to start a virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
/** * The operation to start a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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 vmName) { beginStartWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); }
The operation to start a virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * The operation to start a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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 vmName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginStartWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); }
The operation to start a virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the ServiceResponse object if successful.
/** * The operation to start a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<Void> beginStartAsync(String resourceGroupName, String vmName) { return beginStartWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
The operation to start a virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the ServiceResponse object if successful.
/** * The operation to start a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<ServiceResponse<Void>> beginStartWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmName == null) { throw new IllegalArgumentException("Parameter vmName 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.beginStart(resourceGroupName, vmName, this.client.subscriptionId(), 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 = 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 the virtual machine, moves it to a new node, and powers it back on.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
/** * Shuts down the virtual machine, moves it to a new node, and powers it back on. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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 vmName) { redeployWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().body(); }
Shuts down the virtual machine, moves it to a new node, and powers it back on.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Shuts down the virtual machine, moves it to a new node, and powers it back on. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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 vmName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(redeployWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); }
Shuts down the virtual machine, moves it to a new node, and powers it back on.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the observable for the request
/** * Shuts down the virtual machine, moves it to a new node, and powers it back on. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<Void> redeployAsync(String resourceGroupName, String vmName) { return redeployWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Shuts down the virtual machine, moves it to a new node, and powers it back on.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the observable for the request
/** * Shuts down the virtual machine, moves it to a new node, and powers it back on. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponse<Void>> redeployWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmName == null) { throw new IllegalArgumentException("Parameter vmName 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.redeploy(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<Void>() { }.getType()); }
Shuts down the virtual machine, moves it to a new node, and powers it back on.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
/** * Shuts down the virtual machine, moves it to a new node, and powers it back on. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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 vmName) { beginRedeployWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); }
Shuts down the virtual machine, moves it to a new node, and powers it back on.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Shuts down the virtual machine, moves it to a new node, and powers it back on. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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 vmName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginRedeployWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); }
Shuts down the virtual machine, moves it to a new node, and powers it back on.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the ServiceResponse object if successful.
/** * Shuts down the virtual machine, moves it to a new node, and powers it back on. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<Void> beginRedeployAsync(String resourceGroupName, String vmName) { return beginRedeployWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Shuts down the virtual machine, moves it to a new node, and powers it back on.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the ServiceResponse object if successful.
/** * Shuts down the virtual machine, moves it to a new node, and powers it back on. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<ServiceResponse<Void>> beginRedeployWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmName == null) { throw new IllegalArgumentException("Parameter vmName 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.beginRedeploy(resourceGroupName, vmName, this.client.subscriptionId(), 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 = 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); }
Reimages the virtual machine which has an ephemeral OS disk back to its initial state.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
/** * Reimages the virtual machine which has an ephemeral OS disk back to its initial state. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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 vmName) { reimageWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().body(); }
Reimages the virtual machine which has an ephemeral OS disk back to its initial state.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Reimages the virtual machine which has an ephemeral OS disk back to its initial state. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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 vmName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(reimageWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); }
Reimages the virtual machine which has an ephemeral OS disk back to its initial state.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the observable for the request
/** * Reimages the virtual machine which has an ephemeral OS disk back to its initial state. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<Void> reimageAsync(String resourceGroupName, String vmName) { return reimageWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Reimages the virtual machine which has an ephemeral OS disk back to its initial state.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the observable for the request
/** * Reimages the virtual machine which has an ephemeral OS disk back to its initial state. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponse<Void>> reimageWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmName == null) { throw new IllegalArgumentException("Parameter vmName 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 tempDisk = null; VirtualMachineReimageParameters parameters = new VirtualMachineReimageParameters(); parameters.withTempDisk(null); Observable<Response<ResponseBody>> observable = service.reimage(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<Void>() { }.getType()); }
Reimages the virtual machine which has an ephemeral OS disk back to its initial state.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • tempDisk – Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage parameter is only supported for VM/VMSS with Ephemeral OS disk.
Throws:
/** * Reimages the virtual machine which has an ephemeral OS disk back to its initial state. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param tempDisk Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage parameter is only supported for VM/VMSS with Ephemeral OS disk. * @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 vmName, Boolean tempDisk) { reimageWithServiceResponseAsync(resourceGroupName, vmName, tempDisk).toBlocking().last().body(); }
Reimages the virtual machine which has an ephemeral OS disk back to its initial state.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • tempDisk – Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage parameter is only supported for VM/VMSS with Ephemeral OS disk.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Reimages the virtual machine which has an ephemeral OS disk back to its initial state. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param tempDisk Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage parameter is only supported for VM/VMSS with Ephemeral OS disk. * @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 vmName, Boolean tempDisk, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(reimageWithServiceResponseAsync(resourceGroupName, vmName, tempDisk), serviceCallback); }
Reimages the virtual machine which has an ephemeral OS disk back to its initial state.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • tempDisk – Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage parameter is only supported for VM/VMSS with Ephemeral OS disk.
Throws:
Returns:the observable for the request
/** * Reimages the virtual machine which has an ephemeral OS disk back to its initial state. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param tempDisk Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage parameter is only supported for VM/VMSS with Ephemeral OS disk. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<Void> reimageAsync(String resourceGroupName, String vmName, Boolean tempDisk) { return reimageWithServiceResponseAsync(resourceGroupName, vmName, tempDisk).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Reimages the virtual machine which has an ephemeral OS disk back to its initial state.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • tempDisk – Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage parameter is only supported for VM/VMSS with Ephemeral OS disk.
Throws:
Returns:the observable for the request
/** * Reimages the virtual machine which has an ephemeral OS disk back to its initial state. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param tempDisk Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage parameter is only supported for VM/VMSS with Ephemeral OS disk. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponse<Void>> reimageWithServiceResponseAsync(String resourceGroupName, String vmName, Boolean tempDisk) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmName == null) { throw new IllegalArgumentException("Parameter vmName 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"; VirtualMachineReimageParameters parameters = null; if (tempDisk != null) { parameters = new VirtualMachineReimageParameters(); parameters.withTempDisk(tempDisk); } Observable<Response<ResponseBody>> observable = service.reimage(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<Void>() { }.getType()); }
Reimages the virtual machine which has an ephemeral OS disk back to its initial state.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
/** * Reimages the virtual machine which has an ephemeral OS disk back to its initial state. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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 vmName) { beginReimageWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); }
Reimages the virtual machine which has an ephemeral OS disk back to its initial state.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Reimages the virtual machine which has an ephemeral OS disk back to its initial state. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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 vmName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginReimageWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); }
Reimages the virtual machine which has an ephemeral OS disk back to its initial state.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the ServiceResponse object if successful.
/** * Reimages the virtual machine which has an ephemeral OS disk back to its initial state. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<Void> beginReimageAsync(String resourceGroupName, String vmName) { return beginReimageWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Reimages the virtual machine which has an ephemeral OS disk back to its initial state.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the ServiceResponse object if successful.
/** * Reimages the virtual machine which has an ephemeral OS disk back to its initial state. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<ServiceResponse<Void>> beginReimageWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmName == null) { throw new IllegalArgumentException("Parameter vmName 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 tempDisk = null; VirtualMachineReimageParameters parameters = new VirtualMachineReimageParameters(); parameters.withTempDisk(null); return service.beginReimage(resourceGroupName, vmName, 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 = beginReimageDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); }
Reimages the virtual machine which has an ephemeral OS disk back to its initial state.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • tempDisk – Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage parameter is only supported for VM/VMSS with Ephemeral OS disk.
Throws:
/** * Reimages the virtual machine which has an ephemeral OS disk back to its initial state. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param tempDisk Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage parameter is only supported for VM/VMSS with Ephemeral OS disk. * @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 vmName, Boolean tempDisk) { beginReimageWithServiceResponseAsync(resourceGroupName, vmName, tempDisk).toBlocking().single().body(); }
Reimages the virtual machine which has an ephemeral OS disk back to its initial state.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • tempDisk – Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage parameter is only supported for VM/VMSS with Ephemeral OS disk.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Reimages the virtual machine which has an ephemeral OS disk back to its initial state. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param tempDisk Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage parameter is only supported for VM/VMSS with Ephemeral OS disk. * @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 vmName, Boolean tempDisk, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginReimageWithServiceResponseAsync(resourceGroupName, vmName, tempDisk), serviceCallback); }
Reimages the virtual machine which has an ephemeral OS disk back to its initial state.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • tempDisk – Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage parameter is only supported for VM/VMSS with Ephemeral OS disk.
Throws:
Returns:the ServiceResponse object if successful.
/** * Reimages the virtual machine which has an ephemeral OS disk back to its initial state. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param tempDisk Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage parameter is only supported for VM/VMSS with Ephemeral OS disk. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<Void> beginReimageAsync(String resourceGroupName, String vmName, Boolean tempDisk) { return beginReimageWithServiceResponseAsync(resourceGroupName, vmName, tempDisk).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Reimages the virtual machine which has an ephemeral OS disk back to its initial state.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • tempDisk – Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage parameter is only supported for VM/VMSS with Ephemeral OS disk.
Throws:
Returns:the ServiceResponse object if successful.
/** * Reimages the virtual machine which has an ephemeral OS disk back to its initial state. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param tempDisk Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage parameter is only supported for VM/VMSS with Ephemeral OS disk. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<ServiceResponse<Void>> beginReimageWithServiceResponseAsync(String resourceGroupName, String vmName, Boolean tempDisk) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmName == null) { throw new IllegalArgumentException("Parameter vmName 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"; VirtualMachineReimageParameters parameters = null; if (tempDisk != null) { parameters = new VirtualMachineReimageParameters(); parameters.withTempDisk(tempDisk); } return service.beginReimage(resourceGroupName, vmName, 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 = 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); }
The operation to retrieve SAS URIs for a virtual machine's boot diagnostic logs.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the RetrieveBootDiagnosticsDataResultInner object if successful.
/** * The operation to retrieve SAS URIs for a virtual machine's boot diagnostic logs. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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 RetrieveBootDiagnosticsDataResultInner object if successful. */
public RetrieveBootDiagnosticsDataResultInner retrieveBootDiagnosticsData(String resourceGroupName, String vmName) { return retrieveBootDiagnosticsDataWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().body(); }
The operation to retrieve SAS URIs for a virtual machine's boot diagnostic logs.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * The operation to retrieve SAS URIs for a virtual machine's boot diagnostic logs. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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<RetrieveBootDiagnosticsDataResultInner> retrieveBootDiagnosticsDataAsync(String resourceGroupName, String vmName, final ServiceCallback<RetrieveBootDiagnosticsDataResultInner> serviceCallback) { return ServiceFuture.fromResponse(retrieveBootDiagnosticsDataWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); }
The operation to retrieve SAS URIs for a virtual machine's boot diagnostic logs.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the observable for the request
/** * The operation to retrieve SAS URIs for a virtual machine's boot diagnostic logs. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<RetrieveBootDiagnosticsDataResultInner> retrieveBootDiagnosticsDataAsync(String resourceGroupName, String vmName) { return retrieveBootDiagnosticsDataWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1<ServiceResponse<RetrieveBootDiagnosticsDataResultInner>, RetrieveBootDiagnosticsDataResultInner>() { @Override public RetrieveBootDiagnosticsDataResultInner call(ServiceResponse<RetrieveBootDiagnosticsDataResultInner> response) { return response.body(); } }); }
The operation to retrieve SAS URIs for a virtual machine's boot diagnostic logs.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the observable for the request
/** * The operation to retrieve SAS URIs for a virtual machine's boot diagnostic logs. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponse<RetrieveBootDiagnosticsDataResultInner>> retrieveBootDiagnosticsDataWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmName == null) { throw new IllegalArgumentException("Parameter vmName 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 Integer sasUriExpirationTimeInMinutes = null; Observable<Response<ResponseBody>> observable = service.retrieveBootDiagnosticsData(resourceGroupName, vmName, this.client.subscriptionId(), sasUriExpirationTimeInMinutes, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<RetrieveBootDiagnosticsDataResultInner>() { }.getType()); }
The operation to retrieve SAS URIs for a virtual machine's boot diagnostic logs.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • sasUriExpirationTimeInMinutes – Expiration duration in minutes for the SAS URIs with a value between 1 to 1440 minutes. <br><br>NOTE: If not specified, SAS URIs will be generated with a default expiration duration of 120 minutes.
Throws:
Returns:the RetrieveBootDiagnosticsDataResultInner object if successful.
/** * The operation to retrieve SAS URIs for a virtual machine's boot diagnostic logs. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param sasUriExpirationTimeInMinutes Expiration duration in minutes for the SAS URIs with a value between 1 to 1440 minutes. &lt;br&gt;&lt;br&gt;NOTE: If not specified, SAS URIs will be generated with a default expiration duration of 120 minutes. * @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 RetrieveBootDiagnosticsDataResultInner object if successful. */
public RetrieveBootDiagnosticsDataResultInner retrieveBootDiagnosticsData(String resourceGroupName, String vmName, Integer sasUriExpirationTimeInMinutes) { return retrieveBootDiagnosticsDataWithServiceResponseAsync(resourceGroupName, vmName, sasUriExpirationTimeInMinutes).toBlocking().last().body(); }
The operation to retrieve SAS URIs for a virtual machine's boot diagnostic logs.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • sasUriExpirationTimeInMinutes – Expiration duration in minutes for the SAS URIs with a value between 1 to 1440 minutes. <br><br>NOTE: If not specified, SAS URIs will be generated with a default expiration duration of 120 minutes.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * The operation to retrieve SAS URIs for a virtual machine's boot diagnostic logs. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param sasUriExpirationTimeInMinutes Expiration duration in minutes for the SAS URIs with a value between 1 to 1440 minutes. &lt;br&gt;&lt;br&gt;NOTE: If not specified, SAS URIs will be generated with a default expiration duration of 120 minutes. * @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<RetrieveBootDiagnosticsDataResultInner> retrieveBootDiagnosticsDataAsync(String resourceGroupName, String vmName, Integer sasUriExpirationTimeInMinutes, final ServiceCallback<RetrieveBootDiagnosticsDataResultInner> serviceCallback) { return ServiceFuture.fromResponse(retrieveBootDiagnosticsDataWithServiceResponseAsync(resourceGroupName, vmName, sasUriExpirationTimeInMinutes), serviceCallback); }
The operation to retrieve SAS URIs for a virtual machine's boot diagnostic logs.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • sasUriExpirationTimeInMinutes – Expiration duration in minutes for the SAS URIs with a value between 1 to 1440 minutes. <br><br>NOTE: If not specified, SAS URIs will be generated with a default expiration duration of 120 minutes.
Throws:
Returns:the observable for the request
/** * The operation to retrieve SAS URIs for a virtual machine's boot diagnostic logs. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param sasUriExpirationTimeInMinutes Expiration duration in minutes for the SAS URIs with a value between 1 to 1440 minutes. &lt;br&gt;&lt;br&gt;NOTE: If not specified, SAS URIs will be generated with a default expiration duration of 120 minutes. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<RetrieveBootDiagnosticsDataResultInner> retrieveBootDiagnosticsDataAsync(String resourceGroupName, String vmName, Integer sasUriExpirationTimeInMinutes) { return retrieveBootDiagnosticsDataWithServiceResponseAsync(resourceGroupName, vmName, sasUriExpirationTimeInMinutes).map(new Func1<ServiceResponse<RetrieveBootDiagnosticsDataResultInner>, RetrieveBootDiagnosticsDataResultInner>() { @Override public RetrieveBootDiagnosticsDataResultInner call(ServiceResponse<RetrieveBootDiagnosticsDataResultInner> response) { return response.body(); } }); }
The operation to retrieve SAS URIs for a virtual machine's boot diagnostic logs.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • sasUriExpirationTimeInMinutes – Expiration duration in minutes for the SAS URIs with a value between 1 to 1440 minutes. <br><br>NOTE: If not specified, SAS URIs will be generated with a default expiration duration of 120 minutes.
Throws:
Returns:the observable for the request
/** * The operation to retrieve SAS URIs for a virtual machine's boot diagnostic logs. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param sasUriExpirationTimeInMinutes Expiration duration in minutes for the SAS URIs with a value between 1 to 1440 minutes. &lt;br&gt;&lt;br&gt;NOTE: If not specified, SAS URIs will be generated with a default expiration duration of 120 minutes. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponse<RetrieveBootDiagnosticsDataResultInner>> retrieveBootDiagnosticsDataWithServiceResponseAsync(String resourceGroupName, String vmName, Integer sasUriExpirationTimeInMinutes) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmName == null) { throw new IllegalArgumentException("Parameter vmName 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.retrieveBootDiagnosticsData(resourceGroupName, vmName, this.client.subscriptionId(), sasUriExpirationTimeInMinutes, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<RetrieveBootDiagnosticsDataResultInner>() { }.getType()); }
The operation to perform maintenance on a virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
/** * The operation to perform maintenance on a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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 vmName) { performMaintenanceWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().body(); }
The operation to perform maintenance on a virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * The operation to perform maintenance on a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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 vmName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(performMaintenanceWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); }
The operation to perform maintenance on a virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the observable for the request
/** * The operation to perform maintenance on a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<Void> performMaintenanceAsync(String resourceGroupName, String vmName) { return performMaintenanceWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
The operation to perform maintenance on a virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the observable for the request
/** * The operation to perform maintenance on a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponse<Void>> performMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmName == null) { throw new IllegalArgumentException("Parameter vmName 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.performMaintenance(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<Void>() { }.getType()); }
The operation to perform maintenance on a virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
/** * The operation to perform maintenance on a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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 vmName) { beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); }
The operation to perform maintenance on a virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * The operation to perform maintenance on a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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 vmName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); }
The operation to perform maintenance on a virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the ServiceResponse object if successful.
/** * The operation to perform maintenance on a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<Void> beginPerformMaintenanceAsync(String resourceGroupName, String vmName) { return beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
The operation to perform maintenance on a virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the ServiceResponse object if successful.
/** * The operation to perform maintenance on a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<ServiceResponse<Void>> beginPerformMaintenanceWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmName == null) { throw new IllegalArgumentException("Parameter vmName 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.beginPerformMaintenance(resourceGroupName, vmName, this.client.subscriptionId(), 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 = 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); }
The operation to simulate the eviction of spot virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
/** * The operation to simulate the eviction of spot virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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 simulateEviction(String resourceGroupName, String vmName) { simulateEvictionWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().body(); }
The operation to simulate the eviction of spot virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * The operation to simulate the eviction of spot virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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> simulateEvictionAsync(String resourceGroupName, String vmName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(simulateEvictionWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); }
The operation to simulate the eviction of spot virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the observable for the request
/** * The operation to simulate the eviction of spot virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<Void> simulateEvictionAsync(String resourceGroupName, String vmName) { return simulateEvictionWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
The operation to simulate the eviction of spot virtual machine.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the observable for the request
/** * The operation to simulate the eviction of spot virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponse<Void>> simulateEvictionWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmName == null) { throw new IllegalArgumentException("Parameter vmName 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.simulateEviction(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<Void>() { }.getType()); }
Assess patches on the VM.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the VirtualMachineAssessPatchesResultInner object if successful.
/** * Assess patches on the VM. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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 VirtualMachineAssessPatchesResultInner object if successful. */
public VirtualMachineAssessPatchesResultInner assessPatches(String resourceGroupName, String vmName) { return assessPatchesWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().body(); }
Assess patches on the VM.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Assess patches on the VM. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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<VirtualMachineAssessPatchesResultInner> assessPatchesAsync(String resourceGroupName, String vmName, final ServiceCallback<VirtualMachineAssessPatchesResultInner> serviceCallback) { return ServiceFuture.fromResponse(assessPatchesWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); }
Assess patches on the VM.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the observable for the request
/** * Assess patches on the VM. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<VirtualMachineAssessPatchesResultInner> assessPatchesAsync(String resourceGroupName, String vmName) { return assessPatchesWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1<ServiceResponse<VirtualMachineAssessPatchesResultInner>, VirtualMachineAssessPatchesResultInner>() { @Override public VirtualMachineAssessPatchesResultInner call(ServiceResponse<VirtualMachineAssessPatchesResultInner> response) { return response.body(); } }); }
Assess patches on the VM.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the observable for the request
/** * Assess patches on the VM. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponse<VirtualMachineAssessPatchesResultInner>> assessPatchesWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmName == null) { throw new IllegalArgumentException("Parameter vmName 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.assessPatches(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken<VirtualMachineAssessPatchesResultInner>() { }.getType()); }
Assess patches on the VM.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the VirtualMachineAssessPatchesResultInner object if successful.
/** * Assess patches on the VM. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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 VirtualMachineAssessPatchesResultInner object if successful. */
public VirtualMachineAssessPatchesResultInner beginAssessPatches(String resourceGroupName, String vmName) { return beginAssessPatchesWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); }
Assess patches on the VM.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Assess patches on the VM. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @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<VirtualMachineAssessPatchesResultInner> beginAssessPatchesAsync(String resourceGroupName, String vmName, final ServiceCallback<VirtualMachineAssessPatchesResultInner> serviceCallback) { return ServiceFuture.fromResponse(beginAssessPatchesWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback); }
Assess patches on the VM.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the observable to the VirtualMachineAssessPatchesResultInner object
/** * Assess patches on the VM. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the VirtualMachineAssessPatchesResultInner object */
public Observable<VirtualMachineAssessPatchesResultInner> beginAssessPatchesAsync(String resourceGroupName, String vmName) { return beginAssessPatchesWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1<ServiceResponse<VirtualMachineAssessPatchesResultInner>, VirtualMachineAssessPatchesResultInner>() { @Override public VirtualMachineAssessPatchesResultInner call(ServiceResponse<VirtualMachineAssessPatchesResultInner> response) { return response.body(); } }); }
Assess patches on the VM.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
Throws:
Returns:the observable to the VirtualMachineAssessPatchesResultInner object
/** * Assess patches on the VM. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the VirtualMachineAssessPatchesResultInner object */
public Observable<ServiceResponse<VirtualMachineAssessPatchesResultInner>> beginAssessPatchesWithServiceResponseAsync(String resourceGroupName, String vmName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmName == null) { throw new IllegalArgumentException("Parameter vmName 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.beginAssessPatches(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<VirtualMachineAssessPatchesResultInner>>>() { @Override public Observable<ServiceResponse<VirtualMachineAssessPatchesResultInner>> call(Response<ResponseBody> response) { try { ServiceResponse<VirtualMachineAssessPatchesResultInner> clientResponse = beginAssessPatchesDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<VirtualMachineAssessPatchesResultInner> beginAssessPatchesDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<VirtualMachineAssessPatchesResultInner, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<VirtualMachineAssessPatchesResultInner>() { }.getType()) .register(202, new TypeToken<Void>() { }.getType()) .registerError(CloudException.class) .build(response); }
Installs patches on the VM.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • installPatchesInput – Input for InstallPatches as directly received by the API
Throws:
Returns:the VirtualMachineInstallPatchesResultInner object if successful.
/** * Installs patches on the VM. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param installPatchesInput Input for InstallPatches as directly received by the API * @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 VirtualMachineInstallPatchesResultInner object if successful. */
public VirtualMachineInstallPatchesResultInner installPatches(String resourceGroupName, String vmName, VirtualMachineInstallPatchesParameters installPatchesInput) { return installPatchesWithServiceResponseAsync(resourceGroupName, vmName, installPatchesInput).toBlocking().last().body(); }
Installs patches on the VM.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • installPatchesInput – Input for InstallPatches as directly received by the API
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Installs patches on the VM. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param installPatchesInput Input for InstallPatches as directly received by the API * @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<VirtualMachineInstallPatchesResultInner> installPatchesAsync(String resourceGroupName, String vmName, VirtualMachineInstallPatchesParameters installPatchesInput, final ServiceCallback<VirtualMachineInstallPatchesResultInner> serviceCallback) { return ServiceFuture.fromResponse(installPatchesWithServiceResponseAsync(resourceGroupName, vmName, installPatchesInput), serviceCallback); }
Installs patches on the VM.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • installPatchesInput – Input for InstallPatches as directly received by the API
Throws:
Returns:the observable for the request
/** * Installs patches on the VM. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param installPatchesInput Input for InstallPatches as directly received by the API * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<VirtualMachineInstallPatchesResultInner> installPatchesAsync(String resourceGroupName, String vmName, VirtualMachineInstallPatchesParameters installPatchesInput) { return installPatchesWithServiceResponseAsync(resourceGroupName, vmName, installPatchesInput).map(new Func1<ServiceResponse<VirtualMachineInstallPatchesResultInner>, VirtualMachineInstallPatchesResultInner>() { @Override public VirtualMachineInstallPatchesResultInner call(ServiceResponse<VirtualMachineInstallPatchesResultInner> response) { return response.body(); } }); }
Installs patches on the VM.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • installPatchesInput – Input for InstallPatches as directly received by the API
Throws:
Returns:the observable for the request
/** * Installs patches on the VM. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param installPatchesInput Input for InstallPatches as directly received by the API * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponse<VirtualMachineInstallPatchesResultInner>> installPatchesWithServiceResponseAsync(String resourceGroupName, String vmName, VirtualMachineInstallPatchesParameters installPatchesInput) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmName == null) { throw new IllegalArgumentException("Parameter vmName 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 (installPatchesInput == null) { throw new IllegalArgumentException("Parameter installPatchesInput is required and cannot be null."); } Validator.validate(installPatchesInput); final String apiVersion = "2020-12-01"; Observable<Response<ResponseBody>> observable = service.installPatches(resourceGroupName, vmName, this.client.subscriptionId(), installPatchesInput, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken<VirtualMachineInstallPatchesResultInner>() { }.getType()); }
Installs patches on the VM.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • installPatchesInput – Input for InstallPatches as directly received by the API
Throws:
Returns:the VirtualMachineInstallPatchesResultInner object if successful.
/** * Installs patches on the VM. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param installPatchesInput Input for InstallPatches as directly received by the API * @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 VirtualMachineInstallPatchesResultInner object if successful. */
public VirtualMachineInstallPatchesResultInner beginInstallPatches(String resourceGroupName, String vmName, VirtualMachineInstallPatchesParameters installPatchesInput) { return beginInstallPatchesWithServiceResponseAsync(resourceGroupName, vmName, installPatchesInput).toBlocking().single().body(); }
Installs patches on the VM.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • installPatchesInput – Input for InstallPatches as directly received by the API
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Installs patches on the VM. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param installPatchesInput Input for InstallPatches as directly received by the API * @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<VirtualMachineInstallPatchesResultInner> beginInstallPatchesAsync(String resourceGroupName, String vmName, VirtualMachineInstallPatchesParameters installPatchesInput, final ServiceCallback<VirtualMachineInstallPatchesResultInner> serviceCallback) { return ServiceFuture.fromResponse(beginInstallPatchesWithServiceResponseAsync(resourceGroupName, vmName, installPatchesInput), serviceCallback); }
Installs patches on the VM.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • installPatchesInput – Input for InstallPatches as directly received by the API
Throws:
Returns:the observable to the VirtualMachineInstallPatchesResultInner object
/** * Installs patches on the VM. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param installPatchesInput Input for InstallPatches as directly received by the API * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the VirtualMachineInstallPatchesResultInner object */
public Observable<VirtualMachineInstallPatchesResultInner> beginInstallPatchesAsync(String resourceGroupName, String vmName, VirtualMachineInstallPatchesParameters installPatchesInput) { return beginInstallPatchesWithServiceResponseAsync(resourceGroupName, vmName, installPatchesInput).map(new Func1<ServiceResponse<VirtualMachineInstallPatchesResultInner>, VirtualMachineInstallPatchesResultInner>() { @Override public VirtualMachineInstallPatchesResultInner call(ServiceResponse<VirtualMachineInstallPatchesResultInner> response) { return response.body(); } }); }
Installs patches on the VM.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • installPatchesInput – Input for InstallPatches as directly received by the API
Throws:
Returns:the observable to the VirtualMachineInstallPatchesResultInner object
/** * Installs patches on the VM. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param installPatchesInput Input for InstallPatches as directly received by the API * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the VirtualMachineInstallPatchesResultInner object */
public Observable<ServiceResponse<VirtualMachineInstallPatchesResultInner>> beginInstallPatchesWithServiceResponseAsync(String resourceGroupName, String vmName, VirtualMachineInstallPatchesParameters installPatchesInput) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmName == null) { throw new IllegalArgumentException("Parameter vmName 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 (installPatchesInput == null) { throw new IllegalArgumentException("Parameter installPatchesInput is required and cannot be null."); } Validator.validate(installPatchesInput); final String apiVersion = "2020-12-01"; return service.beginInstallPatches(resourceGroupName, vmName, this.client.subscriptionId(), installPatchesInput, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<VirtualMachineInstallPatchesResultInner>>>() { @Override public Observable<ServiceResponse<VirtualMachineInstallPatchesResultInner>> call(Response<ResponseBody> response) { try { ServiceResponse<VirtualMachineInstallPatchesResultInner> clientResponse = beginInstallPatchesDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<VirtualMachineInstallPatchesResultInner> beginInstallPatchesDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<VirtualMachineInstallPatchesResultInner, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<VirtualMachineInstallPatchesResultInner>() { }.getType()) .register(202, new TypeToken<Void>() { }.getType()) .registerError(CloudException.class) .build(response); }
Run command on the VM.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • parameters – Parameters supplied to the Run command operation.
Throws:
Returns:the RunCommandResultInner object if successful.
/** * Run command on the VM. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param parameters Parameters supplied to the Run command 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 RunCommandResultInner object if successful. */
public RunCommandResultInner runCommand(String resourceGroupName, String vmName, RunCommandInput parameters) { return runCommandWithServiceResponseAsync(resourceGroupName, vmName, parameters).toBlocking().last().body(); }
Run command on the VM.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • parameters – Parameters supplied to the Run command operation.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Run command on the VM. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param parameters Parameters supplied to the Run command operation. * @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<RunCommandResultInner> runCommandAsync(String resourceGroupName, String vmName, RunCommandInput parameters, final ServiceCallback<RunCommandResultInner> serviceCallback) { return ServiceFuture.fromResponse(runCommandWithServiceResponseAsync(resourceGroupName, vmName, parameters), serviceCallback); }
Run command on the VM.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • parameters – Parameters supplied to the Run command operation.
Throws:
Returns:the observable for the request
/** * Run command on the VM. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param parameters Parameters supplied to the Run command operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<RunCommandResultInner> runCommandAsync(String resourceGroupName, String vmName, RunCommandInput parameters) { return runCommandWithServiceResponseAsync(resourceGroupName, vmName, parameters).map(new Func1<ServiceResponse<RunCommandResultInner>, RunCommandResultInner>() { @Override public RunCommandResultInner call(ServiceResponse<RunCommandResultInner> response) { return response.body(); } }); }
Run command on the VM.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • parameters – Parameters supplied to the Run command operation.
Throws:
Returns:the observable for the request
/** * Run command on the VM. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param parameters Parameters supplied to the Run command operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponse<RunCommandResultInner>> runCommandWithServiceResponseAsync(String resourceGroupName, String vmName, RunCommandInput parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmName == null) { throw new IllegalArgumentException("Parameter vmName 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.runCommand(resourceGroupName, vmName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken<RunCommandResultInner>() { }.getType()); }
Run command on the VM.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • parameters – Parameters supplied to the Run command operation.
Throws:
Returns:the RunCommandResultInner object if successful.
/** * Run command on the VM. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param parameters Parameters supplied to the Run command 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 RunCommandResultInner object if successful. */
public RunCommandResultInner beginRunCommand(String resourceGroupName, String vmName, RunCommandInput parameters) { return beginRunCommandWithServiceResponseAsync(resourceGroupName, vmName, parameters).toBlocking().single().body(); }
Run command on the VM.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • parameters – Parameters supplied to the Run command operation.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Run command on the VM. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param parameters Parameters supplied to the Run command operation. * @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<RunCommandResultInner> beginRunCommandAsync(String resourceGroupName, String vmName, RunCommandInput parameters, final ServiceCallback<RunCommandResultInner> serviceCallback) { return ServiceFuture.fromResponse(beginRunCommandWithServiceResponseAsync(resourceGroupName, vmName, parameters), serviceCallback); }
Run command on the VM.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • parameters – Parameters supplied to the Run command operation.
Throws:
Returns:the observable to the RunCommandResultInner object
/** * Run command on the VM. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param parameters Parameters supplied to the Run command operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the RunCommandResultInner object */
public Observable<RunCommandResultInner> beginRunCommandAsync(String resourceGroupName, String vmName, RunCommandInput parameters) { return beginRunCommandWithServiceResponseAsync(resourceGroupName, vmName, parameters).map(new Func1<ServiceResponse<RunCommandResultInner>, RunCommandResultInner>() { @Override public RunCommandResultInner call(ServiceResponse<RunCommandResultInner> response) { return response.body(); } }); }
Run command on the VM.
Params:
  • resourceGroupName – The name of the resource group.
  • vmName – The name of the virtual machine.
  • parameters – Parameters supplied to the Run command operation.
Throws:
Returns:the observable to the RunCommandResultInner object
/** * Run command on the VM. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param parameters Parameters supplied to the Run command operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the RunCommandResultInner object */
public Observable<ServiceResponse<RunCommandResultInner>> beginRunCommandWithServiceResponseAsync(String resourceGroupName, String vmName, RunCommandInput parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (vmName == null) { throw new IllegalArgumentException("Parameter vmName 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.beginRunCommand(resourceGroupName, vmName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<RunCommandResultInner>>>() { @Override public Observable<ServiceResponse<RunCommandResultInner>> call(Response<ResponseBody> response) { try { ServiceResponse<RunCommandResultInner> clientResponse = beginRunCommandDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<RunCommandResultInner> beginRunCommandDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<RunCommandResultInner, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<RunCommandResultInner>() { }.getType()) .register(202, new TypeToken<Void>() { }.getType()) .registerError(CloudException.class) .build(response); }
Gets all the virtual machines under the specified subscription for the specified location.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the PagedList<VirtualMachineInner> object if successful.
/** * Gets all the virtual machines 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;VirtualMachineInner&gt; object if successful. */
public PagedList<VirtualMachineInner> listByLocationNext(final String nextPageLink) { ServiceResponse<Page<VirtualMachineInner>> response = listByLocationNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList<VirtualMachineInner>(response.body()) { @Override public Page<VirtualMachineInner> nextPage(String nextPageLink) { return listByLocationNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
Gets all the virtual machines 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 virtual machines 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<VirtualMachineInner>> listByLocationNextAsync(final String nextPageLink, final ServiceFuture<List<VirtualMachineInner>> serviceFuture, final ListOperationCallback<VirtualMachineInner> serviceCallback) { return AzureServiceFuture.fromPageResponse( listByLocationNextSinglePageAsync(nextPageLink), new Func1<String, Observable<ServiceResponse<Page<VirtualMachineInner>>>>() { @Override public Observable<ServiceResponse<Page<VirtualMachineInner>>> call(String nextPageLink) { return listByLocationNextSinglePageAsync(nextPageLink); } }, serviceCallback); }
Gets all the virtual machines 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<VirtualMachineInner> object
/** * Gets all the virtual machines 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;VirtualMachineInner&gt; object */
public Observable<Page<VirtualMachineInner>> listByLocationNextAsync(final String nextPageLink) { return listByLocationNextWithServiceResponseAsync(nextPageLink) .map(new Func1<ServiceResponse<Page<VirtualMachineInner>>, Page<VirtualMachineInner>>() { @Override public Page<VirtualMachineInner> call(ServiceResponse<Page<VirtualMachineInner>> response) { return response.body(); } }); }
Gets all the virtual machines 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<VirtualMachineInner> object
/** * Gets all the virtual machines 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;VirtualMachineInner&gt; object */
public Observable<ServiceResponse<Page<VirtualMachineInner>>> listByLocationNextWithServiceResponseAsync(final String nextPageLink) { return listByLocationNextSinglePageAsync(nextPageLink) .concatMap(new Func1<ServiceResponse<Page<VirtualMachineInner>>, Observable<ServiceResponse<Page<VirtualMachineInner>>>>() { @Override public Observable<ServiceResponse<Page<VirtualMachineInner>>> call(ServiceResponse<Page<VirtualMachineInner>> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } return Observable.just(page).concatWith(listByLocationNextWithServiceResponseAsync(nextPageLink)); } }); }
Gets all the virtual machines 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<VirtualMachineInner> object wrapped in ServiceResponse if successful.
/** * Gets all the virtual machines under the specified subscription for the specified location. * ServiceResponse<PageImpl1<VirtualMachineInner>> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList&lt;VirtualMachineInner&gt; object wrapped in {@link ServiceResponse} if successful. */
public Observable<ServiceResponse<Page<VirtualMachineInner>>> 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<VirtualMachineInner>>>>() { @Override public Observable<ServiceResponse<Page<VirtualMachineInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl1<VirtualMachineInner>> result = listByLocationNextDelegate(response); return Observable.just(new ServiceResponse<Page<VirtualMachineInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<PageImpl1<VirtualMachineInner>> listByLocationNextDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<PageImpl1<VirtualMachineInner>, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<PageImpl1<VirtualMachineInner>>() { }.getType()) .registerError(CloudException.class) .build(response); }
Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to get the next page of virtual machines.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the PagedList<VirtualMachineInner> object if successful.
/** * Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to get the next page of virtual machines. * * @param 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;VirtualMachineInner&gt; object if successful. */
public PagedList<VirtualMachineInner> listByResourceGroupNext(final String nextPageLink) { ServiceResponse<Page<VirtualMachineInner>> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList<VirtualMachineInner>(response.body()) { @Override public Page<VirtualMachineInner> nextPage(String nextPageLink) { return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to get the next page of virtual machines.
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
/** * Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to get the next page of virtual machines. * * @param 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<VirtualMachineInner>> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture<List<VirtualMachineInner>> serviceFuture, final ListOperationCallback<VirtualMachineInner> serviceCallback) { return AzureServiceFuture.fromPageResponse( listByResourceGroupNextSinglePageAsync(nextPageLink), new Func1<String, Observable<ServiceResponse<Page<VirtualMachineInner>>>>() { @Override public Observable<ServiceResponse<Page<VirtualMachineInner>>> call(String nextPageLink) { return listByResourceGroupNextSinglePageAsync(nextPageLink); } }, serviceCallback); }
Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to get the next page of virtual machines.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the observable to the PagedList<VirtualMachineInner> object
/** * Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to get the next page of virtual machines. * * @param 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;VirtualMachineInner&gt; object */
public Observable<Page<VirtualMachineInner>> listByResourceGroupNextAsync(final String nextPageLink) { return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) .map(new Func1<ServiceResponse<Page<VirtualMachineInner>>, Page<VirtualMachineInner>>() { @Override public Page<VirtualMachineInner> call(ServiceResponse<Page<VirtualMachineInner>> response) { return response.body(); } }); }
Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to get the next page of virtual machines.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the observable to the PagedList<VirtualMachineInner> object
/** * Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to get the next page of virtual machines. * * @param 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;VirtualMachineInner&gt; object */
public Observable<ServiceResponse<Page<VirtualMachineInner>>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { return listByResourceGroupNextSinglePageAsync(nextPageLink) .concatMap(new Func1<ServiceResponse<Page<VirtualMachineInner>>, Observable<ServiceResponse<Page<VirtualMachineInner>>>>() { @Override public Observable<ServiceResponse<Page<VirtualMachineInner>>> call(ServiceResponse<Page<VirtualMachineInner>> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); } }); }
Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to get the next page of virtual machines. ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation.
Throws:
Returns:the PagedList<VirtualMachineInner> object wrapped in ServiceResponse if successful.
/** * Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to get the next page of virtual machines. * ServiceResponse<PageImpl1<VirtualMachineInner>> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList&lt;VirtualMachineInner&gt; object wrapped in {@link ServiceResponse} if successful. */
public Observable<ServiceResponse<Page<VirtualMachineInner>>> 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<VirtualMachineInner>>>>() { @Override public Observable<ServiceResponse<Page<VirtualMachineInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl1<VirtualMachineInner>> result = listByResourceGroupNextDelegate(response); return Observable.just(new ServiceResponse<Page<VirtualMachineInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<PageImpl1<VirtualMachineInner>> listByResourceGroupNextDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<PageImpl1<VirtualMachineInner>, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<PageImpl1<VirtualMachineInner>>() { }.getType()) .registerError(CloudException.class) .build(response); }
Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the PagedList<VirtualMachineInner> object if successful.
/** * Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines. * * @param 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;VirtualMachineInner&gt; object if successful. */
public PagedList<VirtualMachineInner> listNext(final String nextPageLink) { ServiceResponse<Page<VirtualMachineInner>> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList<VirtualMachineInner>(response.body()) { @Override public Page<VirtualMachineInner> nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines.
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
/** * Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines. * * @param 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<VirtualMachineInner>> listNextAsync(final String nextPageLink, final ServiceFuture<List<VirtualMachineInner>> serviceFuture, final ListOperationCallback<VirtualMachineInner> serviceCallback) { return AzureServiceFuture.fromPageResponse( listNextSinglePageAsync(nextPageLink), new Func1<String, Observable<ServiceResponse<Page<VirtualMachineInner>>>>() { @Override public Observable<ServiceResponse<Page<VirtualMachineInner>>> call(String nextPageLink) { return listNextSinglePageAsync(nextPageLink); } }, serviceCallback); }
Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the observable to the PagedList<VirtualMachineInner> object
/** * Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines. * * @param 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;VirtualMachineInner&gt; object */
public Observable<Page<VirtualMachineInner>> listNextAsync(final String nextPageLink) { return listNextWithServiceResponseAsync(nextPageLink) .map(new Func1<ServiceResponse<Page<VirtualMachineInner>>, Page<VirtualMachineInner>>() { @Override public Page<VirtualMachineInner> call(ServiceResponse<Page<VirtualMachineInner>> response) { return response.body(); } }); }
Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the observable to the PagedList<VirtualMachineInner> object
/** * Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines. * * @param 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;VirtualMachineInner&gt; object */
public Observable<ServiceResponse<Page<VirtualMachineInner>>> listNextWithServiceResponseAsync(final String nextPageLink) { return listNextSinglePageAsync(nextPageLink) .concatMap(new Func1<ServiceResponse<Page<VirtualMachineInner>>, Observable<ServiceResponse<Page<VirtualMachineInner>>>>() { @Override public Observable<ServiceResponse<Page<VirtualMachineInner>>> call(ServiceResponse<Page<VirtualMachineInner>> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); } }); }
Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines. ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation.
Throws:
Returns:the PagedList<VirtualMachineInner> object wrapped in ServiceResponse if successful.
/** * Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines. * ServiceResponse<PageImpl1<VirtualMachineInner>> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList&lt;VirtualMachineInner&gt; object wrapped in {@link ServiceResponse} if successful. */
public Observable<ServiceResponse<Page<VirtualMachineInner>>> 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<VirtualMachineInner>>>>() { @Override public Observable<ServiceResponse<Page<VirtualMachineInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl1<VirtualMachineInner>> result = listNextDelegate(response); return Observable.just(new ServiceResponse<Page<VirtualMachineInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<PageImpl1<VirtualMachineInner>> listNextDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<PageImpl1<VirtualMachineInner>, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<PageImpl1<VirtualMachineInner>>() { }.getType()) .registerError(CloudException.class) .build(response); } }