/// <summary> /// Retrieves the details of a HubVirtualNetworkConnection. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The resource group name of the VirtualHub. /// </param> /// <param name='virtualHubName'> /// The name of the VirtualHub. /// </param> /// <param name='connectionName'> /// The name of the vpn connection. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <HubVirtualNetworkConnection> GetAsync(this IHubVirtualNetworkConnectionsOperations operations, string resourceGroupName, string virtualHubName, string connectionName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, virtualHubName, connectionName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Retrieves the details of all HubVirtualNetworkConnections. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The resource group name of the VirtualHub. /// </param> /// <param name='virtualHubName'> /// The name of the VirtualHub. /// </param> public static IPage <HubVirtualNetworkConnection> List(this IHubVirtualNetworkConnectionsOperations operations, string resourceGroupName, string virtualHubName) { return(operations.ListAsync(resourceGroupName, virtualHubName).GetAwaiter().GetResult()); }
/// <summary> /// Retrieves the details of all HubVirtualNetworkConnections. /// </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 <HubVirtualNetworkConnection> > ListNextAsync(this IHubVirtualNetworkConnectionsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Retrieves the details of all HubVirtualNetworkConnections. /// </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 <HubVirtualNetworkConnection> ListNext(this IHubVirtualNetworkConnectionsOperations operations, string nextPageLink) { return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Deletes a HubVirtualNetworkConnection. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The resource group name of the VirtualHub. /// </param> /// <param name='virtualHubName'> /// The name of the VirtualHub. /// </param> /// <param name='connectionName'> /// The name of the HubVirtualNetworkConnection. /// </param> public static void Delete(this IHubVirtualNetworkConnectionsOperations operations, string resourceGroupName, string virtualHubName, string connectionName) { operations.DeleteAsync(resourceGroupName, virtualHubName, connectionName).GetAwaiter().GetResult(); }
/// <summary> /// Creates a hub virtual network connection if it doesn't exist else updates /// the existing one. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The resource group name of the HubVirtualNetworkConnection. /// </param> /// <param name='virtualHubName'> /// The name of the VirtualHub. /// </param> /// <param name='connectionName'> /// The name of the HubVirtualNetworkConnection. /// </param> /// <param name='hubVirtualNetworkConnectionParameters'> /// Parameters supplied to create or update a hub virtual network connection. /// </param> public static HubVirtualNetworkConnection CreateOrUpdate(this IHubVirtualNetworkConnectionsOperations operations, string resourceGroupName, string virtualHubName, string connectionName, HubVirtualNetworkConnection hubVirtualNetworkConnectionParameters) { return(operations.CreateOrUpdateAsync(resourceGroupName, virtualHubName, connectionName, hubVirtualNetworkConnectionParameters).GetAwaiter().GetResult()); }
/// <summary> /// Deletes a HubVirtualNetworkConnection. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The resource group name of the VirtualHub. /// </param> /// <param name='virtualHubName'> /// The name of the VirtualHub. /// </param> /// <param name='connectionName'> /// The name of the HubVirtualNetworkConnection. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task BeginDeleteAsync(this IHubVirtualNetworkConnectionsOperations operations, string resourceGroupName, string virtualHubName, string connectionName, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, virtualHubName, connectionName, null, cancellationToken).ConfigureAwait(false)).Dispose(); }