azure-functions

Using multiple Azure Functions QueueTriggers to listen on the same storage queue

与世无争的帅哥 提交于 2021-01-20 11:43:37
问题 I have an Azure Functions QueueTrigger that listens on a storage queue for messages like this: Message text -------------------------- {"ClientName": "client1"} {"ClientName": "client2"} {"ClientName": "client3"} The QueueTrigger then has code like this: if 'client1' == queue_msg['ClientName']: # do work required for client1 elif 'client2' == queue_msg['ClientName']: # do work required for client2 elif 'client3' == queue_msg['ClientName']: # do work required for client3 I'm using the Linux

Using multiple Azure Functions QueueTriggers to listen on the same storage queue

懵懂的女人 提交于 2021-01-20 11:42:46
问题 I have an Azure Functions QueueTrigger that listens on a storage queue for messages like this: Message text -------------------------- {"ClientName": "client1"} {"ClientName": "client2"} {"ClientName": "client3"} The QueueTrigger then has code like this: if 'client1' == queue_msg['ClientName']: # do work required for client1 elif 'client2' == queue_msg['ClientName']: # do work required for client2 elif 'client3' == queue_msg['ClientName']: # do work required for client3 I'm using the Linux

Cannot delete item from CosmosDB

北慕城南 提交于 2021-01-20 08:19:07
问题 I am trying to use an Azure Functions httpTrigger call to delete an item from my database. import { CosmosClient, } from '@azure/cosmos' const httpTrigger: AzureFunction = async function (context: Context, req: HttpRequest): Promise<void> { const client = new CosmosClient(process.env.cosmosDB) const database = client.database('testDB'); const container = database.container('workers'); const item = container.item('28a31558-ff8c-40c3-a7e8-1e8904c5ff72', '/id') console.log(await item.delete()) }

Acquire Keyvault Secret within a httptrigger and Use it to Acquire Info to be output by Function-Python

大城市里の小女人 提交于 2021-01-20 07:15:21
问题 I have the following code which I use to acquire a secret, use secret to log into portal and download a csv table. This works ok outside a function. import pandas as pd import pandas as pd from arcgis.gis import GIS from azure.identity import DefaultAzureCredential from azure.keyvault.secrets import SecretClient credential = DefaultAzureCredential() secret_client = SecretClient(vault_url="https://xxxx-dev-vault.vault.azure.net/", credential=credential) secret = secret_client.get_secret(

Acquire Keyvault Secret within a httptrigger and Use it to Acquire Info to be output by Function-Python

家住魔仙堡 提交于 2021-01-20 07:14:54
问题 I have the following code which I use to acquire a secret, use secret to log into portal and download a csv table. This works ok outside a function. import pandas as pd import pandas as pd from arcgis.gis import GIS from azure.identity import DefaultAzureCredential from azure.keyvault.secrets import SecretClient credential = DefaultAzureCredential() secret_client = SecretClient(vault_url="https://xxxx-dev-vault.vault.azure.net/", credential=credential) secret = secret_client.get_secret(

Acquire Keyvault Secret within a httptrigger and Use it to Acquire Info to be output by Function-Python

荒凉一梦 提交于 2021-01-20 07:13:52
问题 I have the following code which I use to acquire a secret, use secret to log into portal and download a csv table. This works ok outside a function. import pandas as pd import pandas as pd from arcgis.gis import GIS from azure.identity import DefaultAzureCredential from azure.keyvault.secrets import SecretClient credential = DefaultAzureCredential() secret_client = SecretClient(vault_url="https://xxxx-dev-vault.vault.azure.net/", credential=credential) secret = secret_client.get_secret(

Acquire Keyvault Secret within a httptrigger and Use it to Acquire Info to be output by Function-Python

不打扰是莪最后的温柔 提交于 2021-01-20 07:13:13
问题 I have the following code which I use to acquire a secret, use secret to log into portal and download a csv table. This works ok outside a function. import pandas as pd import pandas as pd from arcgis.gis import GIS from azure.identity import DefaultAzureCredential from azure.keyvault.secrets import SecretClient credential = DefaultAzureCredential() secret_client = SecretClient(vault_url="https://xxxx-dev-vault.vault.azure.net/", credential=credential) secret = secret_client.get_secret(

How can I create a python webhook sender app?

风格不统一 提交于 2021-01-16 04:14:05
问题 This is a follow up question to this post. I have a data warehouse table exposed via xxx.com\data API endpoint I have been querying this table using the following code and parsing it into a dataframe as follows; import requests import json import http.client import pandas as pd url = "xxx.com\data?q=Active%20%3D1%20and%20LATITUDE%20%3D%20%20%220.000000%22%20and%20LONGITUDE%20%3D%20%220.000000%22&pageSize =300" payload = {} headers = {'Authorization': access_token} response = requests.request(

Is there a way to see when the Azure Functions Runtime was updated in Linux?

可紊 提交于 2021-01-07 06:57:45
问题 For an Azure Function, how can I tell when an Azure App Service Plan's FUNCTION_EXTENSION_VERSION was updated on a Linux server? Note this is in relation to the same exact question answered for Windows. 回答1: For an Azure Function, how can I tell when an Azure App Service Plan's FUNCTION_EXTENSION_VERSION was updated on a Linux server? Linux azure function is different from windows azure function. Their design methods are different. I first tried to use ftp and connected to the physical path

CORS Issue with Azure Functions inside AKS Cluster

我的未来我决定 提交于 2021-01-07 06:49:24
问题 I have a AKS Cluster in Azure which is running my Azure functions project. I got it working by following this guide. https://markheath.net/post/azure-functions-aks-keda The service is running, however any requests from my site fail with a CORS error. If you notice on the guide the CORS option is set to * in the local.settings.json file. I noticed that azure functions does not seem to read the local.settings.json or settings.json files when running inside a container. I am not sure why but to