Skip to content

Instantly share code, notes, and snippets.

@justinyoo
Created November 17, 2017 00:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save justinyoo/8cd99c56fa7b433ab3040c54c85dbc6b to your computer and use it in GitHub Desktop.
Save justinyoo/8cd99c56fa7b433ab3040c54c85dbc6b to your computer and use it in GitHub Desktop.
Outbound IP Registration to Azure SQL Using Azure Functions
public static class UpdateFirewallRulesHttpTrigger
{
[FunctionName("UpdateFirewallRulesHttpTrigger")]
public static async Task<HttpResponseMessage> Run(
[HttpTrigger(AuthorizationLevel.Function, "post", Route = "firewall/rules")] HttpRequestMessage req,
TraceWriter log)
{
var resourceGroupName = Config.ResourceGroupName;
log.Info($"Firewall rules on database servers in {resourceGroupName} are updating...");
log.Info($"Firewall rules on database servers in {resourceGroupName} have been updated.");
return req.CreateResponse(HttpStatusCode.OK);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment