Exemplo n.º 1
0
 /// <summary>
 /// Retrieves the details of a nat rule.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name of the Virtual Network Gateway.
 /// </param>
 /// <param name='virtualNetworkGatewayName'>
 /// The name of the gateway.
 /// </param>
 /// <param name='natRuleName'>
 /// The name of the nat rule.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <VirtualNetworkGatewayNatRule> GetAsync(this IVirtualNetworkGatewayNatRulesOperations operations, string resourceGroupName, string virtualNetworkGatewayName, string natRuleName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, virtualNetworkGatewayName, natRuleName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Creates a nat rule to a scalable virtual network gateway if it doesn't
 /// exist else updates the existing nat rules.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name of the Virtual Network Gateway.
 /// </param>
 /// <param name='virtualNetworkGatewayName'>
 /// The name of the gateway.
 /// </param>
 /// <param name='natRuleName'>
 /// The name of the nat rule.
 /// </param>
 /// <param name='natRuleParameters'>
 /// Parameters supplied to create or Update a Nat Rule.
 /// </param>
 public static VirtualNetworkGatewayNatRule CreateOrUpdate(this IVirtualNetworkGatewayNatRulesOperations operations, string resourceGroupName, string virtualNetworkGatewayName, string natRuleName, VirtualNetworkGatewayNatRule natRuleParameters)
 {
     return(operations.CreateOrUpdateAsync(resourceGroupName, virtualNetworkGatewayName, natRuleName, natRuleParameters).GetAwaiter().GetResult());
 }
Exemplo n.º 3
0
 /// <summary>
 /// Retrieves the details of a nat rule.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name of the Virtual Network Gateway.
 /// </param>
 /// <param name='virtualNetworkGatewayName'>
 /// The name of the gateway.
 /// </param>
 /// <param name='natRuleName'>
 /// The name of the nat rule.
 /// </param>
 public static VirtualNetworkGatewayNatRule Get(this IVirtualNetworkGatewayNatRulesOperations operations, string resourceGroupName, string virtualNetworkGatewayName, string natRuleName)
 {
     return(operations.GetAsync(resourceGroupName, virtualNetworkGatewayName, natRuleName).GetAwaiter().GetResult());
 }
Exemplo n.º 4
0
 /// <summary>
 /// Retrieves all nat rules for a particular virtual network gateway.
 /// </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 <VirtualNetworkGatewayNatRule> > ListByVirtualNetworkGatewayNextAsync(this IVirtualNetworkGatewayNatRulesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByVirtualNetworkGatewayNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Exemplo n.º 5
0
 /// <summary>
 /// Retrieves all nat rules for a particular virtual network gateway.
 /// </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 <VirtualNetworkGatewayNatRule> ListByVirtualNetworkGatewayNext(this IVirtualNetworkGatewayNatRulesOperations operations, string nextPageLink)
 {
     return(operations.ListByVirtualNetworkGatewayNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
Exemplo n.º 6
0
 /// <summary>
 /// Deletes a nat rule.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name of the Virtual Network Gateway.
 /// </param>
 /// <param name='virtualNetworkGatewayName'>
 /// The name of the gateway.
 /// </param>
 /// <param name='natRuleName'>
 /// The name of the nat rule.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task BeginDeleteAsync(this IVirtualNetworkGatewayNatRulesOperations operations, string resourceGroupName, string virtualNetworkGatewayName, string natRuleName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, virtualNetworkGatewayName, natRuleName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Exemplo n.º 7
0
 /// <summary>
 /// Deletes a nat rule.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name of the Virtual Network Gateway.
 /// </param>
 /// <param name='virtualNetworkGatewayName'>
 /// The name of the gateway.
 /// </param>
 /// <param name='natRuleName'>
 /// The name of the nat rule.
 /// </param>
 public static void BeginDelete(this IVirtualNetworkGatewayNatRulesOperations operations, string resourceGroupName, string virtualNetworkGatewayName, string natRuleName)
 {
     operations.BeginDeleteAsync(resourceGroupName, virtualNetworkGatewayName, natRuleName).GetAwaiter().GetResult();
 }
Exemplo n.º 8
0
 /// <summary>
 /// Retrieves all nat rules for a particular virtual network gateway.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name of the virtual network gateway.
 /// </param>
 /// <param name='virtualNetworkGatewayName'>
 /// The name of the gateway.
 /// </param>
 public static IPage <VirtualNetworkGatewayNatRule> ListByVirtualNetworkGateway(this IVirtualNetworkGatewayNatRulesOperations operations, string resourceGroupName, string virtualNetworkGatewayName)
 {
     return(operations.ListByVirtualNetworkGatewayAsync(resourceGroupName, virtualNetworkGatewayName).GetAwaiter().GetResult());
 }