/// <summary> /// Updates an existing server-level firewall rule for a SQL Database /// server that belongs to a subscription. (see /// http://msdn.microsoft.com/en-us/library/windowsazure/gg715280.aspx /// for more information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Sql.IFirewallRuleOperations. /// </param> /// <param name='serverName'> /// The name of the SQL database server to which this rule will be /// applied. /// </param> /// <param name='ruleName'> /// The name of the firewall rule to be updated. /// </param> /// <param name='parameters'> /// Parameters for the Update Firewall Rule operation. /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static FirewallRuleUpdateResponse Update(this IFirewallRuleOperations operations, string serverName, string ruleName, FirewallRuleUpdateParameters parameters) { try { return(operations.UpdateAsync(serverName, ruleName, parameters).Result); } catch (AggregateException ex) { if (ex.InnerExceptions.Count > 1) { throw; } else { throw ex.InnerException; } } }
/// <summary> /// Updates an existing server-level firewall rule for a SQL Database /// server that belongs to a subscription. (see /// http://msdn.microsoft.com/en-us/library/windowsazure/gg715280.aspx /// for more information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Sql.IFirewallRuleOperations. /// </param> /// <param name='serverName'> /// The name of the SQL database server to which this rule will be /// applied. /// </param> /// <param name='ruleName'> /// The name of the firewall rule to be updated. /// </param> /// <param name='parameters'> /// Parameters for the Update Firewall Rule operation. /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static Task <FirewallRuleUpdateResponse> UpdateAsync(this IFirewallRuleOperations operations, string serverName, string ruleName, FirewallRuleUpdateParameters parameters) { return(operations.UpdateAsync(serverName, ruleName, parameters, CancellationToken.None)); }