/// <summary> /// The Reset Virtual network Gateway shared key operation resets the /// shared key on the virtual network gateway for the specified /// vitrual network connection to the specified local network in /// Windows Azure. (see /// http://msdn.microsoft.com/en-us/library/windowsazure/jj154114.aspx /// for more information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.VirtualNetworks.IGatewayOperations. /// </param> /// <param name='virtualNetworkName'> /// The name of the virtual network for this gateway. /// </param> /// <param name='localNetworkName'> /// The name of the local network. /// </param> /// <param name='parameters'> /// The parameters to the Virtual Network Gateway Reset Shared Key /// request. /// </param> /// <returns> /// A standard storage response including an HTTP status code and /// request ID. /// </returns> public static GatewayOperationResponse BeginResetSharedKey(this IGatewayOperations operations, string virtualNetworkName, string localNetworkName, GatewayResetSharedKeyParameters parameters) { try { return operations.BeginResetSharedKeyAsync(virtualNetworkName, localNetworkName, parameters).Result; } catch (AggregateException ex) { if (ex.InnerExceptions.Count > 1) { throw; } else { throw ex.InnerException; } } }
/// <summary> /// The Begin Reset Virtual Network Gateway Shared Key operation resets /// the shared key on the virtual network gateway for the specified /// virtual network connection to the specified local network in /// Azure. (see /// http://msdn.microsoft.com/en-us/library/windowsazure/jj154114.aspx /// for more information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Network.IGatewayOperations. /// </param> /// <param name='networkName'> /// Required. The name of the virtual network for this gateway. /// </param> /// <param name='localNetworkName'> /// Required. The name of the local network. /// </param> /// <param name='parameters'> /// Required. Parameters supplied to the Begin Virtual Network Gateway /// Reset Shared Key request. /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static Task<GatewayOperationResponse> BeginResetSharedKeyAsync(this IGatewayOperations operations, string networkName, string localNetworkName, GatewayResetSharedKeyParameters parameters) { return operations.BeginResetSharedKeyAsync(networkName, localNetworkName, parameters, CancellationToken.None); }
/// <summary> /// 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. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.Network.IVirtualNetworkGatewayConnectionOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The name of the resource group. /// </param> /// <param name='virtualNetworkGatewayConnectionName'> /// Required. The virtual network gateway connection reset shared key /// Name. /// </param> /// <param name='parameters'> /// Required. Parameters supplied to the Begin Reset Virtual Network /// Gateway connection shared key operation through Network resource /// provider. /// </param> /// <returns> /// Response for PutVirtualNetworkGatewayConnectionResetSharedKey Api /// servive call /// </returns> public static Task<ConnectionResetSharedKeyPutResponse> BeginResetSharedKeyAsync(this IVirtualNetworkGatewayConnectionOperations operations, string resourceGroupName, string virtualNetworkGatewayConnectionName, ConnectionResetSharedKey parameters) { return operations.BeginResetSharedKeyAsync(resourceGroupName, virtualNetworkGatewayConnectionName, parameters, CancellationToken.None); }