Skip to content

Instantly share code, notes, and snippets.

@pierskarsenbarg
Last active February 22, 2021 16:58
Show Gist options
  • Select an option

  • Save pierskarsenbarg/089da29f4941660628def9de8dc973cd to your computer and use it in GitHub Desktop.

Select an option

Save pierskarsenbarg/089da29f4941660628def9de8dc973cd to your computer and use it in GitHub Desktop.
public class FunctionConfig
{
public bool Disabled { get; set; }
public Dictionary<string, string> Bindings { get; set; }
}
var config = new FunctionConfig
{
Bindings = new Dictionary<string, string>
{
{ "cardinality", "many" },
{ "connection", "RootManageSharedAccessKey" },
{ "consumerGroup", "$Default" },
{ "dataType", "" },
{ "direction", "in" },
{ "eventHubName", datadogEventHub.Name },
{ "name", "eventHubMessages" },
{ "type", "eventHubTrigger" }
},
Disabled = false
};
var functionResource = new WebAppFunction("function", new WebAppFunctionArgs
{
Config = config,
Files =
{
{
"index.js", "https://github.com/DataDog/datadog-serverless-functions/blob/master/azure/activity_logs_monitoring/index.js"
},
},
FunctionName = $"{datadogFunctionApp.Name}/EventHubTrigger-DataDog",
Name = $"{datadogFunctionApp.Name}/EventHubTrigger-DataDog",
ResourceGroupName = RGName
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment