azure-functions

How to make a continuous delivery of a python function app deployed in Azure?

前提是你 提交于 2020-12-03 13:50:34
问题 For the first time I deployed a Python function app to Azure using a deployment pipeline: https://docs.microsoft.com/bs-latn-ba/azure/azure-functions/functions-how-to-azure-devops The package is deployed to Azure using Kudu Zip deploy. My http triggered function runs wonderfully locally (on Windows), but I have a 500 internal errors on Azure because it does not find the module requests . Exception: ModuleNotFoundError: No module named 'requests' imports of __init__.py: import logging,

Azure Functions - Configure client certificate authentication

﹥>﹥吖頭↗ 提交于 2020-12-01 07:26:05
问题 Do functions support authorizing access to a Function by using client certificates, in a consumption plan ? Something similar to the approach described here? Basically, I'm looking for the Functions runtime to immediately reject connection requests if the caller does not present a valid client certificate, without me having to implement that authorization routine in the code. 回答1: Based on your requirement, I created my C# HttpTrigger function to check this issue, here is the core code: if

How To Configure Queue Name for Queue Trigger In Azure Function App

扶醉桌前 提交于 2020-12-01 02:33:28
问题 I'm creating a function app in Azure and want to use a queue trigger. I know how to configure the queue name at design time, e.g: [FunctionName("MyTestFunction")] public static void Run([QueueTrigger("myqueue-items", Connection = "testdelete")]string myQueueItem, TraceWriter log) However, I'd like to be able to define and reference it in a configuration file. I'm aware of the existence of function.json (Probably this one), host.json and local.settings.json, but I don't know how to set a queue

How To Configure Queue Name for Queue Trigger In Azure Function App

試著忘記壹切 提交于 2020-12-01 02:31:43
问题 I'm creating a function app in Azure and want to use a queue trigger. I know how to configure the queue name at design time, e.g: [FunctionName("MyTestFunction")] public static void Run([QueueTrigger("myqueue-items", Connection = "testdelete")]string myQueueItem, TraceWriter log) However, I'd like to be able to define and reference it in a configuration file. I'm aware of the existence of function.json (Probably this one), host.json and local.settings.json, but I don't know how to set a queue

How To Configure Queue Name for Queue Trigger In Azure Function App

巧了我就是萌 提交于 2020-12-01 02:29:24
问题 I'm creating a function app in Azure and want to use a queue trigger. I know how to configure the queue name at design time, e.g: [FunctionName("MyTestFunction")] public static void Run([QueueTrigger("myqueue-items", Connection = "testdelete")]string myQueueItem, TraceWriter log) However, I'd like to be able to define and reference it in a configuration file. I'm aware of the existence of function.json (Probably this one), host.json and local.settings.json, but I don't know how to set a queue

Reading settings from a Azure Function

耗尽温柔 提交于 2020-11-30 06:22:18
问题 I'm new to Azure's function... I've created a new timer function (will be fired every 30 minutes) and it has to perform a query on a URL, then push data on the buffer.. I've done public static void Run(TimerInfo myTimer, TraceWriter log) { var s = CloudConfigurationManager.GetSetting("url"); log.Info(s); } And in my function settings I've What am I doing wrong? Thanks 回答1: You can use System.Environment.GetEnvironmentVariable like this: var value = Environment.GetEnvironmentVariable("your_key

Reading settings from a Azure Function

感情迁移 提交于 2020-11-30 06:20:10
问题 I'm new to Azure's function... I've created a new timer function (will be fired every 30 minutes) and it has to perform a query on a URL, then push data on the buffer.. I've done public static void Run(TimerInfo myTimer, TraceWriter log) { var s = CloudConfigurationManager.GetSetting("url"); log.Info(s); } And in my function settings I've What am I doing wrong? Thanks 回答1: You can use System.Environment.GetEnvironmentVariable like this: var value = Environment.GetEnvironmentVariable("your_key