/// <summary> /// Gets an outbound firewall rule. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group that contains the resource. You can obtain /// this value from the Azure Resource Manager API or the portal. /// </param> /// <param name='serverName'> /// The name of the server. /// </param> /// <param name='outboundRuleFqdn'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <OutboundFirewallRule> GetAsync(this IOutboundFirewallRulesOperations operations, string resourceGroupName, string serverName, string outboundRuleFqdn, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serverName, outboundRuleFqdn, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Create a outbound firewall rule with a given name. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group that contains the resource. You can obtain /// this value from the Azure Resource Manager API or the portal. /// </param> /// <param name='serverName'> /// The name of the server. /// </param> /// <param name='outboundRuleFqdn'> /// </param> public static OutboundFirewallRule CreateOrUpdate(this IOutboundFirewallRulesOperations operations, string resourceGroupName, string serverName, string outboundRuleFqdn) { return(operations.CreateOrUpdateAsync(resourceGroupName, serverName, outboundRuleFqdn).GetAwaiter().GetResult()); }
/// <summary> /// Gets all outbound firewall rules on a server. /// </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 <OutboundFirewallRule> > ListByServerNextAsync(this IOutboundFirewallRulesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByServerNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets all outbound firewall rules on a server. /// </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 <OutboundFirewallRule> ListByServerNext(this IOutboundFirewallRulesOperations operations, string nextPageLink) { return(operations.ListByServerNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Deletes a outbound firewall rule with a given name. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group that contains the resource. You can obtain /// this value from the Azure Resource Manager API or the portal. /// </param> /// <param name='serverName'> /// The name of the server. /// </param> /// <param name='outboundRuleFqdn'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task BeginDeleteAsync(this IOutboundFirewallRulesOperations operations, string resourceGroupName, string serverName, string outboundRuleFqdn, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, serverName, outboundRuleFqdn, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Deletes a outbound firewall rule with a given name. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group that contains the resource. You can obtain /// this value from the Azure Resource Manager API or the portal. /// </param> /// <param name='serverName'> /// The name of the server. /// </param> /// <param name='outboundRuleFqdn'> /// </param> public static void BeginDelete(this IOutboundFirewallRulesOperations operations, string resourceGroupName, string serverName, string outboundRuleFqdn) { operations.BeginDeleteAsync(resourceGroupName, serverName, outboundRuleFqdn).GetAwaiter().GetResult(); }
/// <summary> /// Gets all outbound firewall rules on a server. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group that contains the resource. You can obtain /// this value from the Azure Resource Manager API or the portal. /// </param> /// <param name='serverName'> /// The name of the server. /// </param> public static IPage <OutboundFirewallRule> ListByServer(this IOutboundFirewallRulesOperations operations, string resourceGroupName, string serverName) { return(operations.ListByServerAsync(resourceGroupName, serverName).GetAwaiter().GetResult()); }