/// <summary> /// Creates a new firewall rule on the specified server. /// </summary> /// <param name="proxy"> /// Channel used for communication with Azure's service management APIs. /// </param> /// <param name="subscriptionId"> /// The subscription id which contains the server. /// </param> /// <param name="serverName"> /// The name of the server in which to create the firewall rule. /// </param> /// <param name="ruleName"> /// The name of the new firewall rule. /// </param> /// <param name="startIpAddress"> /// The starting IP address for the firewall rule. /// </param> /// <param name="endIpAddress"> /// The ending IP address for the firewall rule. /// </param> public static void NewServerFirewallRule(this ISqlDatabaseManagement proxy, string subscriptionId, string serverName, string ruleName, string startIpAddress, string endIpAddress) { var input = new SqlDatabaseFirewallRuleInput { Name = ruleName, StartIPAddress = startIpAddress, EndIPAddress = endIpAddress }; proxy.EndNewServerFirewallRule(proxy.BeginNewServerFirewallRule(subscriptionId, serverName, input, null, null)); }