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.network.implementation;
import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsGet;
import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsDelete;
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.network.ErrorException;
import com.microsoft.azure.management.network.TagsObject;
import com.microsoft.azure.management.network.VpnPacketCaptureStartParameters;
import com.microsoft.azure.management.network.VpnPacketCaptureStopParameters;
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 java.util.Map;
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 VirtualNetworkGatewayConnections.
/**
* An instance of this class provides access to all the operations defined
* in VirtualNetworkGatewayConnections.
*/
public class VirtualNetworkGatewayConnectionsInner implements InnerSupportsGet<VirtualNetworkGatewayConnectionInner>, InnerSupportsDelete<Void> {
The Retrofit service to perform REST calls. /** The Retrofit service to perform REST calls. */
private VirtualNetworkGatewayConnectionsService service;
The service client containing this operation class. /** The service client containing this operation class. */
private NetworkManagementClientImpl client;
Initializes an instance of VirtualNetworkGatewayConnectionsInner.
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 VirtualNetworkGatewayConnectionsInner.
*
* @param retrofit the Retrofit instance built from a Retrofit Builder.
* @param client the instance of the service client containing this operation class.
*/
public VirtualNetworkGatewayConnectionsInner(Retrofit retrofit, NetworkManagementClientImpl client) {
this.service = retrofit.create(VirtualNetworkGatewayConnectionsService.class);
this.client = client;
}
The interface defining all the services for VirtualNetworkGatewayConnections to be
used by Retrofit to perform actually REST calls.
/**
* The interface defining all the services for VirtualNetworkGatewayConnections to be
* used by Retrofit to perform actually REST calls.
*/
interface VirtualNetworkGatewayConnectionsService {
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.VirtualNetworkGatewayConnections createOrUpdate" })
@PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}")
Observable<Response<ResponseBody>> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayConnectionName") String virtualNetworkGatewayConnectionName, @Path("subscriptionId") String subscriptionId, @Body VirtualNetworkGatewayConnectionInner 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.network.VirtualNetworkGatewayConnections beginCreateOrUpdate" })
@PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}")
Observable<Response<ResponseBody>> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayConnectionName") String virtualNetworkGatewayConnectionName, @Path("subscriptionId") String subscriptionId, @Body VirtualNetworkGatewayConnectionInner 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.network.VirtualNetworkGatewayConnections getByResourceGroup" })
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}")
Observable<Response<ResponseBody>> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayConnectionName") String virtualNetworkGatewayConnectionName, @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.network.VirtualNetworkGatewayConnections delete" })
@HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}", method = "DELETE", hasBody = true)
Observable<Response<ResponseBody>> delete(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayConnectionName") String virtualNetworkGatewayConnectionName, @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.network.VirtualNetworkGatewayConnections beginDelete" })
@HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}", method = "DELETE", hasBody = true)
Observable<Response<ResponseBody>> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayConnectionName") String virtualNetworkGatewayConnectionName, @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.network.VirtualNetworkGatewayConnections updateTags" })
@PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}")
Observable<Response<ResponseBody>> updateTags(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayConnectionName") String virtualNetworkGatewayConnectionName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent);
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.VirtualNetworkGatewayConnections beginUpdateTags" })
@PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}")
Observable<Response<ResponseBody>> beginUpdateTags(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayConnectionName") String virtualNetworkGatewayConnectionName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent);
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.VirtualNetworkGatewayConnections setSharedKey" })
@PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey")
Observable<Response<ResponseBody>> setSharedKey(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayConnectionName") String virtualNetworkGatewayConnectionName, @Path("subscriptionId") String subscriptionId, @Body ConnectionSharedKeyInner 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.network.VirtualNetworkGatewayConnections beginSetSharedKey" })
@PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey")
Observable<Response<ResponseBody>> beginSetSharedKey(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayConnectionName") String virtualNetworkGatewayConnectionName, @Path("subscriptionId") String subscriptionId, @Body ConnectionSharedKeyInner 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.network.VirtualNetworkGatewayConnections getSharedKey" })
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey")
Observable<Response<ResponseBody>> getSharedKey(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayConnectionName") String virtualNetworkGatewayConnectionName, @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.network.VirtualNetworkGatewayConnections listByResourceGroup" })
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections")
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.network.VirtualNetworkGatewayConnections resetSharedKey" })
@POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey/reset")
Observable<Response<ResponseBody>> resetSharedKey(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayConnectionName") String virtualNetworkGatewayConnectionName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body ConnectionResetSharedKeyInner parameters, @Header("User-Agent") String userAgent);
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.VirtualNetworkGatewayConnections beginResetSharedKey" })
@POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey/reset")
Observable<Response<ResponseBody>> beginResetSharedKey(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayConnectionName") String virtualNetworkGatewayConnectionName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body ConnectionResetSharedKeyInner parameters, @Header("User-Agent") String userAgent);
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.VirtualNetworkGatewayConnections startPacketCapture" })
@POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/startPacketCapture")
Observable<Response<ResponseBody>> startPacketCapture(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayConnectionName") String virtualNetworkGatewayConnectionName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VpnPacketCaptureStartParameters parameters, @Header("User-Agent") String userAgent);
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.VirtualNetworkGatewayConnections beginStartPacketCapture" })
@POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/startPacketCapture")
Observable<Response<ResponseBody>> beginStartPacketCapture(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayConnectionName") String virtualNetworkGatewayConnectionName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VpnPacketCaptureStartParameters parameters, @Header("User-Agent") String userAgent);
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.VirtualNetworkGatewayConnections stopPacketCapture" })
@POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/stopPacketCapture")
Observable<Response<ResponseBody>> stopPacketCapture(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayConnectionName") String virtualNetworkGatewayConnectionName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VpnPacketCaptureStopParameters parameters, @Header("User-Agent") String userAgent);
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.VirtualNetworkGatewayConnections beginStopPacketCapture" })
@POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/stopPacketCapture")
Observable<Response<ResponseBody>> beginStopPacketCapture(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayConnectionName") String virtualNetworkGatewayConnectionName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VpnPacketCaptureStopParameters parameters, @Header("User-Agent") String userAgent);
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.VirtualNetworkGatewayConnections listByResourceGroupNext" })
@GET
Observable<Response<ResponseBody>> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
}
Creates or updates a virtual network gateway connection in the specified resource group.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway connection.
- parameters – Parameters supplied to the create or update virtual network gateway connection 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 VirtualNetworkGatewayConnectionInner object if successful.
/**
* Creates or updates a virtual network gateway connection in the specified resource group.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection.
* @param parameters Parameters supplied to the create or update virtual network gateway connection 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 VirtualNetworkGatewayConnectionInner object if successful.
*/
public VirtualNetworkGatewayConnectionInner createOrUpdate(String resourceGroupName, String virtualNetworkGatewayConnectionName, VirtualNetworkGatewayConnectionInner parameters) {
return createOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, parameters).toBlocking().last().body();
}
Creates or updates a virtual network gateway connection in the specified resource group.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway connection.
- parameters – Parameters supplied to the create or update virtual network gateway connection operation.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Creates or updates a virtual network gateway connection in the specified resource group.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection.
* @param parameters Parameters supplied to the create or update virtual network gateway connection 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<VirtualNetworkGatewayConnectionInner> createOrUpdateAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, VirtualNetworkGatewayConnectionInner parameters, final ServiceCallback<VirtualNetworkGatewayConnectionInner> serviceCallback) {
return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, parameters), serviceCallback);
}
Creates or updates a virtual network gateway connection in the specified resource group.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway connection.
- parameters – Parameters supplied to the create or update virtual network gateway connection operation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable for the request
/**
* Creates or updates a virtual network gateway connection in the specified resource group.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection.
* @param parameters Parameters supplied to the create or update virtual network gateway connection operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
public Observable<VirtualNetworkGatewayConnectionInner> createOrUpdateAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, VirtualNetworkGatewayConnectionInner parameters) {
return createOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, parameters).map(new Func1<ServiceResponse<VirtualNetworkGatewayConnectionInner>, VirtualNetworkGatewayConnectionInner>() {
@Override
public VirtualNetworkGatewayConnectionInner call(ServiceResponse<VirtualNetworkGatewayConnectionInner> response) {
return response.body();
}
});
}
Creates or updates a virtual network gateway connection in the specified resource group.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway connection.
- parameters – Parameters supplied to the create or update virtual network gateway connection operation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable for the request
/**
* Creates or updates a virtual network gateway connection in the specified resource group.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection.
* @param parameters Parameters supplied to the create or update virtual network gateway connection operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
public Observable<ServiceResponse<VirtualNetworkGatewayConnectionInner>> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, VirtualNetworkGatewayConnectionInner parameters) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (virtualNetworkGatewayConnectionName == null) {
throw new IllegalArgumentException("Parameter virtualNetworkGatewayConnectionName 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 = "2019-11-01";
Observable<Response<ResponseBody>> observable = service.createOrUpdate(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent());
return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken<VirtualNetworkGatewayConnectionInner>() { }.getType());
}
Creates or updates a virtual network gateway connection in the specified resource group.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway connection.
- parameters – Parameters supplied to the create or update virtual network gateway connection 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 VirtualNetworkGatewayConnectionInner object if successful.
/**
* Creates or updates a virtual network gateway connection in the specified resource group.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection.
* @param parameters Parameters supplied to the create or update virtual network gateway connection 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 VirtualNetworkGatewayConnectionInner object if successful.
*/
public VirtualNetworkGatewayConnectionInner beginCreateOrUpdate(String resourceGroupName, String virtualNetworkGatewayConnectionName, VirtualNetworkGatewayConnectionInner parameters) {
return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, parameters).toBlocking().single().body();
}
Creates or updates a virtual network gateway connection in the specified resource group.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway connection.
- parameters – Parameters supplied to the create or update virtual network gateway connection operation.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Creates or updates a virtual network gateway connection in the specified resource group.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection.
* @param parameters Parameters supplied to the create or update virtual network gateway connection 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<VirtualNetworkGatewayConnectionInner> beginCreateOrUpdateAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, VirtualNetworkGatewayConnectionInner parameters, final ServiceCallback<VirtualNetworkGatewayConnectionInner> serviceCallback) {
return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, parameters), serviceCallback);
}
Creates or updates a virtual network gateway connection in the specified resource group.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway connection.
- parameters – Parameters supplied to the create or update virtual network gateway connection operation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the VirtualNetworkGatewayConnectionInner object
/**
* Creates or updates a virtual network gateway connection in the specified resource group.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection.
* @param parameters Parameters supplied to the create or update virtual network gateway connection operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the VirtualNetworkGatewayConnectionInner object
*/
public Observable<VirtualNetworkGatewayConnectionInner> beginCreateOrUpdateAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, VirtualNetworkGatewayConnectionInner parameters) {
return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, parameters).map(new Func1<ServiceResponse<VirtualNetworkGatewayConnectionInner>, VirtualNetworkGatewayConnectionInner>() {
@Override
public VirtualNetworkGatewayConnectionInner call(ServiceResponse<VirtualNetworkGatewayConnectionInner> response) {
return response.body();
}
});
}
Creates or updates a virtual network gateway connection in the specified resource group.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway connection.
- parameters – Parameters supplied to the create or update virtual network gateway connection operation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the VirtualNetworkGatewayConnectionInner object
/**
* Creates or updates a virtual network gateway connection in the specified resource group.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection.
* @param parameters Parameters supplied to the create or update virtual network gateway connection operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the VirtualNetworkGatewayConnectionInner object
*/
public Observable<ServiceResponse<VirtualNetworkGatewayConnectionInner>> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, VirtualNetworkGatewayConnectionInner parameters) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (virtualNetworkGatewayConnectionName == null) {
throw new IllegalArgumentException("Parameter virtualNetworkGatewayConnectionName 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 = "2019-11-01";
return service.beginCreateOrUpdate(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<VirtualNetworkGatewayConnectionInner>>>() {
@Override
public Observable<ServiceResponse<VirtualNetworkGatewayConnectionInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<VirtualNetworkGatewayConnectionInner> clientResponse = beginCreateOrUpdateDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<VirtualNetworkGatewayConnectionInner> beginCreateOrUpdateDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<VirtualNetworkGatewayConnectionInner, CloudException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<VirtualNetworkGatewayConnectionInner>() { }.getType())
.register(201, new TypeToken<VirtualNetworkGatewayConnectionInner>() { }.getType())
.registerError(CloudException.class)
.build(response);
}
Gets the specified virtual network gateway connection by resource group.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway connection.
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 VirtualNetworkGatewayConnectionInner object if successful.
/**
* Gets the specified virtual network gateway connection by resource group.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection.
* @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 VirtualNetworkGatewayConnectionInner object if successful.
*/
public VirtualNetworkGatewayConnectionInner getByResourceGroup(String resourceGroupName, String virtualNetworkGatewayConnectionName) {
return getByResourceGroupWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).toBlocking().single().body();
}
Gets the specified virtual network gateway connection by resource group.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway connection.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Gets the specified virtual network gateway connection by resource group.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection.
* @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<VirtualNetworkGatewayConnectionInner> getByResourceGroupAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, final ServiceCallback<VirtualNetworkGatewayConnectionInner> serviceCallback) {
return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName), serviceCallback);
}
Gets the specified virtual network gateway connection by resource group.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway connection.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the VirtualNetworkGatewayConnectionInner object
/**
* Gets the specified virtual network gateway connection by resource group.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the VirtualNetworkGatewayConnectionInner object
*/
public Observable<VirtualNetworkGatewayConnectionInner> getByResourceGroupAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) {
return getByResourceGroupWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).map(new Func1<ServiceResponse<VirtualNetworkGatewayConnectionInner>, VirtualNetworkGatewayConnectionInner>() {
@Override
public VirtualNetworkGatewayConnectionInner call(ServiceResponse<VirtualNetworkGatewayConnectionInner> response) {
return response.body();
}
});
}
Gets the specified virtual network gateway connection by resource group.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway connection.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the VirtualNetworkGatewayConnectionInner object
/**
* Gets the specified virtual network gateway connection by resource group.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the VirtualNetworkGatewayConnectionInner object
*/
public Observable<ServiceResponse<VirtualNetworkGatewayConnectionInner>> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (virtualNetworkGatewayConnectionName == null) {
throw new IllegalArgumentException("Parameter virtualNetworkGatewayConnectionName 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 = "2019-11-01";
return service.getByResourceGroup(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<VirtualNetworkGatewayConnectionInner>>>() {
@Override
public Observable<ServiceResponse<VirtualNetworkGatewayConnectionInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<VirtualNetworkGatewayConnectionInner> clientResponse = getByResourceGroupDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<VirtualNetworkGatewayConnectionInner> getByResourceGroupDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<VirtualNetworkGatewayConnectionInner, CloudException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<VirtualNetworkGatewayConnectionInner>() { }.getType())
.registerError(CloudException.class)
.build(response);
}
Deletes the specified virtual network Gateway connection.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway connection.
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
/**
* Deletes the specified virtual network Gateway connection.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection.
* @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 virtualNetworkGatewayConnectionName) {
deleteWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).toBlocking().last().body();
}
Deletes the specified virtual network Gateway connection.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway connection.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Deletes the specified virtual network Gateway connection.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection.
* @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 virtualNetworkGatewayConnectionName, final ServiceCallback<Void> serviceCallback) {
return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName), serviceCallback);
}
Deletes the specified virtual network Gateway connection.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway connection.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable for the request
/**
* Deletes the specified virtual network Gateway connection.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
public Observable<Void> deleteAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) {
return deleteWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).map(new Func1<ServiceResponse<Void>, Void>() {
@Override
public Void call(ServiceResponse<Void> response) {
return response.body();
}
});
}
Deletes the specified virtual network Gateway connection.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway connection.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable for the request
/**
* Deletes the specified virtual network Gateway connection.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
public Observable<ServiceResponse<Void>> deleteWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (virtualNetworkGatewayConnectionName == null) {
throw new IllegalArgumentException("Parameter virtualNetworkGatewayConnectionName 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 = "2019-11-01";
Observable<Response<ResponseBody>> observable = service.delete(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent());
return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<Void>() { }.getType());
}
Deletes the specified virtual network Gateway connection.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway connection.
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
/**
* Deletes the specified virtual network Gateway connection.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection.
* @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 virtualNetworkGatewayConnectionName) {
beginDeleteWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).toBlocking().single().body();
}
Deletes the specified virtual network Gateway connection.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway connection.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Deletes the specified virtual network Gateway connection.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection.
* @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 virtualNetworkGatewayConnectionName, final ServiceCallback<Void> serviceCallback) {
return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName), serviceCallback);
}
Deletes the specified virtual network Gateway connection.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway connection.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceResponse
object if successful.
/**
* Deletes the specified virtual network Gateway connection.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceResponse} object if successful.
*/
public Observable<Void> beginDeleteAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) {
return beginDeleteWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).map(new Func1<ServiceResponse<Void>, Void>() {
@Override
public Void call(ServiceResponse<Void> response) {
return response.body();
}
});
}
Deletes the specified virtual network Gateway connection.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway connection.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceResponse
object if successful.
/**
* Deletes the specified virtual network Gateway connection.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceResponse} object if successful.
*/
public Observable<ServiceResponse<Void>> beginDeleteWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (virtualNetworkGatewayConnectionName == null) {
throw new IllegalArgumentException("Parameter virtualNetworkGatewayConnectionName 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 = "2019-11-01";
return service.beginDelete(resourceGroupName, virtualNetworkGatewayConnectionName, 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);
}
Updates a virtual network gateway connection tags.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway connection.
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 VirtualNetworkGatewayConnectionInner object if successful.
/**
* Updates a virtual network gateway connection tags.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection.
* @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 VirtualNetworkGatewayConnectionInner object if successful.
*/
public VirtualNetworkGatewayConnectionInner updateTags(String resourceGroupName, String virtualNetworkGatewayConnectionName) {
return updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).toBlocking().last().body();
}
Updates a virtual network gateway connection tags.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway connection.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Updates a virtual network gateway connection tags.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection.
* @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<VirtualNetworkGatewayConnectionInner> updateTagsAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, final ServiceCallback<VirtualNetworkGatewayConnectionInner> serviceCallback) {
return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName), serviceCallback);
}
Updates a virtual network gateway connection tags.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway connection.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable for the request
/**
* Updates a virtual network gateway connection tags.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
public Observable<VirtualNetworkGatewayConnectionInner> updateTagsAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) {
return updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).map(new Func1<ServiceResponse<VirtualNetworkGatewayConnectionInner>, VirtualNetworkGatewayConnectionInner>() {
@Override
public VirtualNetworkGatewayConnectionInner call(ServiceResponse<VirtualNetworkGatewayConnectionInner> response) {
return response.body();
}
});
}
Updates a virtual network gateway connection tags.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway connection.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable for the request
/**
* Updates a virtual network gateway connection tags.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
public Observable<ServiceResponse<VirtualNetworkGatewayConnectionInner>> updateTagsWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (virtualNetworkGatewayConnectionName == null) {
throw new IllegalArgumentException("Parameter virtualNetworkGatewayConnectionName 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 = "2019-11-01";
final Map<String, String> tags = null;
TagsObject parameters = new TagsObject();
parameters.withTags(null);
Observable<Response<ResponseBody>> observable = service.updateTags(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent());
return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken<VirtualNetworkGatewayConnectionInner>() { }.getType());
}
Updates a virtual network gateway connection tags.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway connection.
- tags – Resource tags.
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 VirtualNetworkGatewayConnectionInner object if successful.
/**
* Updates a virtual network gateway connection tags.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection.
* @param tags Resource tags.
* @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 VirtualNetworkGatewayConnectionInner object if successful.
*/
public VirtualNetworkGatewayConnectionInner updateTags(String resourceGroupName, String virtualNetworkGatewayConnectionName, Map<String, String> tags) {
return updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, tags).toBlocking().last().body();
}
Updates a virtual network gateway connection tags.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway connection.
- tags – Resource tags.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Updates a virtual network gateway connection tags.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection.
* @param tags Resource tags.
* @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<VirtualNetworkGatewayConnectionInner> updateTagsAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, Map<String, String> tags, final ServiceCallback<VirtualNetworkGatewayConnectionInner> serviceCallback) {
return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, tags), serviceCallback);
}
Updates a virtual network gateway connection tags.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway connection.
- tags – Resource tags.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable for the request
/**
* Updates a virtual network gateway connection tags.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection.
* @param tags Resource tags.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
public Observable<VirtualNetworkGatewayConnectionInner> updateTagsAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, Map<String, String> tags) {
return updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, tags).map(new Func1<ServiceResponse<VirtualNetworkGatewayConnectionInner>, VirtualNetworkGatewayConnectionInner>() {
@Override
public VirtualNetworkGatewayConnectionInner call(ServiceResponse<VirtualNetworkGatewayConnectionInner> response) {
return response.body();
}
});
}
Updates a virtual network gateway connection tags.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway connection.
- tags – Resource tags.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable for the request
/**
* Updates a virtual network gateway connection tags.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection.
* @param tags Resource tags.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
public Observable<ServiceResponse<VirtualNetworkGatewayConnectionInner>> updateTagsWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, Map<String, String> tags) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (virtualNetworkGatewayConnectionName == null) {
throw new IllegalArgumentException("Parameter virtualNetworkGatewayConnectionName is required and cannot be null.");
}
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
Validator.validate(tags);
final String apiVersion = "2019-11-01";
TagsObject parameters = new TagsObject();
parameters.withTags(tags);
Observable<Response<ResponseBody>> observable = service.updateTags(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent());
return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken<VirtualNetworkGatewayConnectionInner>() { }.getType());
}
Updates a virtual network gateway connection tags.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway connection.
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 VirtualNetworkGatewayConnectionInner object if successful.
/**
* Updates a virtual network gateway connection tags.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection.
* @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 VirtualNetworkGatewayConnectionInner object if successful.
*/
public VirtualNetworkGatewayConnectionInner beginUpdateTags(String resourceGroupName, String virtualNetworkGatewayConnectionName) {
return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).toBlocking().single().body();
}
Updates a virtual network gateway connection tags.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway connection.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Updates a virtual network gateway connection tags.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection.
* @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<VirtualNetworkGatewayConnectionInner> beginUpdateTagsAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, final ServiceCallback<VirtualNetworkGatewayConnectionInner> serviceCallback) {
return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName), serviceCallback);
}
Updates a virtual network gateway connection tags.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway connection.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the VirtualNetworkGatewayConnectionInner object
/**
* Updates a virtual network gateway connection tags.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the VirtualNetworkGatewayConnectionInner object
*/
public Observable<VirtualNetworkGatewayConnectionInner> beginUpdateTagsAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) {
return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).map(new Func1<ServiceResponse<VirtualNetworkGatewayConnectionInner>, VirtualNetworkGatewayConnectionInner>() {
@Override
public VirtualNetworkGatewayConnectionInner call(ServiceResponse<VirtualNetworkGatewayConnectionInner> response) {
return response.body();
}
});
}
Updates a virtual network gateway connection tags.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway connection.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the VirtualNetworkGatewayConnectionInner object
/**
* Updates a virtual network gateway connection tags.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the VirtualNetworkGatewayConnectionInner object
*/
public Observable<ServiceResponse<VirtualNetworkGatewayConnectionInner>> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (virtualNetworkGatewayConnectionName == null) {
throw new IllegalArgumentException("Parameter virtualNetworkGatewayConnectionName 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 = "2019-11-01";
final Map<String, String> tags = null;
TagsObject parameters = new TagsObject();
parameters.withTags(null);
return service.beginUpdateTags(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<VirtualNetworkGatewayConnectionInner>>>() {
@Override
public Observable<ServiceResponse<VirtualNetworkGatewayConnectionInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<VirtualNetworkGatewayConnectionInner> clientResponse = beginUpdateTagsDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
Updates a virtual network gateway connection tags.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway connection.
- tags – Resource tags.
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 VirtualNetworkGatewayConnectionInner object if successful.
/**
* Updates a virtual network gateway connection tags.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection.
* @param tags Resource tags.
* @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 VirtualNetworkGatewayConnectionInner object if successful.
*/
public VirtualNetworkGatewayConnectionInner beginUpdateTags(String resourceGroupName, String virtualNetworkGatewayConnectionName, Map<String, String> tags) {
return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, tags).toBlocking().single().body();
}
Updates a virtual network gateway connection tags.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway connection.
- tags – Resource tags.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Updates a virtual network gateway connection tags.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection.
* @param tags Resource tags.
* @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<VirtualNetworkGatewayConnectionInner> beginUpdateTagsAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, Map<String, String> tags, final ServiceCallback<VirtualNetworkGatewayConnectionInner> serviceCallback) {
return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, tags), serviceCallback);
}
Updates a virtual network gateway connection tags.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway connection.
- tags – Resource tags.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the VirtualNetworkGatewayConnectionInner object
/**
* Updates a virtual network gateway connection tags.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection.
* @param tags Resource tags.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the VirtualNetworkGatewayConnectionInner object
*/
public Observable<VirtualNetworkGatewayConnectionInner> beginUpdateTagsAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, Map<String, String> tags) {
return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, tags).map(new Func1<ServiceResponse<VirtualNetworkGatewayConnectionInner>, VirtualNetworkGatewayConnectionInner>() {
@Override
public VirtualNetworkGatewayConnectionInner call(ServiceResponse<VirtualNetworkGatewayConnectionInner> response) {
return response.body();
}
});
}
Updates a virtual network gateway connection tags.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway connection.
- tags – Resource tags.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the VirtualNetworkGatewayConnectionInner object
/**
* Updates a virtual network gateway connection tags.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection.
* @param tags Resource tags.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the VirtualNetworkGatewayConnectionInner object
*/
public Observable<ServiceResponse<VirtualNetworkGatewayConnectionInner>> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, Map<String, String> tags) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (virtualNetworkGatewayConnectionName == null) {
throw new IllegalArgumentException("Parameter virtualNetworkGatewayConnectionName is required and cannot be null.");
}
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
Validator.validate(tags);
final String apiVersion = "2019-11-01";
TagsObject parameters = new TagsObject();
parameters.withTags(tags);
return service.beginUpdateTags(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<VirtualNetworkGatewayConnectionInner>>>() {
@Override
public Observable<ServiceResponse<VirtualNetworkGatewayConnectionInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<VirtualNetworkGatewayConnectionInner> clientResponse = beginUpdateTagsDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<VirtualNetworkGatewayConnectionInner> beginUpdateTagsDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<VirtualNetworkGatewayConnectionInner, CloudException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<VirtualNetworkGatewayConnectionInner>() { }.getType())
.register(202, new TypeToken<Void>() { }.getType())
.registerError(CloudException.class)
.build(response);
}
The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The virtual network gateway connection name.
- parameters – Parameters supplied to the Begin Set Virtual Network Gateway connection Shared key operation throughNetwork resource provider.
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 ConnectionSharedKeyInner object if successful.
/**
* The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The virtual network gateway connection name.
* @param parameters Parameters supplied to the Begin Set Virtual Network Gateway connection Shared key operation throughNetwork resource provider.
* @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 ConnectionSharedKeyInner object if successful.
*/
public ConnectionSharedKeyInner setSharedKey(String resourceGroupName, String virtualNetworkGatewayConnectionName, ConnectionSharedKeyInner parameters) {
return setSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, parameters).toBlocking().last().body();
}
The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The virtual network gateway connection name.
- parameters – Parameters supplied to the Begin Set Virtual Network Gateway connection Shared key operation throughNetwork resource provider.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The virtual network gateway connection name.
* @param parameters Parameters supplied to the Begin Set Virtual Network Gateway connection Shared key operation throughNetwork resource provider.
* @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<ConnectionSharedKeyInner> setSharedKeyAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, ConnectionSharedKeyInner parameters, final ServiceCallback<ConnectionSharedKeyInner> serviceCallback) {
return ServiceFuture.fromResponse(setSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, parameters), serviceCallback);
}
The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The virtual network gateway connection name.
- parameters – Parameters supplied to the Begin Set Virtual Network Gateway connection Shared key operation throughNetwork resource provider.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable for the request
/**
* The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The virtual network gateway connection name.
* @param parameters Parameters supplied to the Begin Set Virtual Network Gateway connection Shared key operation throughNetwork resource provider.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
public Observable<ConnectionSharedKeyInner> setSharedKeyAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, ConnectionSharedKeyInner parameters) {
return setSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, parameters).map(new Func1<ServiceResponse<ConnectionSharedKeyInner>, ConnectionSharedKeyInner>() {
@Override
public ConnectionSharedKeyInner call(ServiceResponse<ConnectionSharedKeyInner> response) {
return response.body();
}
});
}
The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The virtual network gateway connection name.
- parameters – Parameters supplied to the Begin Set Virtual Network Gateway connection Shared key operation throughNetwork resource provider.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable for the request
/**
* The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The virtual network gateway connection name.
* @param parameters Parameters supplied to the Begin Set Virtual Network Gateway connection Shared key operation throughNetwork resource provider.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
public Observable<ServiceResponse<ConnectionSharedKeyInner>> setSharedKeyWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, ConnectionSharedKeyInner parameters) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (virtualNetworkGatewayConnectionName == null) {
throw new IllegalArgumentException("Parameter virtualNetworkGatewayConnectionName 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 = "2019-11-01";
Observable<Response<ResponseBody>> observable = service.setSharedKey(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent());
return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken<ConnectionSharedKeyInner>() { }.getType());
}
The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The virtual network gateway connection name.
- parameters – Parameters supplied to the Begin Set Virtual Network Gateway connection Shared key operation throughNetwork resource provider.
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 ConnectionSharedKeyInner object if successful.
/**
* The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The virtual network gateway connection name.
* @param parameters Parameters supplied to the Begin Set Virtual Network Gateway connection Shared key operation throughNetwork resource provider.
* @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 ConnectionSharedKeyInner object if successful.
*/
public ConnectionSharedKeyInner beginSetSharedKey(String resourceGroupName, String virtualNetworkGatewayConnectionName, ConnectionSharedKeyInner parameters) {
return beginSetSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, parameters).toBlocking().single().body();
}
The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The virtual network gateway connection name.
- parameters – Parameters supplied to the Begin Set Virtual Network Gateway connection Shared key operation throughNetwork resource provider.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The virtual network gateway connection name.
* @param parameters Parameters supplied to the Begin Set Virtual Network Gateway connection Shared key operation throughNetwork resource provider.
* @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<ConnectionSharedKeyInner> beginSetSharedKeyAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, ConnectionSharedKeyInner parameters, final ServiceCallback<ConnectionSharedKeyInner> serviceCallback) {
return ServiceFuture.fromResponse(beginSetSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, parameters), serviceCallback);
}
The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The virtual network gateway connection name.
- parameters – Parameters supplied to the Begin Set Virtual Network Gateway connection Shared key operation throughNetwork resource provider.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the ConnectionSharedKeyInner object
/**
* The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The virtual network gateway connection name.
* @param parameters Parameters supplied to the Begin Set Virtual Network Gateway connection Shared key operation throughNetwork resource provider.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the ConnectionSharedKeyInner object
*/
public Observable<ConnectionSharedKeyInner> beginSetSharedKeyAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, ConnectionSharedKeyInner parameters) {
return beginSetSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, parameters).map(new Func1<ServiceResponse<ConnectionSharedKeyInner>, ConnectionSharedKeyInner>() {
@Override
public ConnectionSharedKeyInner call(ServiceResponse<ConnectionSharedKeyInner> response) {
return response.body();
}
});
}
The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The virtual network gateway connection name.
- parameters – Parameters supplied to the Begin Set Virtual Network Gateway connection Shared key operation throughNetwork resource provider.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the ConnectionSharedKeyInner object
/**
* The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The virtual network gateway connection name.
* @param parameters Parameters supplied to the Begin Set Virtual Network Gateway connection Shared key operation throughNetwork resource provider.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the ConnectionSharedKeyInner object
*/
public Observable<ServiceResponse<ConnectionSharedKeyInner>> beginSetSharedKeyWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, ConnectionSharedKeyInner parameters) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (virtualNetworkGatewayConnectionName == null) {
throw new IllegalArgumentException("Parameter virtualNetworkGatewayConnectionName 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 = "2019-11-01";
return service.beginSetSharedKey(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<ConnectionSharedKeyInner>>>() {
@Override
public Observable<ServiceResponse<ConnectionSharedKeyInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<ConnectionSharedKeyInner> clientResponse = beginSetSharedKeyDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<ConnectionSharedKeyInner> beginSetSharedKeyDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<ConnectionSharedKeyInner, CloudException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<ConnectionSharedKeyInner>() { }.getType())
.register(201, new TypeToken<ConnectionSharedKeyInner>() { }.getType())
.registerError(CloudException.class)
.build(response);
}
The Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the specified virtual network gateway connection shared key through Network resource provider.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The virtual network gateway connection shared key name.
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 ConnectionSharedKeyInner object if successful.
/**
* The Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the specified virtual network gateway connection shared key through Network resource provider.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The virtual network gateway connection shared key name.
* @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 ConnectionSharedKeyInner object if successful.
*/
public ConnectionSharedKeyInner getSharedKey(String resourceGroupName, String virtualNetworkGatewayConnectionName) {
return getSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).toBlocking().single().body();
}
The Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the specified virtual network gateway connection shared key through Network resource provider.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The virtual network gateway connection shared key name.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* The Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the specified virtual network gateway connection shared key through Network resource provider.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The virtual network gateway connection shared key name.
* @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<ConnectionSharedKeyInner> getSharedKeyAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, final ServiceCallback<ConnectionSharedKeyInner> serviceCallback) {
return ServiceFuture.fromResponse(getSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName), serviceCallback);
}
The Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the specified virtual network gateway connection shared key through Network resource provider.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The virtual network gateway connection shared key name.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the ConnectionSharedKeyInner object
/**
* The Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the specified virtual network gateway connection shared key through Network resource provider.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The virtual network gateway connection shared key name.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the ConnectionSharedKeyInner object
*/
public Observable<ConnectionSharedKeyInner> getSharedKeyAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) {
return getSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).map(new Func1<ServiceResponse<ConnectionSharedKeyInner>, ConnectionSharedKeyInner>() {
@Override
public ConnectionSharedKeyInner call(ServiceResponse<ConnectionSharedKeyInner> response) {
return response.body();
}
});
}
The Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the specified virtual network gateway connection shared key through Network resource provider.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The virtual network gateway connection shared key name.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the ConnectionSharedKeyInner object
/**
* The Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the specified virtual network gateway connection shared key through Network resource provider.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The virtual network gateway connection shared key name.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the ConnectionSharedKeyInner object
*/
public Observable<ServiceResponse<ConnectionSharedKeyInner>> getSharedKeyWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (virtualNetworkGatewayConnectionName == null) {
throw new IllegalArgumentException("Parameter virtualNetworkGatewayConnectionName 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 = "2019-11-01";
return service.getSharedKey(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<ConnectionSharedKeyInner>>>() {
@Override
public Observable<ServiceResponse<ConnectionSharedKeyInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<ConnectionSharedKeyInner> clientResponse = getSharedKeyDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<ConnectionSharedKeyInner> getSharedKeyDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<ConnectionSharedKeyInner, CloudException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<ConnectionSharedKeyInner>() { }.getType())
.registerError(CloudException.class)
.build(response);
}
The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections created.
Params: - resourceGroupName – The name of the resource group.
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<VirtualNetworkGatewayConnectionInner> object if successful.
/**
* The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections created.
*
* @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<VirtualNetworkGatewayConnectionInner> object if successful.
*/
public PagedList<VirtualNetworkGatewayConnectionInner> listByResourceGroup(final String resourceGroupName) {
ServiceResponse<Page<VirtualNetworkGatewayConnectionInner>> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single();
return new PagedList<VirtualNetworkGatewayConnectionInner>(response.body()) {
@Override
public Page<VirtualNetworkGatewayConnectionInner> nextPage(String nextPageLink) {
return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body();
}
};
}
The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections created.
Params: - resourceGroupName – The name of the resource group.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections created.
*
* @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<VirtualNetworkGatewayConnectionInner>> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback<VirtualNetworkGatewayConnectionInner> serviceCallback) {
return AzureServiceFuture.fromPageResponse(
listByResourceGroupSinglePageAsync(resourceGroupName),
new Func1<String, Observable<ServiceResponse<Page<VirtualNetworkGatewayConnectionInner>>>>() {
@Override
public Observable<ServiceResponse<Page<VirtualNetworkGatewayConnectionInner>>> call(String nextPageLink) {
return listByResourceGroupNextSinglePageAsync(nextPageLink);
}
},
serviceCallback);
}
The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections created.
Params: - resourceGroupName – The name of the resource group.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the PagedList<VirtualNetworkGatewayConnectionInner> object
/**
* The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections created.
*
* @param resourceGroupName The name of the resource group.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the PagedList<VirtualNetworkGatewayConnectionInner> object
*/
public Observable<Page<VirtualNetworkGatewayConnectionInner>> listByResourceGroupAsync(final String resourceGroupName) {
return listByResourceGroupWithServiceResponseAsync(resourceGroupName)
.map(new Func1<ServiceResponse<Page<VirtualNetworkGatewayConnectionInner>>, Page<VirtualNetworkGatewayConnectionInner>>() {
@Override
public Page<VirtualNetworkGatewayConnectionInner> call(ServiceResponse<Page<VirtualNetworkGatewayConnectionInner>> response) {
return response.body();
}
});
}
The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections created.
Params: - resourceGroupName – The name of the resource group.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the PagedList<VirtualNetworkGatewayConnectionInner> object
/**
* The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections created.
*
* @param resourceGroupName The name of the resource group.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the PagedList<VirtualNetworkGatewayConnectionInner> object
*/
public Observable<ServiceResponse<Page<VirtualNetworkGatewayConnectionInner>>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) {
return listByResourceGroupSinglePageAsync(resourceGroupName)
.concatMap(new Func1<ServiceResponse<Page<VirtualNetworkGatewayConnectionInner>>, Observable<ServiceResponse<Page<VirtualNetworkGatewayConnectionInner>>>>() {
@Override
public Observable<ServiceResponse<Page<VirtualNetworkGatewayConnectionInner>>> call(ServiceResponse<Page<VirtualNetworkGatewayConnectionInner>> page) {
String nextPageLink = page.body().nextPageLink();
if (nextPageLink == null) {
return Observable.just(page);
}
return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink));
}
});
}
The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections created.
ServiceResponse> * @param resourceGroupName The name of the resource group.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the PagedList<VirtualNetworkGatewayConnectionInner> object wrapped in ServiceResponse
if successful.
/**
* The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections created.
*
ServiceResponse<PageImpl<VirtualNetworkGatewayConnectionInner>> * @param resourceGroupName The name of the resource group.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the PagedList<VirtualNetworkGatewayConnectionInner> object wrapped in {@link ServiceResponse} if successful.
*/
public Observable<ServiceResponse<Page<VirtualNetworkGatewayConnectionInner>>> 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 = "2019-11-01";
return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<VirtualNetworkGatewayConnectionInner>>>>() {
@Override
public Observable<ServiceResponse<Page<VirtualNetworkGatewayConnectionInner>>> call(Response<ResponseBody> response) {
try {
ServiceResponse<PageImpl<VirtualNetworkGatewayConnectionInner>> result = listByResourceGroupDelegate(response);
return Observable.just(new ServiceResponse<Page<VirtualNetworkGatewayConnectionInner>>(result.body(), result.response()));
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<PageImpl<VirtualNetworkGatewayConnectionInner>> listByResourceGroupDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<PageImpl<VirtualNetworkGatewayConnectionInner>, CloudException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<PageImpl<VirtualNetworkGatewayConnectionInner>>() { }.getType())
.registerError(CloudException.class)
.build(response);
}
The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The virtual network gateway connection reset shared key Name.
- keyLength – The virtual network connection reset shared key length, should between 1 and 128.
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 ConnectionResetSharedKeyInner object if successful.
/**
* The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The virtual network gateway connection reset shared key Name.
* @param keyLength The virtual network connection reset shared key length, should between 1 and 128.
* @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 ConnectionResetSharedKeyInner object if successful.
*/
public ConnectionResetSharedKeyInner resetSharedKey(String resourceGroupName, String virtualNetworkGatewayConnectionName, int keyLength) {
return resetSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, keyLength).toBlocking().last().body();
}
The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The virtual network gateway connection reset shared key Name.
- keyLength – The virtual network connection reset shared key length, should between 1 and 128.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The virtual network gateway connection reset shared key Name.
* @param keyLength The virtual network connection reset shared key length, should between 1 and 128.
* @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<ConnectionResetSharedKeyInner> resetSharedKeyAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, int keyLength, final ServiceCallback<ConnectionResetSharedKeyInner> serviceCallback) {
return ServiceFuture.fromResponse(resetSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, keyLength), serviceCallback);
}
The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The virtual network gateway connection reset shared key Name.
- keyLength – The virtual network connection reset shared key length, should between 1 and 128.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable for the request
/**
* The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The virtual network gateway connection reset shared key Name.
* @param keyLength The virtual network connection reset shared key length, should between 1 and 128.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
public Observable<ConnectionResetSharedKeyInner> resetSharedKeyAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, int keyLength) {
return resetSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, keyLength).map(new Func1<ServiceResponse<ConnectionResetSharedKeyInner>, ConnectionResetSharedKeyInner>() {
@Override
public ConnectionResetSharedKeyInner call(ServiceResponse<ConnectionResetSharedKeyInner> response) {
return response.body();
}
});
}
The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The virtual network gateway connection reset shared key Name.
- keyLength – The virtual network connection reset shared key length, should between 1 and 128.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable for the request
/**
* The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The virtual network gateway connection reset shared key Name.
* @param keyLength The virtual network connection reset shared key length, should between 1 and 128.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
public Observable<ServiceResponse<ConnectionResetSharedKeyInner>> resetSharedKeyWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, int keyLength) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (virtualNetworkGatewayConnectionName == null) {
throw new IllegalArgumentException("Parameter virtualNetworkGatewayConnectionName 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 = "2019-11-01";
ConnectionResetSharedKeyInner parameters = new ConnectionResetSharedKeyInner();
parameters.withKeyLength(keyLength);
Observable<Response<ResponseBody>> observable = service.resetSharedKey(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent());
return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken<ConnectionResetSharedKeyInner>() { }.getType());
}
The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The virtual network gateway connection reset shared key Name.
- keyLength – The virtual network connection reset shared key length, should between 1 and 128.
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 ConnectionResetSharedKeyInner object if successful.
/**
* The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The virtual network gateway connection reset shared key Name.
* @param keyLength The virtual network connection reset shared key length, should between 1 and 128.
* @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 ConnectionResetSharedKeyInner object if successful.
*/
public ConnectionResetSharedKeyInner beginResetSharedKey(String resourceGroupName, String virtualNetworkGatewayConnectionName, int keyLength) {
return beginResetSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, keyLength).toBlocking().single().body();
}
The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The virtual network gateway connection reset shared key Name.
- keyLength – The virtual network connection reset shared key length, should between 1 and 128.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The virtual network gateway connection reset shared key Name.
* @param keyLength The virtual network connection reset shared key length, should between 1 and 128.
* @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<ConnectionResetSharedKeyInner> beginResetSharedKeyAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, int keyLength, final ServiceCallback<ConnectionResetSharedKeyInner> serviceCallback) {
return ServiceFuture.fromResponse(beginResetSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, keyLength), serviceCallback);
}
The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The virtual network gateway connection reset shared key Name.
- keyLength – The virtual network connection reset shared key length, should between 1 and 128.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the ConnectionResetSharedKeyInner object
/**
* The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The virtual network gateway connection reset shared key Name.
* @param keyLength The virtual network connection reset shared key length, should between 1 and 128.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the ConnectionResetSharedKeyInner object
*/
public Observable<ConnectionResetSharedKeyInner> beginResetSharedKeyAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, int keyLength) {
return beginResetSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, keyLength).map(new Func1<ServiceResponse<ConnectionResetSharedKeyInner>, ConnectionResetSharedKeyInner>() {
@Override
public ConnectionResetSharedKeyInner call(ServiceResponse<ConnectionResetSharedKeyInner> response) {
return response.body();
}
});
}
The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The virtual network gateway connection reset shared key Name.
- keyLength – The virtual network connection reset shared key length, should between 1 and 128.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the ConnectionResetSharedKeyInner object
/**
* The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The virtual network gateway connection reset shared key Name.
* @param keyLength The virtual network connection reset shared key length, should between 1 and 128.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the ConnectionResetSharedKeyInner object
*/
public Observable<ServiceResponse<ConnectionResetSharedKeyInner>> beginResetSharedKeyWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, int keyLength) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (virtualNetworkGatewayConnectionName == null) {
throw new IllegalArgumentException("Parameter virtualNetworkGatewayConnectionName 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 = "2019-11-01";
ConnectionResetSharedKeyInner parameters = new ConnectionResetSharedKeyInner();
parameters.withKeyLength(keyLength);
return service.beginResetSharedKey(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<ConnectionResetSharedKeyInner>>>() {
@Override
public Observable<ServiceResponse<ConnectionResetSharedKeyInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<ConnectionResetSharedKeyInner> clientResponse = beginResetSharedKeyDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<ConnectionResetSharedKeyInner> beginResetSharedKeyDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<ConnectionResetSharedKeyInner, CloudException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<ConnectionResetSharedKeyInner>() { }.getType())
.register(202, new TypeToken<Void>() { }.getType())
.registerError(CloudException.class)
.build(response);
}
Starts packet capture on virtual network gateway connection in the specified resource group.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway connection.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- ErrorException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
Returns: the String object if successful.
/**
* Starts packet capture on virtual network gateway connection in the specified resource group.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws ErrorException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the String object if successful.
*/
public String startPacketCapture(String resourceGroupName, String virtualNetworkGatewayConnectionName) {
return startPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).toBlocking().last().body();
}
Starts packet capture on virtual network gateway connection in the specified resource group.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway connection.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Starts packet capture on virtual network gateway connection in the specified resource group.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection.
* @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<String> startPacketCaptureAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, final ServiceCallback<String> serviceCallback) {
return ServiceFuture.fromResponse(startPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName), serviceCallback);
}
Starts packet capture on virtual network gateway connection in the specified resource group.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway connection.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable for the request
/**
* Starts packet capture on virtual network gateway connection in the specified resource group.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
public Observable<String> startPacketCaptureAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) {
return startPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).map(new Func1<ServiceResponse<String>, String>() {
@Override
public String call(ServiceResponse<String> response) {
return response.body();
}
});
}
Starts packet capture on virtual network gateway connection in the specified resource group.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway connection.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable for the request
/**
* Starts packet capture on virtual network gateway connection in the specified resource group.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
public Observable<ServiceResponse<String>> startPacketCaptureWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (virtualNetworkGatewayConnectionName == null) {
throw new IllegalArgumentException("Parameter virtualNetworkGatewayConnectionName 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 = "2019-11-01";
final String filterData = null;
VpnPacketCaptureStartParameters parameters = new VpnPacketCaptureStartParameters();
parameters.withFilterData(null);
Observable<Response<ResponseBody>> observable = service.startPacketCapture(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent());
return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken<String>() { }.getType());
}
Starts packet capture on virtual network gateway connection in the specified resource group.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway connection.
- filterData – Start Packet capture parameters.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- ErrorException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
Returns: the String object if successful.
/**
* Starts packet capture on virtual network gateway connection in the specified resource group.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection.
* @param filterData Start Packet capture parameters.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws ErrorException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the String object if successful.
*/
public String startPacketCapture(String resourceGroupName, String virtualNetworkGatewayConnectionName, String filterData) {
return startPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, filterData).toBlocking().last().body();
}
Starts packet capture on virtual network gateway connection in the specified resource group.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway connection.
- filterData – Start Packet capture parameters.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Starts packet capture on virtual network gateway connection in the specified resource group.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection.
* @param filterData Start Packet capture parameters.
* @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<String> startPacketCaptureAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, String filterData, final ServiceCallback<String> serviceCallback) {
return ServiceFuture.fromResponse(startPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, filterData), serviceCallback);
}
Starts packet capture on virtual network gateway connection in the specified resource group.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway connection.
- filterData – Start Packet capture parameters.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable for the request
/**
* Starts packet capture on virtual network gateway connection in the specified resource group.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection.
* @param filterData Start Packet capture parameters.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
public Observable<String> startPacketCaptureAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, String filterData) {
return startPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, filterData).map(new Func1<ServiceResponse<String>, String>() {
@Override
public String call(ServiceResponse<String> response) {
return response.body();
}
});
}
Starts packet capture on virtual network gateway connection in the specified resource group.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway connection.
- filterData – Start Packet capture parameters.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable for the request
/**
* Starts packet capture on virtual network gateway connection in the specified resource group.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection.
* @param filterData Start Packet capture parameters.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
public Observable<ServiceResponse<String>> startPacketCaptureWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, String filterData) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (virtualNetworkGatewayConnectionName == null) {
throw new IllegalArgumentException("Parameter virtualNetworkGatewayConnectionName 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 = "2019-11-01";
VpnPacketCaptureStartParameters parameters = null;
if (filterData != null) {
parameters = new VpnPacketCaptureStartParameters();
parameters.withFilterData(filterData);
}
Observable<Response<ResponseBody>> observable = service.startPacketCapture(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent());
return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken<String>() { }.getType());
}
Starts packet capture on virtual network gateway connection in the specified resource group.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway connection.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- ErrorException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
Returns: the String object if successful.
/**
* Starts packet capture on virtual network gateway connection in the specified resource group.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws ErrorException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the String object if successful.
*/
public String beginStartPacketCapture(String resourceGroupName, String virtualNetworkGatewayConnectionName) {
return beginStartPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).toBlocking().single().body();
}
Starts packet capture on virtual network gateway connection in the specified resource group.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway connection.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Starts packet capture on virtual network gateway connection in the specified resource group.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection.
* @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<String> beginStartPacketCaptureAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, final ServiceCallback<String> serviceCallback) {
return ServiceFuture.fromResponse(beginStartPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName), serviceCallback);
}
Starts packet capture on virtual network gateway connection in the specified resource group.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway connection.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the String object
/**
* Starts packet capture on virtual network gateway connection in the specified resource group.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the String object
*/
public Observable<String> beginStartPacketCaptureAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) {
return beginStartPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).map(new Func1<ServiceResponse<String>, String>() {
@Override
public String call(ServiceResponse<String> response) {
return response.body();
}
});
}
Starts packet capture on virtual network gateway connection in the specified resource group.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway connection.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the String object
/**
* Starts packet capture on virtual network gateway connection in the specified resource group.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the String object
*/
public Observable<ServiceResponse<String>> beginStartPacketCaptureWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (virtualNetworkGatewayConnectionName == null) {
throw new IllegalArgumentException("Parameter virtualNetworkGatewayConnectionName 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 = "2019-11-01";
final String filterData = null;
VpnPacketCaptureStartParameters parameters = new VpnPacketCaptureStartParameters();
parameters.withFilterData(null);
return service.beginStartPacketCapture(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<String>>>() {
@Override
public Observable<ServiceResponse<String>> call(Response<ResponseBody> response) {
try {
ServiceResponse<String> clientResponse = beginStartPacketCaptureDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
Starts packet capture on virtual network gateway connection in the specified resource group.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway connection.
- filterData – Start Packet capture parameters.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- ErrorException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
Returns: the String object if successful.
/**
* Starts packet capture on virtual network gateway connection in the specified resource group.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection.
* @param filterData Start Packet capture parameters.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws ErrorException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the String object if successful.
*/
public String beginStartPacketCapture(String resourceGroupName, String virtualNetworkGatewayConnectionName, String filterData) {
return beginStartPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, filterData).toBlocking().single().body();
}
Starts packet capture on virtual network gateway connection in the specified resource group.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway connection.
- filterData – Start Packet capture parameters.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Starts packet capture on virtual network gateway connection in the specified resource group.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection.
* @param filterData Start Packet capture parameters.
* @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<String> beginStartPacketCaptureAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, String filterData, final ServiceCallback<String> serviceCallback) {
return ServiceFuture.fromResponse(beginStartPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, filterData), serviceCallback);
}
Starts packet capture on virtual network gateway connection in the specified resource group.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway connection.
- filterData – Start Packet capture parameters.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the String object
/**
* Starts packet capture on virtual network gateway connection in the specified resource group.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection.
* @param filterData Start Packet capture parameters.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the String object
*/
public Observable<String> beginStartPacketCaptureAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, String filterData) {
return beginStartPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, filterData).map(new Func1<ServiceResponse<String>, String>() {
@Override
public String call(ServiceResponse<String> response) {
return response.body();
}
});
}
Starts packet capture on virtual network gateway connection in the specified resource group.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway connection.
- filterData – Start Packet capture parameters.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the String object
/**
* Starts packet capture on virtual network gateway connection in the specified resource group.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection.
* @param filterData Start Packet capture parameters.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the String object
*/
public Observable<ServiceResponse<String>> beginStartPacketCaptureWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, String filterData) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (virtualNetworkGatewayConnectionName == null) {
throw new IllegalArgumentException("Parameter virtualNetworkGatewayConnectionName 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 = "2019-11-01";
VpnPacketCaptureStartParameters parameters = null;
if (filterData != null) {
parameters = new VpnPacketCaptureStartParameters();
parameters.withFilterData(filterData);
}
return service.beginStartPacketCapture(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<String>>>() {
@Override
public Observable<ServiceResponse<String>> call(Response<ResponseBody> response) {
try {
ServiceResponse<String> clientResponse = beginStartPacketCaptureDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<String> beginStartPacketCaptureDelegate(Response<ResponseBody> response) throws ErrorException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<String, ErrorException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<String>() { }.getType())
.register(202, new TypeToken<Void>() { }.getType())
.registerError(ErrorException.class)
.build(response);
}
Stops packet capture on virtual network gateway connection in the specified resource group.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway Connection.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- ErrorException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
Returns: the String object if successful.
/**
* Stops packet capture on virtual network gateway connection in the specified resource group.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway Connection.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws ErrorException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the String object if successful.
*/
public String stopPacketCapture(String resourceGroupName, String virtualNetworkGatewayConnectionName) {
return stopPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).toBlocking().last().body();
}
Stops packet capture on virtual network gateway connection in the specified resource group.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway Connection.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Stops packet capture on virtual network gateway connection in the specified resource group.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway Connection.
* @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<String> stopPacketCaptureAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, final ServiceCallback<String> serviceCallback) {
return ServiceFuture.fromResponse(stopPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName), serviceCallback);
}
Stops packet capture on virtual network gateway connection in the specified resource group.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway Connection.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable for the request
/**
* Stops packet capture on virtual network gateway connection in the specified resource group.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway Connection.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
public Observable<String> stopPacketCaptureAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) {
return stopPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).map(new Func1<ServiceResponse<String>, String>() {
@Override
public String call(ServiceResponse<String> response) {
return response.body();
}
});
}
Stops packet capture on virtual network gateway connection in the specified resource group.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway Connection.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable for the request
/**
* Stops packet capture on virtual network gateway connection in the specified resource group.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway Connection.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
public Observable<ServiceResponse<String>> stopPacketCaptureWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (virtualNetworkGatewayConnectionName == null) {
throw new IllegalArgumentException("Parameter virtualNetworkGatewayConnectionName 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 = "2019-11-01";
final String sasUrl = null;
VpnPacketCaptureStopParameters parameters = new VpnPacketCaptureStopParameters();
parameters.withSasUrl(null);
Observable<Response<ResponseBody>> observable = service.stopPacketCapture(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent());
return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken<String>() { }.getType());
}
Stops packet capture on virtual network gateway connection in the specified resource group.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway Connection.
- sasUrl – SAS url for packet capture on virtual network gateway.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- ErrorException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
Returns: the String object if successful.
/**
* Stops packet capture on virtual network gateway connection in the specified resource group.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway Connection.
* @param sasUrl SAS url for packet capture on virtual network gateway.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws ErrorException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the String object if successful.
*/
public String stopPacketCapture(String resourceGroupName, String virtualNetworkGatewayConnectionName, String sasUrl) {
return stopPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, sasUrl).toBlocking().last().body();
}
Stops packet capture on virtual network gateway connection in the specified resource group.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway Connection.
- sasUrl – SAS url for packet capture on virtual network gateway.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Stops packet capture on virtual network gateway connection in the specified resource group.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway Connection.
* @param sasUrl SAS url for packet capture on virtual network gateway.
* @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<String> stopPacketCaptureAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, String sasUrl, final ServiceCallback<String> serviceCallback) {
return ServiceFuture.fromResponse(stopPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, sasUrl), serviceCallback);
}
Stops packet capture on virtual network gateway connection in the specified resource group.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway Connection.
- sasUrl – SAS url for packet capture on virtual network gateway.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable for the request
/**
* Stops packet capture on virtual network gateway connection in the specified resource group.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway Connection.
* @param sasUrl SAS url for packet capture on virtual network gateway.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
public Observable<String> stopPacketCaptureAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, String sasUrl) {
return stopPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, sasUrl).map(new Func1<ServiceResponse<String>, String>() {
@Override
public String call(ServiceResponse<String> response) {
return response.body();
}
});
}
Stops packet capture on virtual network gateway connection in the specified resource group.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway Connection.
- sasUrl – SAS url for packet capture on virtual network gateway.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable for the request
/**
* Stops packet capture on virtual network gateway connection in the specified resource group.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway Connection.
* @param sasUrl SAS url for packet capture on virtual network gateway.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
public Observable<ServiceResponse<String>> stopPacketCaptureWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, String sasUrl) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (virtualNetworkGatewayConnectionName == null) {
throw new IllegalArgumentException("Parameter virtualNetworkGatewayConnectionName 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 = "2019-11-01";
VpnPacketCaptureStopParameters parameters = new VpnPacketCaptureStopParameters();
parameters.withSasUrl(sasUrl);
Observable<Response<ResponseBody>> observable = service.stopPacketCapture(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent());
return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken<String>() { }.getType());
}
Stops packet capture on virtual network gateway connection in the specified resource group.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway Connection.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- ErrorException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
Returns: the String object if successful.
/**
* Stops packet capture on virtual network gateway connection in the specified resource group.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway Connection.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws ErrorException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the String object if successful.
*/
public String beginStopPacketCapture(String resourceGroupName, String virtualNetworkGatewayConnectionName) {
return beginStopPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).toBlocking().single().body();
}
Stops packet capture on virtual network gateway connection in the specified resource group.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway Connection.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Stops packet capture on virtual network gateway connection in the specified resource group.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway Connection.
* @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<String> beginStopPacketCaptureAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, final ServiceCallback<String> serviceCallback) {
return ServiceFuture.fromResponse(beginStopPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName), serviceCallback);
}
Stops packet capture on virtual network gateway connection in the specified resource group.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway Connection.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the String object
/**
* Stops packet capture on virtual network gateway connection in the specified resource group.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway Connection.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the String object
*/
public Observable<String> beginStopPacketCaptureAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) {
return beginStopPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).map(new Func1<ServiceResponse<String>, String>() {
@Override
public String call(ServiceResponse<String> response) {
return response.body();
}
});
}
Stops packet capture on virtual network gateway connection in the specified resource group.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway Connection.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the String object
/**
* Stops packet capture on virtual network gateway connection in the specified resource group.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway Connection.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the String object
*/
public Observable<ServiceResponse<String>> beginStopPacketCaptureWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (virtualNetworkGatewayConnectionName == null) {
throw new IllegalArgumentException("Parameter virtualNetworkGatewayConnectionName 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 = "2019-11-01";
final String sasUrl = null;
VpnPacketCaptureStopParameters parameters = new VpnPacketCaptureStopParameters();
parameters.withSasUrl(null);
return service.beginStopPacketCapture(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<String>>>() {
@Override
public Observable<ServiceResponse<String>> call(Response<ResponseBody> response) {
try {
ServiceResponse<String> clientResponse = beginStopPacketCaptureDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
Stops packet capture on virtual network gateway connection in the specified resource group.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway Connection.
- sasUrl – SAS url for packet capture on virtual network gateway.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- ErrorException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
Returns: the String object if successful.
/**
* Stops packet capture on virtual network gateway connection in the specified resource group.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway Connection.
* @param sasUrl SAS url for packet capture on virtual network gateway.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws ErrorException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the String object if successful.
*/
public String beginStopPacketCapture(String resourceGroupName, String virtualNetworkGatewayConnectionName, String sasUrl) {
return beginStopPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, sasUrl).toBlocking().single().body();
}
Stops packet capture on virtual network gateway connection in the specified resource group.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway Connection.
- sasUrl – SAS url for packet capture on virtual network gateway.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Stops packet capture on virtual network gateway connection in the specified resource group.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway Connection.
* @param sasUrl SAS url for packet capture on virtual network gateway.
* @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<String> beginStopPacketCaptureAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, String sasUrl, final ServiceCallback<String> serviceCallback) {
return ServiceFuture.fromResponse(beginStopPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, sasUrl), serviceCallback);
}
Stops packet capture on virtual network gateway connection in the specified resource group.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway Connection.
- sasUrl – SAS url for packet capture on virtual network gateway.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the String object
/**
* Stops packet capture on virtual network gateway connection in the specified resource group.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway Connection.
* @param sasUrl SAS url for packet capture on virtual network gateway.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the String object
*/
public Observable<String> beginStopPacketCaptureAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, String sasUrl) {
return beginStopPacketCaptureWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, sasUrl).map(new Func1<ServiceResponse<String>, String>() {
@Override
public String call(ServiceResponse<String> response) {
return response.body();
}
});
}
Stops packet capture on virtual network gateway connection in the specified resource group.
Params: - resourceGroupName – The name of the resource group.
- virtualNetworkGatewayConnectionName – The name of the virtual network gateway Connection.
- sasUrl – SAS url for packet capture on virtual network gateway.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the String object
/**
* Stops packet capture on virtual network gateway connection in the specified resource group.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayConnectionName The name of the virtual network gateway Connection.
* @param sasUrl SAS url for packet capture on virtual network gateway.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the String object
*/
public Observable<ServiceResponse<String>> beginStopPacketCaptureWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, String sasUrl) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (virtualNetworkGatewayConnectionName == null) {
throw new IllegalArgumentException("Parameter virtualNetworkGatewayConnectionName 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 = "2019-11-01";
VpnPacketCaptureStopParameters parameters = new VpnPacketCaptureStopParameters();
parameters.withSasUrl(sasUrl);
return service.beginStopPacketCapture(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<String>>>() {
@Override
public Observable<ServiceResponse<String>> call(Response<ResponseBody> response) {
try {
ServiceResponse<String> clientResponse = beginStopPacketCaptureDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<String> beginStopPacketCaptureDelegate(Response<ResponseBody> response) throws ErrorException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<String, ErrorException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<String>() { }.getType())
.register(202, new TypeToken<Void>() { }.getType())
.registerError(ErrorException.class)
.build(response);
}
The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections created.
Params: - nextPageLink – The NextLink from the previous successful call to List 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 PagedList<VirtualNetworkGatewayConnectionInner> object if successful.
/**
* The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections created.
*
* @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<VirtualNetworkGatewayConnectionInner> object if successful.
*/
public PagedList<VirtualNetworkGatewayConnectionInner> listByResourceGroupNext(final String nextPageLink) {
ServiceResponse<Page<VirtualNetworkGatewayConnectionInner>> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single();
return new PagedList<VirtualNetworkGatewayConnectionInner>(response.body()) {
@Override
public Page<VirtualNetworkGatewayConnectionInner> nextPage(String nextPageLink) {
return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body();
}
};
}
The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections created.
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: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections created.
*
* @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<VirtualNetworkGatewayConnectionInner>> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture<List<VirtualNetworkGatewayConnectionInner>> serviceFuture, final ListOperationCallback<VirtualNetworkGatewayConnectionInner> serviceCallback) {
return AzureServiceFuture.fromPageResponse(
listByResourceGroupNextSinglePageAsync(nextPageLink),
new Func1<String, Observable<ServiceResponse<Page<VirtualNetworkGatewayConnectionInner>>>>() {
@Override
public Observable<ServiceResponse<Page<VirtualNetworkGatewayConnectionInner>>> call(String nextPageLink) {
return listByResourceGroupNextSinglePageAsync(nextPageLink);
}
},
serviceCallback);
}
The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections created.
Params: - nextPageLink – The NextLink from the previous successful call to List operation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the PagedList<VirtualNetworkGatewayConnectionInner> object
/**
* The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections created.
*
* @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<VirtualNetworkGatewayConnectionInner> object
*/
public Observable<Page<VirtualNetworkGatewayConnectionInner>> listByResourceGroupNextAsync(final String nextPageLink) {
return listByResourceGroupNextWithServiceResponseAsync(nextPageLink)
.map(new Func1<ServiceResponse<Page<VirtualNetworkGatewayConnectionInner>>, Page<VirtualNetworkGatewayConnectionInner>>() {
@Override
public Page<VirtualNetworkGatewayConnectionInner> call(ServiceResponse<Page<VirtualNetworkGatewayConnectionInner>> response) {
return response.body();
}
});
}
The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections created.
Params: - nextPageLink – The NextLink from the previous successful call to List operation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the PagedList<VirtualNetworkGatewayConnectionInner> object
/**
* The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections created.
*
* @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<VirtualNetworkGatewayConnectionInner> object
*/
public Observable<ServiceResponse<Page<VirtualNetworkGatewayConnectionInner>>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) {
return listByResourceGroupNextSinglePageAsync(nextPageLink)
.concatMap(new Func1<ServiceResponse<Page<VirtualNetworkGatewayConnectionInner>>, Observable<ServiceResponse<Page<VirtualNetworkGatewayConnectionInner>>>>() {
@Override
public Observable<ServiceResponse<Page<VirtualNetworkGatewayConnectionInner>>> call(ServiceResponse<Page<VirtualNetworkGatewayConnectionInner>> page) {
String nextPageLink = page.body().nextPageLink();
if (nextPageLink == null) {
return Observable.just(page);
}
return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink));
}
});
}
The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections created.
ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the PagedList<VirtualNetworkGatewayConnectionInner> object wrapped in ServiceResponse
if successful.
/**
* The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections created.
*
ServiceResponse<PageImpl<VirtualNetworkGatewayConnectionInner>> * @param nextPageLink The NextLink from the previous successful call to List operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the PagedList<VirtualNetworkGatewayConnectionInner> object wrapped in {@link ServiceResponse} if successful.
*/
public Observable<ServiceResponse<Page<VirtualNetworkGatewayConnectionInner>>> 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<VirtualNetworkGatewayConnectionInner>>>>() {
@Override
public Observable<ServiceResponse<Page<VirtualNetworkGatewayConnectionInner>>> call(Response<ResponseBody> response) {
try {
ServiceResponse<PageImpl<VirtualNetworkGatewayConnectionInner>> result = listByResourceGroupNextDelegate(response);
return Observable.just(new ServiceResponse<Page<VirtualNetworkGatewayConnectionInner>>(result.body(), result.response()));
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<PageImpl<VirtualNetworkGatewayConnectionInner>> listByResourceGroupNextDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<PageImpl<VirtualNetworkGatewayConnectionInner>, CloudException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<PageImpl<VirtualNetworkGatewayConnectionInner>>() { }.getType())
.registerError(CloudException.class)
.build(response);
}
}