azure-functions

How to get the details of all the resoures from their resource groups

a 夏天 提交于 2021-02-11 15:34:14
问题 I am trying to set up an azure logic-app with an azure function that will get all(most) of details of all the resources in a subscription. including their subscription ID, Resource Guid and the resource group they reside 回答1: What you basically need is to make use of the Azure Resource Management API's to operate on your resources. For your requirement you can make use of the below. GET https://management.azure.com/subscriptions/{subscriptionId}/resources?api-version=2019-05-10 Remember you

Azure Function & Container Audit

点点圈 提交于 2021-02-11 15:22:39
问题 I have a file in an Azure container which is accessed via an Azure Function. When the function is invoked - it is first AuthD against Azure AD only then the file is loaded. What is the simplest way to identify "who" accessed my file ? Any user id is NOT passed as parameter. There are 1000+ users in that AD. Please guide. 回答1: App Service passes user claims to your application by using special headers. External requests aren't allowed to set these headers, so they are present only if set by

Function App Deployment Failed - The remote server returned an error: (403) Forbidden

懵懂的女人 提交于 2021-02-11 14:49:18
问题 Deploying to an existing storage account on a subnet with service endpoints for Microsoft.EventHub, Microsoft.KeyVault, Microsoft.Storage and Microsoft.Web. Storage account is on a selected vnet: 回答1: It looks like you want to restrict access to your storage account from your function app in a virtual network. If so, you need to enable the storage account endpoint in a subnet and enable your function app to integrate with that subnet. Your function app should host on an app service plan which

Where can exceptions raised within FunctionsStartup.Configure be found logged on Azure?

三世轮回 提交于 2021-02-11 14:21:46
问题 In the following code, where is the error logged in Azure? Sometimes the cause of such an error is difficult to identify, and results in "Function host is not running.", I've not been able to find the logged exception. I've worked around this before by writing my own try/catch logging to BlobStorage myself, however, I'd hope there's a more idiomatic way of obtaining the exception. public class Startup : FunctionsStartup { public override void Configure(IFunctionsHostBuilder builder) { throw

What is the best parameters to integrate Azure Functions with Event hubs chain

女生的网名这么多〃 提交于 2021-02-11 14:21:42
问题 we need to setup 4 EventHub and 3 Azure Functions. So what is the best way to have high throughput and Scalable parameters that we can set to have a system that can handle 75k message/sec? Local.settings.json hosts.json prefetch Count max batch side 回答1: This article is definitely worth a read and is something I based some of my work on, I needed to achieve 50k p/sec. https://azure.microsoft.com/en-gb/blog/processing-100-000-events-per-second-on-azure-functions/ An important consideration is

DrawingCore exception in azure function c# .net

半世苍凉 提交于 2021-02-11 13:55:39
问题 Unhandled Exception: System.MemberAccessException : Object is busy and cannot state allow this operation [GDI+ status: ObjectBusy] at System.DrawingCore.GDIPlus.CheckStatus(Status status) at System.DrawingCore.Image.Dispose(Boolean disposing) at System.DrawingCore.Image.Finalize() This error occurs once in a while for following code. I am using sautinsoft library and imageFormat is of System.DrawingCore.Imaging. using (Stream fs = pdfFile.OpenReadStream()) { await Task.Run(() => _pdfFocus

DrawingCore exception in azure function c# .net

泄露秘密 提交于 2021-02-11 13:51:18
问题 Unhandled Exception: System.MemberAccessException : Object is busy and cannot state allow this operation [GDI+ status: ObjectBusy] at System.DrawingCore.GDIPlus.CheckStatus(Status status) at System.DrawingCore.Image.Dispose(Boolean disposing) at System.DrawingCore.Image.Finalize() This error occurs once in a while for following code. I am using sautinsoft library and imageFormat is of System.DrawingCore.Imaging. using (Stream fs = pdfFile.OpenReadStream()) { await Task.Run(() => _pdfFocus

Spring cloud function [Azure] TimerTrigger

江枫思渺然 提交于 2021-02-11 13:31:36
问题 Anybody has Spring cloud Function [Azure] TimerTrigger sample implementation ?Please do share 回答1: I was able to get this running by doing the following (this is based off the HttpTrigger code): Create the handler that has the TimerTrigger: @Component public class TimerHandler extends AzureSpringBootRequestHandler<User, Greeting> { @FunctionName("timedTrigger") public void timedTrigger( @TimerTrigger(name = "trigger", schedule = "0 */30 * * * *") String timerInfo, ExecutionContext context) {

Azure Function - Pandas dataframe to Excel, write to outputBlob stream

送分小仙女□ 提交于 2021-02-11 12:32:35
问题 Am trying to write a DataFrame to an outputBlob from an Azure Function. I'm having trouble figuring out which io stream to use. My function looks like this: import io import xlrd import pandas as pd def main(myblob: func.InputStream, outputBlob: func.Out[func.InputStream]): logging.info(f"Python blob trigger function processed blob \n" f"Name: {myblob.name}\n" f"Blob Size: {myblob.length} bytes") input_file = xlrd.open_workbook(file_contents = myblob.read()) df = pd.read_excel(input_file) if

Orchestrator is not fired in Azure Durable Function

天大地大妈咪最大 提交于 2021-02-11 12:29:09
问题 We have lots of files that get created in blob storage and consequently we are passing these files to the azure functions. However with Azure function and event grid trigger it was timed out after certain no. of files were processed. Hence now I am trying with durable functions. Below is the code I tried. ProcessJob_EventGrid gets triggered. However the ProcessJob_Orchestrator never gets triggered. Is there something that I am missing. I am completely new to the Durable functions concept.