-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathConfigFunction.cs
More file actions
24 lines (23 loc) · 847 Bytes
/
ConfigFunction.cs
File metadata and controls
24 lines (23 loc) · 847 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
using Indigo.Functions.Configuration;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Extensions.Http;
using Microsoft.Azure.WebJobs.Host;
namespace ConfigurationFunctionSample
{
public static class ConfigFunction
{
[FunctionName("ConfigFunction")]
public static IActionResult Run(
[HttpTrigger(AuthorizationLevel.Function, "GET")] HttpRequest req,
[Config(SettingName = "test1")] string settingValue1,
[Config(SettingName = "test2")] string settingValue2,
[Config("test3")] string settingValue3,
TraceWriter log)
{
return new OkObjectResult(
$"Values are test1: {settingValue1}, test2: {settingValue2}, test3: {settingValue3}");
}
}
}