/// <summary> /// Creates a new firewall rule or updates an existing 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='firewallRuleName'> /// The name of the server firewall rule. /// </param> /// <param name='parameters'> /// The required parameters for creating or updating a firewall rule. /// </param> public static FirewallRule CreateOrUpdate(this IFirewallRulesOperations operations, string resourceGroupName, string serverName, string firewallRuleName, FirewallRule parameters) { return(operations.CreateOrUpdateAsync(resourceGroupName, serverName, firewallRuleName, parameters).GetAwaiter().GetResult()); }
/// <summary> /// Create or update a redis cache firewall rule /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='cacheName'> /// The name of the Redis cache. /// </param> /// <param name='ruleName'> /// The name of the firewall rule. /// </param> /// <param name='parameters'> /// Parameters supplied to the create or update redis firewall rule operation. /// </param> public static RedisFirewallRule CreateOrUpdate(this IFirewallRulesOperations operations, string resourceGroupName, string cacheName, string ruleName, RedisFirewallRule parameters) { return(operations.CreateOrUpdateAsync(resourceGroupName, cacheName, ruleName, parameters).GetAwaiter().GetResult()); }