/// <summary> /// Creates a virtual wan vpn gateway if it doesn't exist else updates the /// existing gateway. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The resource group name of the VpnGateway. /// </param> /// <param name='gatewayName'> /// The name of the gateway. /// </param> /// <param name='vpnGatewayParameters'> /// Parameters supplied to create or Update a virtual wan vpn gateway. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <VpnGatewayInner> CreateOrUpdateAsync(this IVpnGatewaysOperations operations, string resourceGroupName, string gatewayName, VpnGatewayInner vpnGatewayParameters, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, gatewayName, vpnGatewayParameters, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Updates virtual wan vpn gateway tags. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The resource group name of the VpnGateway. /// </param> /// <param name='gatewayName'> /// The name of the gateway. /// </param> /// <param name='tags'> /// Resource tags. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <VpnGatewayInner> UpdateTagsAsync(this IVpnGatewaysOperations operations, string resourceGroupName, string gatewayName, IDictionary <string, string> tags = default(IDictionary <string, string>), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.UpdateTagsWithHttpMessagesAsync(resourceGroupName, gatewayName, tags, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Resets the primary of the vpn gateway in the specified resource group. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The resource group name of the VpnGateway. /// </param> /// <param name='gatewayName'> /// The name of the gateway. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <VpnGatewayInner> BeginResetAsync(this IVpnGatewaysOperations operations, string resourceGroupName, string gatewayName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.BeginResetWithHttpMessagesAsync(resourceGroupName, gatewayName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Lists all the VpnGateways in a subscription. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='nextPageLink'> /// The NextLink from the previous successful call to List operation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <VpnGatewayInner> > ListNextAsync(this IVpnGatewaysOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Lists all the VpnGateways in a resource group. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The resource group name of the VpnGateway. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <VpnGateway> > ListByResourceGroupAsync(this IVpnGatewaysOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Stops packet capture on vpn gateway in the specified resource group. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The resource group name of the VpnGateway. /// </param> /// <param name='gatewayName'> /// The name of the gateway. /// </param> /// <param name='parameters'> /// Vpn gateway packet capture parameters supplied to stop packet capture on /// vpn gateway. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <string> BeginStopPacketCaptureAsync(this IVpnGatewaysOperations operations, string resourceGroupName, string gatewayName, VpnGatewayPacketCaptureStopParameters parameters = default(VpnGatewayPacketCaptureStopParameters), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.BeginStopPacketCaptureWithHttpMessagesAsync(resourceGroupName, gatewayName, parameters, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Deletes a virtual wan vpn gateway. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The resource group name of the VpnGateway. /// </param> /// <param name='gatewayName'> /// The name of the gateway. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task BeginDeleteAsync(this IVpnGatewaysOperations operations, string resourceGroupName, string gatewayName, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, gatewayName, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Creates a virtual wan vpn gateway if it doesn't exist else updates the /// existing gateway. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The resource group name of the VpnGateway. /// </param> /// <param name='gatewayName'> /// The name of the gateway. /// </param> /// <param name='vpnGatewayParameters'> /// Parameters supplied to create or Update a virtual wan vpn gateway. /// </param> public static VpnGateway CreateOrUpdate(this IVpnGatewaysOperations operations, string resourceGroupName, string gatewayName, VpnGateway vpnGatewayParameters) { return(operations.CreateOrUpdateAsync(resourceGroupName, gatewayName, vpnGatewayParameters).GetAwaiter().GetResult()); }
/// <summary> /// Lists all the VpnGateways in a subscription. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='nextPageLink'> /// The NextLink from the previous successful call to List operation. /// </param> public static IPage <VpnGateway> ListNext(this IVpnGatewaysOperations operations, string nextPageLink) { return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Deletes a virtual wan vpn gateway. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The resource group name of the VpnGateway. /// </param> /// <param name='gatewayName'> /// The name of the gateway. /// </param> public static void BeginDelete(this IVpnGatewaysOperations operations, string resourceGroupName, string gatewayName) { operations.BeginDeleteAsync(resourceGroupName, gatewayName).GetAwaiter().GetResult(); }
/// <summary> /// Retrieves the details of a virtual wan vpn gateway. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The resource group name of the VpnGateway. /// </param> /// <param name='gatewayName'> /// The name of the gateway. /// </param> public static VpnGateway Get(this IVpnGatewaysOperations operations, string resourceGroupName, string gatewayName) { return(operations.GetAsync(resourceGroupName, gatewayName).GetAwaiter().GetResult()); }
/// <summary> /// Updates virtual wan vpn gateway tags. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The resource group name of the VpnGateway. /// </param> /// <param name='gatewayName'> /// The name of the gateway. /// </param> /// <param name='vpnGatewayParameters'> /// Parameters supplied to update a virtual wan vpn gateway tags. /// </param> public static VpnGateway BeginUpdateTags(this IVpnGatewaysOperations operations, string resourceGroupName, string gatewayName, TagsObject vpnGatewayParameters) { return(operations.BeginUpdateTagsAsync(resourceGroupName, gatewayName, vpnGatewayParameters).GetAwaiter().GetResult()); }
/// <summary> /// Lists all the VpnGateways in a subscription. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static IPage <VpnGateway> List(this IVpnGatewaysOperations operations) { return(operations.ListAsync().GetAwaiter().GetResult()); }
/// <summary> /// Lists all the VpnGateways in a resource group. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The resource group name of the VpnGateway. /// </param> public static IPage <VpnGateway> ListByResourceGroup(this IVpnGatewaysOperations operations, string resourceGroupName) { return(operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult()); }
/// <summary> /// Stops packet capture on vpn gateway in the specified resource group. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The resource group name of the VpnGateway. /// </param> /// <param name='gatewayName'> /// The name of the gateway. /// </param> /// <param name='parameters'> /// Vpn gateway packet capture parameters supplied to stop packet capture on /// vpn gateway. /// </param> public static string BeginStopPacketCapture(this IVpnGatewaysOperations operations, string resourceGroupName, string gatewayName, VpnGatewayPacketCaptureStopParameters parameters = default(VpnGatewayPacketCaptureStopParameters)) { return(operations.BeginStopPacketCaptureAsync(resourceGroupName, gatewayName, parameters).GetAwaiter().GetResult()); }