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 retrofit2.Retrofit;
import com.google.common.reflect.TypeToken;
import com.microsoft.azure.CloudException;
import com.microsoft.azure.management.compute.VirtualMachineScaleSetVMExtensionUpdate;
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 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.PUT;
import retrofit2.http.Query;
import retrofit2.Response;
import rx.functions.Func1;
import rx.Observable;
An instance of this class provides access to all the operations defined
in VirtualMachineScaleSetVMExtensions.
/**
* An instance of this class provides access to all the operations defined
* in VirtualMachineScaleSetVMExtensions.
*/
public class VirtualMachineScaleSetVMExtensionsInner {
The Retrofit service to perform REST calls. /** The Retrofit service to perform REST calls. */
private VirtualMachineScaleSetVMExtensionsService service;
The service client containing this operation class. /** The service client containing this operation class. */
private ComputeManagementClientImpl client;
Initializes an instance of VirtualMachineScaleSetVMExtensionsInner.
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 VirtualMachineScaleSetVMExtensionsInner.
*
* @param retrofit the Retrofit instance built from a Retrofit Builder.
* @param client the instance of the service client containing this operation class.
*/
public VirtualMachineScaleSetVMExtensionsInner(Retrofit retrofit, ComputeManagementClientImpl client) {
this.service = retrofit.create(VirtualMachineScaleSetVMExtensionsService.class);
this.client = client;
}
The interface defining all the services for VirtualMachineScaleSetVMExtensions to be
used by Retrofit to perform actually REST calls.
/**
* The interface defining all the services for VirtualMachineScaleSetVMExtensions to be
* used by Retrofit to perform actually REST calls.
*/
interface VirtualMachineScaleSetVMExtensionsService {
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSetVMExtensions createOrUpdate" })
@PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/extensions/{vmExtensionName}")
Observable<Response<ResponseBody>> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("instanceId") String instanceId, @Path("vmExtensionName") String vmExtensionName, @Path("subscriptionId") String subscriptionId, @Body VirtualMachineScaleSetVMExtensionInner extensionParameters, @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.VirtualMachineScaleSetVMExtensions beginCreateOrUpdate" })
@PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/extensions/{vmExtensionName}")
Observable<Response<ResponseBody>> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("instanceId") String instanceId, @Path("vmExtensionName") String vmExtensionName, @Path("subscriptionId") String subscriptionId, @Body VirtualMachineScaleSetVMExtensionInner extensionParameters, @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.VirtualMachineScaleSetVMExtensions update" })
@PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/extensions/{vmExtensionName}")
Observable<Response<ResponseBody>> update(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("instanceId") String instanceId, @Path("vmExtensionName") String vmExtensionName, @Path("subscriptionId") String subscriptionId, @Body VirtualMachineScaleSetVMExtensionUpdate extensionParameters, @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.VirtualMachineScaleSetVMExtensions beginUpdate" })
@PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/extensions/{vmExtensionName}")
Observable<Response<ResponseBody>> beginUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("instanceId") String instanceId, @Path("vmExtensionName") String vmExtensionName, @Path("subscriptionId") String subscriptionId, @Body VirtualMachineScaleSetVMExtensionUpdate extensionParameters, @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.VirtualMachineScaleSetVMExtensions delete" })
@HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/extensions/{vmExtensionName}", method = "DELETE", hasBody = true)
Observable<Response<ResponseBody>> delete(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("instanceId") String instanceId, @Path("vmExtensionName") String vmExtensionName, @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.VirtualMachineScaleSetVMExtensions beginDelete" })
@HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/extensions/{vmExtensionName}", method = "DELETE", hasBody = true)
Observable<Response<ResponseBody>> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("instanceId") String instanceId, @Path("vmExtensionName") String vmExtensionName, @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.VirtualMachineScaleSetVMExtensions get" })
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/extensions/{vmExtensionName}")
Observable<Response<ResponseBody>> get(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("instanceId") String instanceId, @Path("vmExtensionName") String vmExtensionName, @Path("subscriptionId") String subscriptionId, @Query("$expand") String 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.VirtualMachineScaleSetVMExtensions list" })
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/extensions")
Observable<Response<ResponseBody>> list(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @Query("$expand") String expand, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
}
The operation to create or update the VMSS VM extension.
Params: - resourceGroupName – The name of the resource group.
- vmScaleSetName – The name of the VM scale set.
- instanceId – The instance ID of the virtual machine.
- vmExtensionName – The name of the virtual machine extension.
- extensionParameters – Parameters supplied to the Create Virtual Machine Extension operation.
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 VirtualMachineScaleSetVMExtensionInner object if successful.
/**
* The operation to create or update the VMSS VM extension.
*
* @param resourceGroupName The name of the resource group.
* @param vmScaleSetName The name of the VM scale set.
* @param instanceId The instance ID of the virtual machine.
* @param vmExtensionName The name of the virtual machine extension.
* @param extensionParameters Parameters supplied to the Create Virtual Machine Extension 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 VirtualMachineScaleSetVMExtensionInner object if successful.
*/
public VirtualMachineScaleSetVMExtensionInner createOrUpdate(String resourceGroupName, String vmScaleSetName, String instanceId, String vmExtensionName, VirtualMachineScaleSetVMExtensionInner extensionParameters) {
return createOrUpdateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId, vmExtensionName, extensionParameters).toBlocking().last().body();
}
The operation to create or update the VMSS VM extension.
Params: - resourceGroupName – The name of the resource group.
- vmScaleSetName – The name of the VM scale set.
- instanceId – The instance ID of the virtual machine.
- vmExtensionName – The name of the virtual machine extension.
- extensionParameters – Parameters supplied to the Create Virtual Machine Extension operation.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* The operation to create or update the VMSS VM extension.
*
* @param resourceGroupName The name of the resource group.
* @param vmScaleSetName The name of the VM scale set.
* @param instanceId The instance ID of the virtual machine.
* @param vmExtensionName The name of the virtual machine extension.
* @param extensionParameters Parameters supplied to the Create Virtual Machine Extension 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<VirtualMachineScaleSetVMExtensionInner> createOrUpdateAsync(String resourceGroupName, String vmScaleSetName, String instanceId, String vmExtensionName, VirtualMachineScaleSetVMExtensionInner extensionParameters, final ServiceCallback<VirtualMachineScaleSetVMExtensionInner> serviceCallback) {
return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId, vmExtensionName, extensionParameters), serviceCallback);
}
The operation to create or update the VMSS VM extension.
Params: - resourceGroupName – The name of the resource group.
- vmScaleSetName – The name of the VM scale set.
- instanceId – The instance ID of the virtual machine.
- vmExtensionName – The name of the virtual machine extension.
- extensionParameters – Parameters supplied to the Create Virtual Machine Extension operation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable for the request
/**
* The operation to create or update the VMSS VM extension.
*
* @param resourceGroupName The name of the resource group.
* @param vmScaleSetName The name of the VM scale set.
* @param instanceId The instance ID of the virtual machine.
* @param vmExtensionName The name of the virtual machine extension.
* @param extensionParameters Parameters supplied to the Create Virtual Machine Extension operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
public Observable<VirtualMachineScaleSetVMExtensionInner> createOrUpdateAsync(String resourceGroupName, String vmScaleSetName, String instanceId, String vmExtensionName, VirtualMachineScaleSetVMExtensionInner extensionParameters) {
return createOrUpdateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId, vmExtensionName, extensionParameters).map(new Func1<ServiceResponse<VirtualMachineScaleSetVMExtensionInner>, VirtualMachineScaleSetVMExtensionInner>() {
@Override
public VirtualMachineScaleSetVMExtensionInner call(ServiceResponse<VirtualMachineScaleSetVMExtensionInner> response) {
return response.body();
}
});
}
The operation to create or update the VMSS VM extension.
Params: - resourceGroupName – The name of the resource group.
- vmScaleSetName – The name of the VM scale set.
- instanceId – The instance ID of the virtual machine.
- vmExtensionName – The name of the virtual machine extension.
- extensionParameters – Parameters supplied to the Create Virtual Machine Extension operation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable for the request
/**
* The operation to create or update the VMSS VM extension.
*
* @param resourceGroupName The name of the resource group.
* @param vmScaleSetName The name of the VM scale set.
* @param instanceId The instance ID of the virtual machine.
* @param vmExtensionName The name of the virtual machine extension.
* @param extensionParameters Parameters supplied to the Create Virtual Machine Extension operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
public Observable<ServiceResponse<VirtualMachineScaleSetVMExtensionInner>> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId, String vmExtensionName, VirtualMachineScaleSetVMExtensionInner extensionParameters) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (vmScaleSetName == null) {
throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.");
}
if (instanceId == null) {
throw new IllegalArgumentException("Parameter instanceId is required and cannot be null.");
}
if (vmExtensionName == null) {
throw new IllegalArgumentException("Parameter vmExtensionName 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 (extensionParameters == null) {
throw new IllegalArgumentException("Parameter extensionParameters is required and cannot be null.");
}
Validator.validate(extensionParameters);
final String apiVersion = "2020-12-01";
Observable<Response<ResponseBody>> observable = service.createOrUpdate(resourceGroupName, vmScaleSetName, instanceId, vmExtensionName, this.client.subscriptionId(), extensionParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent());
return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken<VirtualMachineScaleSetVMExtensionInner>() { }.getType());
}
The operation to create or update the VMSS VM extension.
Params: - resourceGroupName – The name of the resource group.
- vmScaleSetName – The name of the VM scale set.
- instanceId – The instance ID of the virtual machine.
- vmExtensionName – The name of the virtual machine extension.
- extensionParameters – Parameters supplied to the Create Virtual Machine Extension operation.
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 VirtualMachineScaleSetVMExtensionInner object if successful.
/**
* The operation to create or update the VMSS VM extension.
*
* @param resourceGroupName The name of the resource group.
* @param vmScaleSetName The name of the VM scale set.
* @param instanceId The instance ID of the virtual machine.
* @param vmExtensionName The name of the virtual machine extension.
* @param extensionParameters Parameters supplied to the Create Virtual Machine Extension 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 VirtualMachineScaleSetVMExtensionInner object if successful.
*/
public VirtualMachineScaleSetVMExtensionInner beginCreateOrUpdate(String resourceGroupName, String vmScaleSetName, String instanceId, String vmExtensionName, VirtualMachineScaleSetVMExtensionInner extensionParameters) {
return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId, vmExtensionName, extensionParameters).toBlocking().single().body();
}
The operation to create or update the VMSS VM extension.
Params: - resourceGroupName – The name of the resource group.
- vmScaleSetName – The name of the VM scale set.
- instanceId – The instance ID of the virtual machine.
- vmExtensionName – The name of the virtual machine extension.
- extensionParameters – Parameters supplied to the Create Virtual Machine Extension operation.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* The operation to create or update the VMSS VM extension.
*
* @param resourceGroupName The name of the resource group.
* @param vmScaleSetName The name of the VM scale set.
* @param instanceId The instance ID of the virtual machine.
* @param vmExtensionName The name of the virtual machine extension.
* @param extensionParameters Parameters supplied to the Create Virtual Machine Extension 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<VirtualMachineScaleSetVMExtensionInner> beginCreateOrUpdateAsync(String resourceGroupName, String vmScaleSetName, String instanceId, String vmExtensionName, VirtualMachineScaleSetVMExtensionInner extensionParameters, final ServiceCallback<VirtualMachineScaleSetVMExtensionInner> serviceCallback) {
return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId, vmExtensionName, extensionParameters), serviceCallback);
}
The operation to create or update the VMSS VM extension.
Params: - resourceGroupName – The name of the resource group.
- vmScaleSetName – The name of the VM scale set.
- instanceId – The instance ID of the virtual machine.
- vmExtensionName – The name of the virtual machine extension.
- extensionParameters – Parameters supplied to the Create Virtual Machine Extension operation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the VirtualMachineScaleSetVMExtensionInner object
/**
* The operation to create or update the VMSS VM extension.
*
* @param resourceGroupName The name of the resource group.
* @param vmScaleSetName The name of the VM scale set.
* @param instanceId The instance ID of the virtual machine.
* @param vmExtensionName The name of the virtual machine extension.
* @param extensionParameters Parameters supplied to the Create Virtual Machine Extension operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the VirtualMachineScaleSetVMExtensionInner object
*/
public Observable<VirtualMachineScaleSetVMExtensionInner> beginCreateOrUpdateAsync(String resourceGroupName, String vmScaleSetName, String instanceId, String vmExtensionName, VirtualMachineScaleSetVMExtensionInner extensionParameters) {
return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId, vmExtensionName, extensionParameters).map(new Func1<ServiceResponse<VirtualMachineScaleSetVMExtensionInner>, VirtualMachineScaleSetVMExtensionInner>() {
@Override
public VirtualMachineScaleSetVMExtensionInner call(ServiceResponse<VirtualMachineScaleSetVMExtensionInner> response) {
return response.body();
}
});
}
The operation to create or update the VMSS VM extension.
Params: - resourceGroupName – The name of the resource group.
- vmScaleSetName – The name of the VM scale set.
- instanceId – The instance ID of the virtual machine.
- vmExtensionName – The name of the virtual machine extension.
- extensionParameters – Parameters supplied to the Create Virtual Machine Extension operation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the VirtualMachineScaleSetVMExtensionInner object
/**
* The operation to create or update the VMSS VM extension.
*
* @param resourceGroupName The name of the resource group.
* @param vmScaleSetName The name of the VM scale set.
* @param instanceId The instance ID of the virtual machine.
* @param vmExtensionName The name of the virtual machine extension.
* @param extensionParameters Parameters supplied to the Create Virtual Machine Extension operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the VirtualMachineScaleSetVMExtensionInner object
*/
public Observable<ServiceResponse<VirtualMachineScaleSetVMExtensionInner>> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId, String vmExtensionName, VirtualMachineScaleSetVMExtensionInner extensionParameters) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (vmScaleSetName == null) {
throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.");
}
if (instanceId == null) {
throw new IllegalArgumentException("Parameter instanceId is required and cannot be null.");
}
if (vmExtensionName == null) {
throw new IllegalArgumentException("Parameter vmExtensionName 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 (extensionParameters == null) {
throw new IllegalArgumentException("Parameter extensionParameters is required and cannot be null.");
}
Validator.validate(extensionParameters);
final String apiVersion = "2020-12-01";
return service.beginCreateOrUpdate(resourceGroupName, vmScaleSetName, instanceId, vmExtensionName, this.client.subscriptionId(), extensionParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<VirtualMachineScaleSetVMExtensionInner>>>() {
@Override
public Observable<ServiceResponse<VirtualMachineScaleSetVMExtensionInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<VirtualMachineScaleSetVMExtensionInner> clientResponse = beginCreateOrUpdateDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<VirtualMachineScaleSetVMExtensionInner> beginCreateOrUpdateDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<VirtualMachineScaleSetVMExtensionInner, CloudException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<VirtualMachineScaleSetVMExtensionInner>() { }.getType())
.register(201, new TypeToken<VirtualMachineScaleSetVMExtensionInner>() { }.getType())
.registerError(CloudException.class)
.build(response);
}
The operation to update the VMSS VM extension.
Params: - resourceGroupName – The name of the resource group.
- vmScaleSetName – The name of the VM scale set.
- instanceId – The instance ID of the virtual machine.
- vmExtensionName – The name of the virtual machine extension.
- extensionParameters – Parameters supplied to the Update Virtual Machine Extension operation.
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 VirtualMachineScaleSetVMExtensionInner object if successful.
/**
* The operation to update the VMSS VM extension.
*
* @param resourceGroupName The name of the resource group.
* @param vmScaleSetName The name of the VM scale set.
* @param instanceId The instance ID of the virtual machine.
* @param vmExtensionName The name of the virtual machine extension.
* @param extensionParameters Parameters supplied to the Update Virtual Machine Extension 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 VirtualMachineScaleSetVMExtensionInner object if successful.
*/
public VirtualMachineScaleSetVMExtensionInner update(String resourceGroupName, String vmScaleSetName, String instanceId, String vmExtensionName, VirtualMachineScaleSetVMExtensionUpdate extensionParameters) {
return updateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId, vmExtensionName, extensionParameters).toBlocking().last().body();
}
The operation to update the VMSS VM extension.
Params: - resourceGroupName – The name of the resource group.
- vmScaleSetName – The name of the VM scale set.
- instanceId – The instance ID of the virtual machine.
- vmExtensionName – The name of the virtual machine extension.
- extensionParameters – Parameters supplied to the Update Virtual Machine Extension operation.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* The operation to update the VMSS VM extension.
*
* @param resourceGroupName The name of the resource group.
* @param vmScaleSetName The name of the VM scale set.
* @param instanceId The instance ID of the virtual machine.
* @param vmExtensionName The name of the virtual machine extension.
* @param extensionParameters Parameters supplied to the Update Virtual Machine Extension 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<VirtualMachineScaleSetVMExtensionInner> updateAsync(String resourceGroupName, String vmScaleSetName, String instanceId, String vmExtensionName, VirtualMachineScaleSetVMExtensionUpdate extensionParameters, final ServiceCallback<VirtualMachineScaleSetVMExtensionInner> serviceCallback) {
return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId, vmExtensionName, extensionParameters), serviceCallback);
}
The operation to update the VMSS VM extension.
Params: - resourceGroupName – The name of the resource group.
- vmScaleSetName – The name of the VM scale set.
- instanceId – The instance ID of the virtual machine.
- vmExtensionName – The name of the virtual machine extension.
- extensionParameters – Parameters supplied to the Update Virtual Machine Extension operation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable for the request
/**
* The operation to update the VMSS VM extension.
*
* @param resourceGroupName The name of the resource group.
* @param vmScaleSetName The name of the VM scale set.
* @param instanceId The instance ID of the virtual machine.
* @param vmExtensionName The name of the virtual machine extension.
* @param extensionParameters Parameters supplied to the Update Virtual Machine Extension operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
public Observable<VirtualMachineScaleSetVMExtensionInner> updateAsync(String resourceGroupName, String vmScaleSetName, String instanceId, String vmExtensionName, VirtualMachineScaleSetVMExtensionUpdate extensionParameters) {
return updateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId, vmExtensionName, extensionParameters).map(new Func1<ServiceResponse<VirtualMachineScaleSetVMExtensionInner>, VirtualMachineScaleSetVMExtensionInner>() {
@Override
public VirtualMachineScaleSetVMExtensionInner call(ServiceResponse<VirtualMachineScaleSetVMExtensionInner> response) {
return response.body();
}
});
}
The operation to update the VMSS VM extension.
Params: - resourceGroupName – The name of the resource group.
- vmScaleSetName – The name of the VM scale set.
- instanceId – The instance ID of the virtual machine.
- vmExtensionName – The name of the virtual machine extension.
- extensionParameters – Parameters supplied to the Update Virtual Machine Extension operation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable for the request
/**
* The operation to update the VMSS VM extension.
*
* @param resourceGroupName The name of the resource group.
* @param vmScaleSetName The name of the VM scale set.
* @param instanceId The instance ID of the virtual machine.
* @param vmExtensionName The name of the virtual machine extension.
* @param extensionParameters Parameters supplied to the Update Virtual Machine Extension operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
public Observable<ServiceResponse<VirtualMachineScaleSetVMExtensionInner>> updateWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId, String vmExtensionName, VirtualMachineScaleSetVMExtensionUpdate extensionParameters) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (vmScaleSetName == null) {
throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.");
}
if (instanceId == null) {
throw new IllegalArgumentException("Parameter instanceId is required and cannot be null.");
}
if (vmExtensionName == null) {
throw new IllegalArgumentException("Parameter vmExtensionName 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 (extensionParameters == null) {
throw new IllegalArgumentException("Parameter extensionParameters is required and cannot be null.");
}
Validator.validate(extensionParameters);
final String apiVersion = "2020-12-01";
Observable<Response<ResponseBody>> observable = service.update(resourceGroupName, vmScaleSetName, instanceId, vmExtensionName, this.client.subscriptionId(), extensionParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent());
return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken<VirtualMachineScaleSetVMExtensionInner>() { }.getType());
}
The operation to update the VMSS VM extension.
Params: - resourceGroupName – The name of the resource group.
- vmScaleSetName – The name of the VM scale set.
- instanceId – The instance ID of the virtual machine.
- vmExtensionName – The name of the virtual machine extension.
- extensionParameters – Parameters supplied to the Update Virtual Machine Extension operation.
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 VirtualMachineScaleSetVMExtensionInner object if successful.
/**
* The operation to update the VMSS VM extension.
*
* @param resourceGroupName The name of the resource group.
* @param vmScaleSetName The name of the VM scale set.
* @param instanceId The instance ID of the virtual machine.
* @param vmExtensionName The name of the virtual machine extension.
* @param extensionParameters Parameters supplied to the Update Virtual Machine Extension 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 VirtualMachineScaleSetVMExtensionInner object if successful.
*/
public VirtualMachineScaleSetVMExtensionInner beginUpdate(String resourceGroupName, String vmScaleSetName, String instanceId, String vmExtensionName, VirtualMachineScaleSetVMExtensionUpdate extensionParameters) {
return beginUpdateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId, vmExtensionName, extensionParameters).toBlocking().single().body();
}
The operation to update the VMSS VM extension.
Params: - resourceGroupName – The name of the resource group.
- vmScaleSetName – The name of the VM scale set.
- instanceId – The instance ID of the virtual machine.
- vmExtensionName – The name of the virtual machine extension.
- extensionParameters – Parameters supplied to the Update Virtual Machine Extension operation.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* The operation to update the VMSS VM extension.
*
* @param resourceGroupName The name of the resource group.
* @param vmScaleSetName The name of the VM scale set.
* @param instanceId The instance ID of the virtual machine.
* @param vmExtensionName The name of the virtual machine extension.
* @param extensionParameters Parameters supplied to the Update Virtual Machine Extension 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<VirtualMachineScaleSetVMExtensionInner> beginUpdateAsync(String resourceGroupName, String vmScaleSetName, String instanceId, String vmExtensionName, VirtualMachineScaleSetVMExtensionUpdate extensionParameters, final ServiceCallback<VirtualMachineScaleSetVMExtensionInner> serviceCallback) {
return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId, vmExtensionName, extensionParameters), serviceCallback);
}
The operation to update the VMSS VM extension.
Params: - resourceGroupName – The name of the resource group.
- vmScaleSetName – The name of the VM scale set.
- instanceId – The instance ID of the virtual machine.
- vmExtensionName – The name of the virtual machine extension.
- extensionParameters – Parameters supplied to the Update Virtual Machine Extension operation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the VirtualMachineScaleSetVMExtensionInner object
/**
* The operation to update the VMSS VM extension.
*
* @param resourceGroupName The name of the resource group.
* @param vmScaleSetName The name of the VM scale set.
* @param instanceId The instance ID of the virtual machine.
* @param vmExtensionName The name of the virtual machine extension.
* @param extensionParameters Parameters supplied to the Update Virtual Machine Extension operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the VirtualMachineScaleSetVMExtensionInner object
*/
public Observable<VirtualMachineScaleSetVMExtensionInner> beginUpdateAsync(String resourceGroupName, String vmScaleSetName, String instanceId, String vmExtensionName, VirtualMachineScaleSetVMExtensionUpdate extensionParameters) {
return beginUpdateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId, vmExtensionName, extensionParameters).map(new Func1<ServiceResponse<VirtualMachineScaleSetVMExtensionInner>, VirtualMachineScaleSetVMExtensionInner>() {
@Override
public VirtualMachineScaleSetVMExtensionInner call(ServiceResponse<VirtualMachineScaleSetVMExtensionInner> response) {
return response.body();
}
});
}
The operation to update the VMSS VM extension.
Params: - resourceGroupName – The name of the resource group.
- vmScaleSetName – The name of the VM scale set.
- instanceId – The instance ID of the virtual machine.
- vmExtensionName – The name of the virtual machine extension.
- extensionParameters – Parameters supplied to the Update Virtual Machine Extension operation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the VirtualMachineScaleSetVMExtensionInner object
/**
* The operation to update the VMSS VM extension.
*
* @param resourceGroupName The name of the resource group.
* @param vmScaleSetName The name of the VM scale set.
* @param instanceId The instance ID of the virtual machine.
* @param vmExtensionName The name of the virtual machine extension.
* @param extensionParameters Parameters supplied to the Update Virtual Machine Extension operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the VirtualMachineScaleSetVMExtensionInner object
*/
public Observable<ServiceResponse<VirtualMachineScaleSetVMExtensionInner>> beginUpdateWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId, String vmExtensionName, VirtualMachineScaleSetVMExtensionUpdate extensionParameters) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (vmScaleSetName == null) {
throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.");
}
if (instanceId == null) {
throw new IllegalArgumentException("Parameter instanceId is required and cannot be null.");
}
if (vmExtensionName == null) {
throw new IllegalArgumentException("Parameter vmExtensionName 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 (extensionParameters == null) {
throw new IllegalArgumentException("Parameter extensionParameters is required and cannot be null.");
}
Validator.validate(extensionParameters);
final String apiVersion = "2020-12-01";
return service.beginUpdate(resourceGroupName, vmScaleSetName, instanceId, vmExtensionName, this.client.subscriptionId(), extensionParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<VirtualMachineScaleSetVMExtensionInner>>>() {
@Override
public Observable<ServiceResponse<VirtualMachineScaleSetVMExtensionInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<VirtualMachineScaleSetVMExtensionInner> clientResponse = beginUpdateDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<VirtualMachineScaleSetVMExtensionInner> beginUpdateDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<VirtualMachineScaleSetVMExtensionInner, CloudException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<VirtualMachineScaleSetVMExtensionInner>() { }.getType())
.registerError(CloudException.class)
.build(response);
}
The operation to delete the VMSS VM extension.
Params: - resourceGroupName – The name of the resource group.
- vmScaleSetName – The name of the VM scale set.
- instanceId – The instance ID of the virtual machine.
- vmExtensionName – The name of the virtual machine extension.
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
/**
* The operation to delete the VMSS VM extension.
*
* @param resourceGroupName The name of the resource group.
* @param vmScaleSetName The name of the VM scale set.
* @param instanceId The instance ID of the virtual machine.
* @param vmExtensionName The name of the virtual machine extension.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws CloudException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
*/
public void delete(String resourceGroupName, String vmScaleSetName, String instanceId, String vmExtensionName) {
deleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId, vmExtensionName).toBlocking().last().body();
}
The operation to delete the VMSS VM extension.
Params: - resourceGroupName – The name of the resource group.
- vmScaleSetName – The name of the VM scale set.
- instanceId – The instance ID of the virtual machine.
- vmExtensionName – The name of the virtual machine extension.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* The operation to delete the VMSS VM extension.
*
* @param resourceGroupName The name of the resource group.
* @param vmScaleSetName The name of the VM scale set.
* @param instanceId The instance ID of the virtual machine.
* @param vmExtensionName The name of the virtual machine extension.
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceFuture} object
*/
public ServiceFuture<Void> deleteAsync(String resourceGroupName, String vmScaleSetName, String instanceId, String vmExtensionName, final ServiceCallback<Void> serviceCallback) {
return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId, vmExtensionName), serviceCallback);
}
The operation to delete the VMSS VM extension.
Params: - resourceGroupName – The name of the resource group.
- vmScaleSetName – The name of the VM scale set.
- instanceId – The instance ID of the virtual machine.
- vmExtensionName – The name of the virtual machine extension.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable for the request
/**
* The operation to delete the VMSS VM extension.
*
* @param resourceGroupName The name of the resource group.
* @param vmScaleSetName The name of the VM scale set.
* @param instanceId The instance ID of the virtual machine.
* @param vmExtensionName The name of the virtual machine extension.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
public Observable<Void> deleteAsync(String resourceGroupName, String vmScaleSetName, String instanceId, String vmExtensionName) {
return deleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId, vmExtensionName).map(new Func1<ServiceResponse<Void>, Void>() {
@Override
public Void call(ServiceResponse<Void> response) {
return response.body();
}
});
}
The operation to delete the VMSS VM extension.
Params: - resourceGroupName – The name of the resource group.
- vmScaleSetName – The name of the VM scale set.
- instanceId – The instance ID of the virtual machine.
- vmExtensionName – The name of the virtual machine extension.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable for the request
/**
* The operation to delete the VMSS VM extension.
*
* @param resourceGroupName The name of the resource group.
* @param vmScaleSetName The name of the VM scale set.
* @param instanceId The instance ID of the virtual machine.
* @param vmExtensionName The name of the virtual machine extension.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
public Observable<ServiceResponse<Void>> deleteWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId, String vmExtensionName) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (vmScaleSetName == null) {
throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.");
}
if (instanceId == null) {
throw new IllegalArgumentException("Parameter instanceId is required and cannot be null.");
}
if (vmExtensionName == null) {
throw new IllegalArgumentException("Parameter vmExtensionName is required and cannot be null.");
}
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
final String apiVersion = "2020-12-01";
Observable<Response<ResponseBody>> observable = service.delete(resourceGroupName, vmScaleSetName, instanceId, vmExtensionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent());
return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<Void>() { }.getType());
}
The operation to delete the VMSS VM extension.
Params: - resourceGroupName – The name of the resource group.
- vmScaleSetName – The name of the VM scale set.
- instanceId – The instance ID of the virtual machine.
- vmExtensionName – The name of the virtual machine extension.
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
/**
* The operation to delete the VMSS VM extension.
*
* @param resourceGroupName The name of the resource group.
* @param vmScaleSetName The name of the VM scale set.
* @param instanceId The instance ID of the virtual machine.
* @param vmExtensionName The name of the virtual machine extension.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws CloudException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
*/
public void beginDelete(String resourceGroupName, String vmScaleSetName, String instanceId, String vmExtensionName) {
beginDeleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId, vmExtensionName).toBlocking().single().body();
}
The operation to delete the VMSS VM extension.
Params: - resourceGroupName – The name of the resource group.
- vmScaleSetName – The name of the VM scale set.
- instanceId – The instance ID of the virtual machine.
- vmExtensionName – The name of the virtual machine extension.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* The operation to delete the VMSS VM extension.
*
* @param resourceGroupName The name of the resource group.
* @param vmScaleSetName The name of the VM scale set.
* @param instanceId The instance ID of the virtual machine.
* @param vmExtensionName The name of the virtual machine extension.
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceFuture} object
*/
public ServiceFuture<Void> beginDeleteAsync(String resourceGroupName, String vmScaleSetName, String instanceId, String vmExtensionName, final ServiceCallback<Void> serviceCallback) {
return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId, vmExtensionName), serviceCallback);
}
The operation to delete the VMSS VM extension.
Params: - resourceGroupName – The name of the resource group.
- vmScaleSetName – The name of the VM scale set.
- instanceId – The instance ID of the virtual machine.
- vmExtensionName – The name of the virtual machine extension.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceResponse
object if successful.
/**
* The operation to delete the VMSS VM extension.
*
* @param resourceGroupName The name of the resource group.
* @param vmScaleSetName The name of the VM scale set.
* @param instanceId The instance ID of the virtual machine.
* @param vmExtensionName The name of the virtual machine extension.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceResponse} object if successful.
*/
public Observable<Void> beginDeleteAsync(String resourceGroupName, String vmScaleSetName, String instanceId, String vmExtensionName) {
return beginDeleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId, vmExtensionName).map(new Func1<ServiceResponse<Void>, Void>() {
@Override
public Void call(ServiceResponse<Void> response) {
return response.body();
}
});
}
The operation to delete the VMSS VM extension.
Params: - resourceGroupName – The name of the resource group.
- vmScaleSetName – The name of the VM scale set.
- instanceId – The instance ID of the virtual machine.
- vmExtensionName – The name of the virtual machine extension.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceResponse
object if successful.
/**
* The operation to delete the VMSS VM extension.
*
* @param resourceGroupName The name of the resource group.
* @param vmScaleSetName The name of the VM scale set.
* @param instanceId The instance ID of the virtual machine.
* @param vmExtensionName The name of the virtual machine extension.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceResponse} object if successful.
*/
public Observable<ServiceResponse<Void>> beginDeleteWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId, String vmExtensionName) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (vmScaleSetName == null) {
throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.");
}
if (instanceId == null) {
throw new IllegalArgumentException("Parameter instanceId is required and cannot be null.");
}
if (vmExtensionName == null) {
throw new IllegalArgumentException("Parameter vmExtensionName is required and cannot be null.");
}
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
final String apiVersion = "2020-12-01";
return service.beginDelete(resourceGroupName, vmScaleSetName, instanceId, vmExtensionName, 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 = 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);
}
The operation to get the VMSS VM extension.
Params: - resourceGroupName – The name of the resource group.
- vmScaleSetName – The name of the VM scale set.
- instanceId – The instance ID of the virtual machine.
- vmExtensionName – The name of the virtual machine extension.
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 VirtualMachineScaleSetVMExtensionInner object if successful.
/**
* The operation to get the VMSS VM extension.
*
* @param resourceGroupName The name of the resource group.
* @param vmScaleSetName The name of the VM scale set.
* @param instanceId The instance ID of the virtual machine.
* @param vmExtensionName The name of the virtual machine extension.
* @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 VirtualMachineScaleSetVMExtensionInner object if successful.
*/
public VirtualMachineScaleSetVMExtensionInner get(String resourceGroupName, String vmScaleSetName, String instanceId, String vmExtensionName) {
return getWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId, vmExtensionName).toBlocking().single().body();
}
The operation to get the VMSS VM extension.
Params: - resourceGroupName – The name of the resource group.
- vmScaleSetName – The name of the VM scale set.
- instanceId – The instance ID of the virtual machine.
- vmExtensionName – The name of the virtual machine extension.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* The operation to get the VMSS VM extension.
*
* @param resourceGroupName The name of the resource group.
* @param vmScaleSetName The name of the VM scale set.
* @param instanceId The instance ID of the virtual machine.
* @param vmExtensionName The name of the virtual machine extension.
* @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<VirtualMachineScaleSetVMExtensionInner> getAsync(String resourceGroupName, String vmScaleSetName, String instanceId, String vmExtensionName, final ServiceCallback<VirtualMachineScaleSetVMExtensionInner> serviceCallback) {
return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId, vmExtensionName), serviceCallback);
}
The operation to get the VMSS VM extension.
Params: - resourceGroupName – The name of the resource group.
- vmScaleSetName – The name of the VM scale set.
- instanceId – The instance ID of the virtual machine.
- vmExtensionName – The name of the virtual machine extension.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the VirtualMachineScaleSetVMExtensionInner object
/**
* The operation to get the VMSS VM extension.
*
* @param resourceGroupName The name of the resource group.
* @param vmScaleSetName The name of the VM scale set.
* @param instanceId The instance ID of the virtual machine.
* @param vmExtensionName The name of the virtual machine extension.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the VirtualMachineScaleSetVMExtensionInner object
*/
public Observable<VirtualMachineScaleSetVMExtensionInner> getAsync(String resourceGroupName, String vmScaleSetName, String instanceId, String vmExtensionName) {
return getWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId, vmExtensionName).map(new Func1<ServiceResponse<VirtualMachineScaleSetVMExtensionInner>, VirtualMachineScaleSetVMExtensionInner>() {
@Override
public VirtualMachineScaleSetVMExtensionInner call(ServiceResponse<VirtualMachineScaleSetVMExtensionInner> response) {
return response.body();
}
});
}
The operation to get the VMSS VM extension.
Params: - resourceGroupName – The name of the resource group.
- vmScaleSetName – The name of the VM scale set.
- instanceId – The instance ID of the virtual machine.
- vmExtensionName – The name of the virtual machine extension.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the VirtualMachineScaleSetVMExtensionInner object
/**
* The operation to get the VMSS VM extension.
*
* @param resourceGroupName The name of the resource group.
* @param vmScaleSetName The name of the VM scale set.
* @param instanceId The instance ID of the virtual machine.
* @param vmExtensionName The name of the virtual machine extension.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the VirtualMachineScaleSetVMExtensionInner object
*/
public Observable<ServiceResponse<VirtualMachineScaleSetVMExtensionInner>> getWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId, String vmExtensionName) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (vmScaleSetName == null) {
throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.");
}
if (instanceId == null) {
throw new IllegalArgumentException("Parameter instanceId is required and cannot be null.");
}
if (vmExtensionName == null) {
throw new IllegalArgumentException("Parameter vmExtensionName is required and cannot be null.");
}
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
final String apiVersion = "2020-12-01";
final String expand = null;
return service.get(resourceGroupName, vmScaleSetName, instanceId, vmExtensionName, this.client.subscriptionId(), expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<VirtualMachineScaleSetVMExtensionInner>>>() {
@Override
public Observable<ServiceResponse<VirtualMachineScaleSetVMExtensionInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<VirtualMachineScaleSetVMExtensionInner> clientResponse = getDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
The operation to get the VMSS VM extension.
Params: - resourceGroupName – The name of the resource group.
- vmScaleSetName – The name of the VM scale set.
- instanceId – The instance ID of the virtual machine.
- vmExtensionName – The name of the virtual machine extension.
- expand – The expand expression to apply on the operation.
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 VirtualMachineScaleSetVMExtensionInner object if successful.
/**
* The operation to get the VMSS VM extension.
*
* @param resourceGroupName The name of the resource group.
* @param vmScaleSetName The name of the VM scale set.
* @param instanceId The instance ID of the virtual machine.
* @param vmExtensionName The name of the virtual machine extension.
* @param expand The expand expression to apply on the 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 VirtualMachineScaleSetVMExtensionInner object if successful.
*/
public VirtualMachineScaleSetVMExtensionInner get(String resourceGroupName, String vmScaleSetName, String instanceId, String vmExtensionName, String expand) {
return getWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId, vmExtensionName, expand).toBlocking().single().body();
}
The operation to get the VMSS VM extension.
Params: - resourceGroupName – The name of the resource group.
- vmScaleSetName – The name of the VM scale set.
- instanceId – The instance ID of the virtual machine.
- vmExtensionName – The name of the virtual machine extension.
- expand – The expand expression to apply on the operation.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* The operation to get the VMSS VM extension.
*
* @param resourceGroupName The name of the resource group.
* @param vmScaleSetName The name of the VM scale set.
* @param instanceId The instance ID of the virtual machine.
* @param vmExtensionName The name of the virtual machine extension.
* @param expand The expand expression to apply on the 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<VirtualMachineScaleSetVMExtensionInner> getAsync(String resourceGroupName, String vmScaleSetName, String instanceId, String vmExtensionName, String expand, final ServiceCallback<VirtualMachineScaleSetVMExtensionInner> serviceCallback) {
return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId, vmExtensionName, expand), serviceCallback);
}
The operation to get the VMSS VM extension.
Params: - resourceGroupName – The name of the resource group.
- vmScaleSetName – The name of the VM scale set.
- instanceId – The instance ID of the virtual machine.
- vmExtensionName – The name of the virtual machine extension.
- expand – The expand expression to apply on the operation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the VirtualMachineScaleSetVMExtensionInner object
/**
* The operation to get the VMSS VM extension.
*
* @param resourceGroupName The name of the resource group.
* @param vmScaleSetName The name of the VM scale set.
* @param instanceId The instance ID of the virtual machine.
* @param vmExtensionName The name of the virtual machine extension.
* @param expand The expand expression to apply on the operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the VirtualMachineScaleSetVMExtensionInner object
*/
public Observable<VirtualMachineScaleSetVMExtensionInner> getAsync(String resourceGroupName, String vmScaleSetName, String instanceId, String vmExtensionName, String expand) {
return getWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId, vmExtensionName, expand).map(new Func1<ServiceResponse<VirtualMachineScaleSetVMExtensionInner>, VirtualMachineScaleSetVMExtensionInner>() {
@Override
public VirtualMachineScaleSetVMExtensionInner call(ServiceResponse<VirtualMachineScaleSetVMExtensionInner> response) {
return response.body();
}
});
}
The operation to get the VMSS VM extension.
Params: - resourceGroupName – The name of the resource group.
- vmScaleSetName – The name of the VM scale set.
- instanceId – The instance ID of the virtual machine.
- vmExtensionName – The name of the virtual machine extension.
- expand – The expand expression to apply on the operation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the VirtualMachineScaleSetVMExtensionInner object
/**
* The operation to get the VMSS VM extension.
*
* @param resourceGroupName The name of the resource group.
* @param vmScaleSetName The name of the VM scale set.
* @param instanceId The instance ID of the virtual machine.
* @param vmExtensionName The name of the virtual machine extension.
* @param expand The expand expression to apply on the operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the VirtualMachineScaleSetVMExtensionInner object
*/
public Observable<ServiceResponse<VirtualMachineScaleSetVMExtensionInner>> getWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId, String vmExtensionName, String expand) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (vmScaleSetName == null) {
throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.");
}
if (instanceId == null) {
throw new IllegalArgumentException("Parameter instanceId is required and cannot be null.");
}
if (vmExtensionName == null) {
throw new IllegalArgumentException("Parameter vmExtensionName 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.get(resourceGroupName, vmScaleSetName, instanceId, vmExtensionName, this.client.subscriptionId(), expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<VirtualMachineScaleSetVMExtensionInner>>>() {
@Override
public Observable<ServiceResponse<VirtualMachineScaleSetVMExtensionInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<VirtualMachineScaleSetVMExtensionInner> clientResponse = getDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<VirtualMachineScaleSetVMExtensionInner> getDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<VirtualMachineScaleSetVMExtensionInner, CloudException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<VirtualMachineScaleSetVMExtensionInner>() { }.getType())
.registerError(CloudException.class)
.build(response);
}
The operation to get all extensions of an instance in Virtual Machine Scaleset.
Params: - resourceGroupName – The name of the resource group.
- vmScaleSetName – The name of the VM scale set.
- instanceId – The instance ID of the virtual machine.
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 VirtualMachineScaleSetVMExtensionsListResultInner object if successful.
/**
* The operation to get all extensions of an instance in Virtual Machine Scaleset.
*
* @param resourceGroupName The name of the resource group.
* @param vmScaleSetName The name of the VM scale set.
* @param instanceId The instance ID 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 VirtualMachineScaleSetVMExtensionsListResultInner object if successful.
*/
public VirtualMachineScaleSetVMExtensionsListResultInner list(String resourceGroupName, String vmScaleSetName, String instanceId) {
return listWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().body();
}
The operation to get all extensions of an instance in Virtual Machine Scaleset.
Params: - resourceGroupName – The name of the resource group.
- vmScaleSetName – The name of the VM scale set.
- instanceId – The instance ID of the virtual machine.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* The operation to get all extensions of an instance in Virtual Machine Scaleset.
*
* @param resourceGroupName The name of the resource group.
* @param vmScaleSetName The name of the VM scale set.
* @param instanceId The instance ID 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<VirtualMachineScaleSetVMExtensionsListResultInner> listAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback<VirtualMachineScaleSetVMExtensionsListResultInner> serviceCallback) {
return ServiceFuture.fromResponse(listWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback);
}
The operation to get all extensions of an instance in Virtual Machine Scaleset.
Params: - resourceGroupName – The name of the resource group.
- vmScaleSetName – The name of the VM scale set.
- instanceId – The instance ID of the virtual machine.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the VirtualMachineScaleSetVMExtensionsListResultInner object
/**
* The operation to get all extensions of an instance in Virtual Machine Scaleset.
*
* @param resourceGroupName The name of the resource group.
* @param vmScaleSetName The name of the VM scale set.
* @param instanceId The instance ID of the virtual machine.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the VirtualMachineScaleSetVMExtensionsListResultInner object
*/
public Observable<VirtualMachineScaleSetVMExtensionsListResultInner> listAsync(String resourceGroupName, String vmScaleSetName, String instanceId) {
return listWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1<ServiceResponse<VirtualMachineScaleSetVMExtensionsListResultInner>, VirtualMachineScaleSetVMExtensionsListResultInner>() {
@Override
public VirtualMachineScaleSetVMExtensionsListResultInner call(ServiceResponse<VirtualMachineScaleSetVMExtensionsListResultInner> response) {
return response.body();
}
});
}
The operation to get all extensions of an instance in Virtual Machine Scaleset.
Params: - resourceGroupName – The name of the resource group.
- vmScaleSetName – The name of the VM scale set.
- instanceId – The instance ID of the virtual machine.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the VirtualMachineScaleSetVMExtensionsListResultInner object
/**
* The operation to get all extensions of an instance in Virtual Machine Scaleset.
*
* @param resourceGroupName The name of the resource group.
* @param vmScaleSetName The name of the VM scale set.
* @param instanceId The instance ID of the virtual machine.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the VirtualMachineScaleSetVMExtensionsListResultInner object
*/
public Observable<ServiceResponse<VirtualMachineScaleSetVMExtensionsListResultInner>> listWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (vmScaleSetName == null) {
throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.");
}
if (instanceId == null) {
throw new IllegalArgumentException("Parameter instanceId is required and cannot be null.");
}
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
final String apiVersion = "2020-12-01";
final String expand = null;
return service.list(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<VirtualMachineScaleSetVMExtensionsListResultInner>>>() {
@Override
public Observable<ServiceResponse<VirtualMachineScaleSetVMExtensionsListResultInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<VirtualMachineScaleSetVMExtensionsListResultInner> clientResponse = listDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
The operation to get all extensions of an instance in Virtual Machine Scaleset.
Params: - resourceGroupName – The name of the resource group.
- vmScaleSetName – The name of the VM scale set.
- instanceId – The instance ID of the virtual machine.
- expand – The expand expression to apply on the operation.
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 VirtualMachineScaleSetVMExtensionsListResultInner object if successful.
/**
* The operation to get all extensions of an instance in Virtual Machine Scaleset.
*
* @param resourceGroupName The name of the resource group.
* @param vmScaleSetName The name of the VM scale set.
* @param instanceId The instance ID of the virtual machine.
* @param expand The expand expression to apply on the 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 VirtualMachineScaleSetVMExtensionsListResultInner object if successful.
*/
public VirtualMachineScaleSetVMExtensionsListResultInner list(String resourceGroupName, String vmScaleSetName, String instanceId, String expand) {
return listWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId, expand).toBlocking().single().body();
}
The operation to get all extensions of an instance in Virtual Machine Scaleset.
Params: - resourceGroupName – The name of the resource group.
- vmScaleSetName – The name of the VM scale set.
- instanceId – The instance ID of the virtual machine.
- expand – The expand expression to apply on the operation.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* The operation to get all extensions of an instance in Virtual Machine Scaleset.
*
* @param resourceGroupName The name of the resource group.
* @param vmScaleSetName The name of the VM scale set.
* @param instanceId The instance ID of the virtual machine.
* @param expand The expand expression to apply on the 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<VirtualMachineScaleSetVMExtensionsListResultInner> listAsync(String resourceGroupName, String vmScaleSetName, String instanceId, String expand, final ServiceCallback<VirtualMachineScaleSetVMExtensionsListResultInner> serviceCallback) {
return ServiceFuture.fromResponse(listWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId, expand), serviceCallback);
}
The operation to get all extensions of an instance in Virtual Machine Scaleset.
Params: - resourceGroupName – The name of the resource group.
- vmScaleSetName – The name of the VM scale set.
- instanceId – The instance ID of the virtual machine.
- expand – The expand expression to apply on the operation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the VirtualMachineScaleSetVMExtensionsListResultInner object
/**
* The operation to get all extensions of an instance in Virtual Machine Scaleset.
*
* @param resourceGroupName The name of the resource group.
* @param vmScaleSetName The name of the VM scale set.
* @param instanceId The instance ID of the virtual machine.
* @param expand The expand expression to apply on the operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the VirtualMachineScaleSetVMExtensionsListResultInner object
*/
public Observable<VirtualMachineScaleSetVMExtensionsListResultInner> listAsync(String resourceGroupName, String vmScaleSetName, String instanceId, String expand) {
return listWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId, expand).map(new Func1<ServiceResponse<VirtualMachineScaleSetVMExtensionsListResultInner>, VirtualMachineScaleSetVMExtensionsListResultInner>() {
@Override
public VirtualMachineScaleSetVMExtensionsListResultInner call(ServiceResponse<VirtualMachineScaleSetVMExtensionsListResultInner> response) {
return response.body();
}
});
}
The operation to get all extensions of an instance in Virtual Machine Scaleset.
Params: - resourceGroupName – The name of the resource group.
- vmScaleSetName – The name of the VM scale set.
- instanceId – The instance ID of the virtual machine.
- expand – The expand expression to apply on the operation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the VirtualMachineScaleSetVMExtensionsListResultInner object
/**
* The operation to get all extensions of an instance in Virtual Machine Scaleset.
*
* @param resourceGroupName The name of the resource group.
* @param vmScaleSetName The name of the VM scale set.
* @param instanceId The instance ID of the virtual machine.
* @param expand The expand expression to apply on the operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the VirtualMachineScaleSetVMExtensionsListResultInner object
*/
public Observable<ServiceResponse<VirtualMachineScaleSetVMExtensionsListResultInner>> listWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, String instanceId, String expand) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (vmScaleSetName == null) {
throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null.");
}
if (instanceId == null) {
throw new IllegalArgumentException("Parameter instanceId 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.list(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<VirtualMachineScaleSetVMExtensionsListResultInner>>>() {
@Override
public Observable<ServiceResponse<VirtualMachineScaleSetVMExtensionsListResultInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<VirtualMachineScaleSetVMExtensionsListResultInner> clientResponse = listDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<VirtualMachineScaleSetVMExtensionsListResultInner> listDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<VirtualMachineScaleSetVMExtensionsListResultInner, CloudException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<VirtualMachineScaleSetVMExtensionsListResultInner>() { }.getType())
.registerError(CloudException.class)
.build(response);
}
}