[{"data":1,"prerenderedAt":1280},["Reactive",2],{"navigation":3,"aAII9Cz3yR":204,"tags-FinOps":397},[4,192,200],{"title":5,"_path":6,"children":7,"icon":191},"Blog","/posts",[8,11,14,17,20,23,26,29,32,35,38,41,44,47,50,53,56,59,62,65,68,71,74,77,80,83,86,89,92,95,98,101,104,107,110,113,116,119,122,125,128,131,134,137,140,143,146,149,152,155,158,161,164,167,170,173,176,179,182,185,188],{"title":9,"_path":10},"Testing your API with REST Client","/posts/testing-your-api-with-rest-client",{"title":12,"_path":13},"HTML templating in Xamarin","/posts/html-templating-in-xamarin",{"title":15,"_path":16},"Goodbye Azure Portal, Welcome Azure CLI","/posts/welcome-azure-cli",{"title":18,"_path":19},"Coming across Gitpod","/posts/gitpod",{"title":21,"_path":22},"Handle token retrieval while querying an API","/posts/delegating-handler",{"title":24,"_path":25},"Clean up your local git branches.","/posts/cleaning-git-branches",{"title":27,"_path":28},"Automate configuration of Teams Tab SSO with PowerShell.","/posts/teams-sso-powershell",{"title":30,"_path":31},"How to do a technology watch? - Part 1","/posts/technology-watch-part1",{"title":33,"_path":34},"How to do a technology watch? - Part 2","/posts/technology-watch-part2",{"title":36,"_path":37},"You almost no longer need Key Vault references for Azure Functions.","/posts/azure-functions-custom-configuration",{"title":39,"_path":40},"How to do a technology watch? - Part 3","/posts/technology-watch-part3",{"title":42,"_path":43},"Forget DevOps, the future is already here!","/posts/devops-future",{"title":45,"_path":46},"Week 9, 2021 - Tips I learned this week","/posts/w09-2021-tips-learned-this-week",{"title":48,"_path":49},"Week 12, 2021 - Tips I learned this week","/posts/w12-2021-tips-learned-this-week",{"title":51,"_path":52},"Week 14, 2021 - Tips I learned this week","/posts/w14-2021-tips-learned-this-week",{"title":54,"_path":55},"Once upon a time in .NET","/posts/once-upon-a-time-in-dotnet",{"title":57,"_path":58},"Install your applications with winget","/posts/winget-import",{"title":60,"_path":61},"Customize your applications when installing them with winget","/posts/winget-override",{"title":63,"_path":64},"Week 22, 2021 - Tips I learned this week","/posts/w22-2021-tips-learned-this-week",{"title":66,"_path":67},"How to connect to an Azure SQL Database from C# using Azure AD","/posts/sqlclient-active-directory-authent",{"title":69,"_path":70},"Producing packages for Windows Package Manager","/posts/wingetcreate",{"title":72,"_path":73},"4 tips about GitHub Actions environment variables and contexts","/posts/github-actions-var-and-context",{"title":75,"_path":76},"AzureWebJobsStorage, the secret you don't need in your Function App.","/posts/azure-functions-without-azurewebjobsstorage",{"title":78,"_path":79},"ASP.NET Core - Lost in configuration","/posts/lost-in-configuration",{"title":81,"_path":82},"Week 39, 2021 - Tips I learned this week","/posts/w39-2021-tips-learned-this-week",{"title":84,"_path":85},"Week 41, 2021 - Tips I learned this week","/posts/w41-2021-tips-learned-this-week",{"title":87,"_path":88},"Migrating and open-sourcing my blog","/posts/migrating-blog",{"title":90,"_path":91},"Week 45, 2021 - Tips I learned this week","/posts/w45-2021-tips-learned-this-week",{"title":93,"_path":94},"Organize your GitHub stars with Astral","/posts/astral",{"title":96,"_path":97},"Pulumi with an Azure Blob Storage backend","/posts/pulumi-azure-backend",{"title":99,"_path":100},"IaC Hot Reload with Pulumi Watch","/posts/pulumi-watch",{"title":102,"_path":103},"Week 2, 2022 - Tips I learned this week","/posts/w02-2022-tips-learned-this-week",{"title":105,"_path":106},"Week 3, 2022 - Tips I learned this week","/posts/w03-2022-tips-learned-this-week",{"title":108,"_path":109},"Week 5, 2022 - Tips I learned this week","/posts/w05-2022-tips-learned-this-week",{"title":111,"_path":112},"How to provision an Azure SQL Database with Active Directory authentication","/posts/sqldatabase-active-directory-authent",{"title":114,"_path":115},"Why will I choose Pulumi over Terraform for my next project?","/posts/pulumi-vs-terraform",{"title":117,"_path":118},"Week 19, 2022 - Tips I learned this week","/posts/w19-2022-tips-learned-this-week",{"title":120,"_path":121},"Week 20, 2022 - Tips I learned this week","/posts/w20-2022-tips-learned-this-week",{"title":123,"_path":124},"Keeping secrets secure when using API Clients","/posts/http-clients-secrets",{"title":126,"_path":127},"What made me want to be a developer?","/posts/be-a-developer",{"title":129,"_path":130},"What can we do when stuck with a programming problem?","/posts/get-unstuck",{"title":132,"_path":133},"How did I automate the setup of my developer Windows laptop?","/posts/automate-developer-machine",{"title":135,"_path":136},"Discussion about API clients","/posts/http-clients",{"title":138,"_path":139},"Week 46, 2022 - Tips I learned this week","/posts/w46-2022-tips-learned-this-week",{"title":141,"_path":142},"When Pulumi met Nuke: a .NET love story","/posts/when-pulumi-met-nuke",{"title":144,"_path":145},"A year of learning and sharing - Dev Retro 2022","/posts/2022-retro",{"title":147,"_path":148},"Perform Dynamic Execution of an npm Package","/posts/pnpm-dlx",{"title":150,"_path":151},"Manage multiple Node.js versions","/posts/pnpm-env",{"title":153,"_path":154},"Introducing the Vue.js CI/CD series","/posts/vuecicd-introduction",{"title":156,"_path":157},"Execute commands using your project dependencies","/posts/pnpm-exec",{"title":159,"_path":160},"Vue.js CI/CD: Continuous Integration","/posts/vuecicd-ci",{"title":162,"_path":163},"Who is using pnpm?","/posts/pnpm-who-is-using",{"title":165,"_path":166},"Create an Azure-Ready GitHub Repository using Pulumi","/posts/azure-ready-github-repository",{"title":168,"_path":169},"Deploying to Azure from Azure DevOps without secrets","/posts/ado-workload-identity-federation",{"title":171,"_path":172},"Effortlessly Configure GitHub Repositories for Azure Deployment via OIDC","/posts/scripting-azure-ready-github-repository",{"title":174,"_path":175},"Playing with the .NET 8 Web API template","/posts/playing-with-dotnet8",{"title":177,"_path":178},"Another year of sharing and learning - Dev Retro 2023","/posts/2023-retro",{"title":180,"_path":181},"Week 4, 2024 - Tips I learned this week","/posts/w04-2024-tips-learned-this-week",{"title":183,"_path":184},"Using dependency injection with Azure .NET SDK","/posts/azure-sdk-di",{"title":186,"_path":187},"Having Fun With IT Event Calendars","/posts/it-event-calendars",{"title":189,"_path":190},"Call your Azure AD B2C protected API with authenticated HTTP requests from your JetBrains IDE","/posts/http-clients-oauth2","i-heroicons-newspaper",{"title":193,"_path":194,"children":195,"icon":199},"Goodies","/goodies",[196],{"title":197,"_path":198},"My Git Cheat Sheet","/goodies/gitcheatsheet","i-heroicons-gift-solid",{"title":201,"_path":202,"icon":203},"About","/about","i-heroicons-user-circle-solid",[205,207,209,211,214,217,220,223,226,229,231,234,237,240,242,244,247,250,253,255,258,261,264,267,270,273,276,279,282,285,287,289,292,294,297,300,303,305,308,310,313,316,319,322,325,327,329,332,335,338,341,344,347,350,353,356,359,361,363,366,369,372,375,377,380,383,385,388,391,394],[206,206],"tooling",[208,208],"vscode",[210,210],"rest",[212,213],"http","HTTP",[215,216],"razor","Razor",[218,219],"xamarin","Xamarin",[221,222],"templating","Templating",[224,225],"azure-cli","Azure CLI",[227,228],"azure","Azure",[230,230],"shell",[232,233],"github","GitHub",[235,236],"asp-net-core","ASP.NET Core",[238,239],"net",".NET",[241,241],"git",[243,243],"nushell",[245,246],"microsoft-teams","Microsoft Teams",[248,249],"powershell","PowerShell",[251,252],"azure-active-directory","Azure Active Directory",[254,254],"learning",[256,257],"azure-functions","Azure Functions",[259,260],"azure-key-vault","Azure Key Vault",[262,263],"configuration","Configuration",[265,266],"devops","DevOps",[268,269],"it","IT",[271,272],"tips-learned-this-week","tips learned this week",[274,275],"windows-terminal","Windows Terminal",[277,278],"azure-pipelines","Azure Pipelines",[280,281],"application-insights","Application Insights",[283,284],"azure-iot","Azure IoT",[286,286],"records",[288,288],"refit",[290,291],"development-box-setup","development box setup",[293,293],"winget",[295,296],"package-manager","package manager",[298,299],"azure-sql-database","Azure SQL Database",[301,302],"azure-sdk","Azure SDK",[304,304],"wingetcreate",[306,307],"github-actions","GitHub Actions",[309,309],"jq",[311,312],"pulumi","Pulumi",[314,315],"iac","IaC",[317,318],"azure-storage","Azure Storage",[320,321],"azure-signalr","Azure SignalR",[323,324],"visio","Visio",[326,326],"csharp",[328,328],"jest",[330,331],"statiq","Statiq",[333,334],"open-source","open source",[336,337],"visual-studio","Visual Studio",[339,340],"vue-js","Vue.js",[342,343],"azure-devops","Azure DevOps",[345,346],"vite","Vite",[348,349],"code-analysis","Code analysis",[351,352],"diagram","Diagram",[354,355],"terraform","Terraform",[357,358],"typescript","TypeScript",[360,360],"thoughts",[362,362],"pnpm",[364,365],"nuke","Nuke",[367,368],"pipelines","Pipelines",[370,371],"cicd","CI/CD",[373,374],"openid-connect","OpenID Connect",[376,376],"security",[378,379],"github-cli","GitHub CLI",[381,382],"microsoft-entra-id","Microsoft Entra ID",[384,384],"advent",[386,387],"finops","FinOps",[389,390],"anglesharp","AngleSharp",[392,393],"oauth2","OAuth2",[395,396],"azure-ad-b2c","Azure AD B2C",[398],{"_path":181,"_dir":399,"_draft":400,"_partial":400,"_locale":401,"title":180,"description":402,"lead":402,"date":403,"image":404,"badge":406,"tags":408,"ImageAttribution":409,"body":410,"_type":1275,"_id":1276,"_source":1277,"_file":1278,"_extension":1279},"posts",false,"","Some tips about Azure and Azure DevOps.","2024-01-29T00:00:00.000Z",{"src":405},"/images/surface_1.jpg",{"label":407},"Tips",[272,257,387,343],"Picture of \u003Ca href=\"https://unsplash.com/fr/@surface?utm_content=creditCopyText&utm_medium=referral&utm_source=unsplash\">Surface\u003C/a> on \u003Ca href=\"https://unsplash.com/fr/photos/appareil-surface-sur-la-table-taHYzvApW1o?utm_content=creditCopyText&utm_medium=referral&utm_source=unsplash\">Unsplash\u003C/a>",{"type":411,"children":412,"toc":1270},"root",[413,422,428,433,883,899,911,916,921,941,950,955,1140,1151,1161,1167,1172,1201,1206,1215,1221,1226,1231,1245,1254,1259,1264],{"type":414,"tag":415,"props":416,"children":418},"element","h2",{"id":417},"easily-debug-a-non-http-triggered-azure-function",[419],{"type":420,"value":421},"text","Easily debug a non-HTTP-triggered Azure Function",{"type":414,"tag":423,"props":424,"children":425},"p",{},[426],{"type":420,"value":427},"The other day, I wanted to locally debug a Queue-triggered function without manually adding a queue message to my local storage.",{"type":414,"tag":423,"props":429,"children":430},{},[431],{"type":420,"value":432},"My Azure Function looked like that:",{"type":414,"tag":434,"props":435,"children":438},"pre",{"className":436,"code":437,"language":326,"meta":401,"style":401},"language-csharp shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","public record Order(string Product,int Count);\n\npublic class ProcessOrder\n{\n    private readonly ILogger\u003CProcessOrder> _logger;\n\n    public ProcessOrder(ILogger\u003CProcessOrder> logger)\n    {\n        _logger = logger;\n    }\n\n    [Function(nameof(ProcessOrder))]\n    public void Run([QueueTrigger(\"orders\")] Order sentOrder)\n    {\n        _logger.LogInformation($\"Order contains {sentOrder.Count} {sentOrder.Product}\");\n    }\n}\n",[439],{"type":414,"tag":440,"props":441,"children":442},"code",{"__ignoreMap":401},[443,497,507,525,534,578,586,632,641,664,673,681,709,774,782,866,874],{"type":414,"tag":444,"props":445,"children":448},"span",{"class":446,"line":447},"line",1,[449,455,461,466,472,477,482,487,492],{"type":414,"tag":444,"props":450,"children":452},{"style":451},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[453],{"type":420,"value":454},"public",{"type":414,"tag":444,"props":456,"children":458},{"style":457},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[459],{"type":420,"value":460}," record",{"type":414,"tag":444,"props":462,"children":463},{"style":457},[464],{"type":420,"value":465}," Order",{"type":414,"tag":444,"props":467,"children":469},{"style":468},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[470],{"type":420,"value":471},"(",{"type":414,"tag":444,"props":473,"children":474},{"style":468},[475],{"type":420,"value":476},"string",{"type":414,"tag":444,"props":478,"children":479},{"style":457},[480],{"type":420,"value":481}," Product",{"type":414,"tag":444,"props":483,"children":484},{"style":468},[485],{"type":420,"value":486},",int",{"type":414,"tag":444,"props":488,"children":489},{"style":457},[490],{"type":420,"value":491}," Count",{"type":414,"tag":444,"props":493,"children":494},{"style":468},[495],{"type":420,"value":496},");\n",{"type":414,"tag":444,"props":498,"children":500},{"class":446,"line":499},2,[501],{"type":414,"tag":444,"props":502,"children":504},{"emptyLinePlaceholder":503},true,[505],{"type":420,"value":506},"\n",{"type":414,"tag":444,"props":508,"children":510},{"class":446,"line":509},3,[511,515,520],{"type":414,"tag":444,"props":512,"children":513},{"style":451},[514],{"type":420,"value":454},{"type":414,"tag":444,"props":516,"children":517},{"style":457},[518],{"type":420,"value":519}," class",{"type":414,"tag":444,"props":521,"children":522},{"style":457},[523],{"type":420,"value":524}," ProcessOrder\n",{"type":414,"tag":444,"props":526,"children":528},{"class":446,"line":527},4,[529],{"type":414,"tag":444,"props":530,"children":531},{"style":468},[532],{"type":420,"value":533},"{\n",{"type":414,"tag":444,"props":535,"children":537},{"class":446,"line":536},5,[538,543,548,553,558,563,568,573],{"type":414,"tag":444,"props":539,"children":540},{"style":451},[541],{"type":420,"value":542},"    private",{"type":414,"tag":444,"props":544,"children":545},{"style":451},[546],{"type":420,"value":547}," readonly",{"type":414,"tag":444,"props":549,"children":550},{"style":457},[551],{"type":420,"value":552}," ILogger",{"type":414,"tag":444,"props":554,"children":555},{"style":468},[556],{"type":420,"value":557},"\u003C",{"type":414,"tag":444,"props":559,"children":560},{"style":457},[561],{"type":420,"value":562},"ProcessOrder",{"type":414,"tag":444,"props":564,"children":565},{"style":468},[566],{"type":420,"value":567},">",{"type":414,"tag":444,"props":569,"children":570},{"style":457},[571],{"type":420,"value":572}," _logger",{"type":414,"tag":444,"props":574,"children":575},{"style":468},[576],{"type":420,"value":577},";\n",{"type":414,"tag":444,"props":579,"children":581},{"class":446,"line":580},6,[582],{"type":414,"tag":444,"props":583,"children":584},{"emptyLinePlaceholder":503},[585],{"type":420,"value":506},{"type":414,"tag":444,"props":587,"children":589},{"class":446,"line":588},7,[590,595,601,605,610,614,618,622,627],{"type":414,"tag":444,"props":591,"children":592},{"style":451},[593],{"type":420,"value":594},"    public",{"type":414,"tag":444,"props":596,"children":598},{"style":597},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[599],{"type":420,"value":600}," ProcessOrder",{"type":414,"tag":444,"props":602,"children":603},{"style":468},[604],{"type":420,"value":471},{"type":414,"tag":444,"props":606,"children":607},{"style":457},[608],{"type":420,"value":609},"ILogger",{"type":414,"tag":444,"props":611,"children":612},{"style":468},[613],{"type":420,"value":557},{"type":414,"tag":444,"props":615,"children":616},{"style":457},[617],{"type":420,"value":562},{"type":414,"tag":444,"props":619,"children":620},{"style":468},[621],{"type":420,"value":567},{"type":414,"tag":444,"props":623,"children":624},{"style":457},[625],{"type":420,"value":626}," logger",{"type":414,"tag":444,"props":628,"children":629},{"style":468},[630],{"type":420,"value":631},")\n",{"type":414,"tag":444,"props":633,"children":635},{"class":446,"line":634},8,[636],{"type":414,"tag":444,"props":637,"children":638},{"style":468},[639],{"type":420,"value":640},"    {\n",{"type":414,"tag":444,"props":642,"children":644},{"class":446,"line":643},9,[645,651,656,660],{"type":414,"tag":444,"props":646,"children":648},{"style":647},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[649],{"type":420,"value":650},"        _logger ",{"type":414,"tag":444,"props":652,"children":653},{"style":468},[654],{"type":420,"value":655},"=",{"type":414,"tag":444,"props":657,"children":658},{"style":647},[659],{"type":420,"value":626},{"type":414,"tag":444,"props":661,"children":662},{"style":468},[663],{"type":420,"value":577},{"type":414,"tag":444,"props":665,"children":667},{"class":446,"line":666},10,[668],{"type":414,"tag":444,"props":669,"children":670},{"style":468},[671],{"type":420,"value":672},"    }\n",{"type":414,"tag":444,"props":674,"children":676},{"class":446,"line":675},11,[677],{"type":414,"tag":444,"props":678,"children":679},{"emptyLinePlaceholder":503},[680],{"type":420,"value":506},{"type":414,"tag":444,"props":682,"children":684},{"class":446,"line":683},12,[685,690,695,700,704],{"type":414,"tag":444,"props":686,"children":687},{"style":468},[688],{"type":420,"value":689},"    [",{"type":414,"tag":444,"props":691,"children":692},{"style":457},[693],{"type":420,"value":694},"Function",{"type":414,"tag":444,"props":696,"children":697},{"style":468},[698],{"type":420,"value":699},"(nameof(",{"type":414,"tag":444,"props":701,"children":702},{"style":647},[703],{"type":420,"value":562},{"type":414,"tag":444,"props":705,"children":706},{"style":468},[707],{"type":420,"value":708},"))]\n",{"type":414,"tag":444,"props":710,"children":712},{"class":446,"line":711},13,[713,717,722,727,732,737,741,746,752,756,761,765,770],{"type":414,"tag":444,"props":714,"children":715},{"style":451},[716],{"type":420,"value":594},{"type":414,"tag":444,"props":718,"children":719},{"style":468},[720],{"type":420,"value":721}," void",{"type":414,"tag":444,"props":723,"children":724},{"style":597},[725],{"type":420,"value":726}," Run",{"type":414,"tag":444,"props":728,"children":729},{"style":468},[730],{"type":420,"value":731},"([",{"type":414,"tag":444,"props":733,"children":734},{"style":457},[735],{"type":420,"value":736},"QueueTrigger",{"type":414,"tag":444,"props":738,"children":739},{"style":468},[740],{"type":420,"value":471},{"type":414,"tag":444,"props":742,"children":743},{"style":468},[744],{"type":420,"value":745},"\"",{"type":414,"tag":444,"props":747,"children":749},{"style":748},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[750],{"type":420,"value":751},"orders",{"type":414,"tag":444,"props":753,"children":754},{"style":468},[755],{"type":420,"value":745},{"type":414,"tag":444,"props":757,"children":758},{"style":468},[759],{"type":420,"value":760},")]",{"type":414,"tag":444,"props":762,"children":763},{"style":457},[764],{"type":420,"value":465},{"type":414,"tag":444,"props":766,"children":767},{"style":457},[768],{"type":420,"value":769}," sentOrder",{"type":414,"tag":444,"props":771,"children":772},{"style":468},[773],{"type":420,"value":631},{"type":414,"tag":444,"props":775,"children":777},{"class":446,"line":776},14,[778],{"type":414,"tag":444,"props":779,"children":780},{"style":468},[781],{"type":420,"value":640},{"type":414,"tag":444,"props":783,"children":785},{"class":446,"line":784},15,[786,791,796,801,805,810,815,820,825,829,834,839,844,848,852,857,862],{"type":414,"tag":444,"props":787,"children":788},{"style":647},[789],{"type":420,"value":790},"        _logger",{"type":414,"tag":444,"props":792,"children":793},{"style":468},[794],{"type":420,"value":795},".",{"type":414,"tag":444,"props":797,"children":798},{"style":597},[799],{"type":420,"value":800},"LogInformation",{"type":414,"tag":444,"props":802,"children":803},{"style":468},[804],{"type":420,"value":471},{"type":414,"tag":444,"props":806,"children":807},{"style":468},[808],{"type":420,"value":809},"$\"",{"type":414,"tag":444,"props":811,"children":812},{"style":748},[813],{"type":420,"value":814},"Order contains ",{"type":414,"tag":444,"props":816,"children":817},{"style":468},[818],{"type":420,"value":819},"{",{"type":414,"tag":444,"props":821,"children":822},{"style":647},[823],{"type":420,"value":824},"sentOrder",{"type":414,"tag":444,"props":826,"children":827},{"style":468},[828],{"type":420,"value":795},{"type":414,"tag":444,"props":830,"children":831},{"style":647},[832],{"type":420,"value":833},"Count",{"type":414,"tag":444,"props":835,"children":836},{"style":468},[837],{"type":420,"value":838},"}",{"type":414,"tag":444,"props":840,"children":841},{"style":468},[842],{"type":420,"value":843}," {",{"type":414,"tag":444,"props":845,"children":846},{"style":647},[847],{"type":420,"value":824},{"type":414,"tag":444,"props":849,"children":850},{"style":468},[851],{"type":420,"value":795},{"type":414,"tag":444,"props":853,"children":854},{"style":647},[855],{"type":420,"value":856},"Product",{"type":414,"tag":444,"props":858,"children":859},{"style":468},[860],{"type":420,"value":861},"}\"",{"type":414,"tag":444,"props":863,"children":864},{"style":468},[865],{"type":420,"value":496},{"type":414,"tag":444,"props":867,"children":869},{"class":446,"line":868},16,[870],{"type":414,"tag":444,"props":871,"children":872},{"style":468},[873],{"type":420,"value":672},{"type":414,"tag":444,"props":875,"children":877},{"class":446,"line":876},17,[878],{"type":414,"tag":444,"props":879,"children":880},{"style":468},[881],{"type":420,"value":882},"}\n",{"type":414,"tag":423,"props":884,"children":885},{},[886,888,897],{"type":420,"value":887},"To trigger it, I could simply add a message in the order queue of my ",{"type":414,"tag":889,"props":890,"children":894},"a",{"href":891,"rel":892},"https://github.com/Azure/Azurite",[893],"nofollow",[895],{"type":420,"value":896},"storage emulator",{"type":420,"value":898}," like this:",{"type":414,"tag":423,"props":900,"children":901},{},[902],{"type":414,"tag":903,"props":904,"children":910},"img",{"alt":905,"className":906,"src":909},"Queue message in Azure Storage Explorer.",[907,908],"rounded-lg","mx-auto","/posts/images/w042024tips_storage.webp",[],{"type":414,"tag":423,"props":912,"children":913},{},[914],{"type":420,"value":915},"You may notice that I don't even have to go to the Azure Storage Explorer to add the message, I can do it directly in the IDE. However, call me lazy but I wanted to execute the function just by making an HTTP call, like we do for HTTP-triggered functions.",{"type":414,"tag":423,"props":917,"children":918},{},[919],{"type":420,"value":920},"This way, I could write the HTTP request in an HTTP file, commit it, and push it to my repository to share it with my colleagues, so they don't have to guess what message they should put in the queue to trigger the function.",{"type":414,"tag":423,"props":922,"children":923},{},[924,926,939],{"type":420,"value":925},"Fortunately, the ",{"type":414,"tag":889,"props":927,"children":930},{"href":928,"rel":929},"https://learn.microsoft.com/en-us/azure/azure-functions/functions-manually-run-non-http?tabs=azure-portal#define-the-request-location",[893],[931,937],{"type":414,"tag":932,"props":933,"children":934},"strong",{},[935],{"type":420,"value":936},"documentation",{"type":420,"value":938}," explains",{"type":420,"value":940}," how to do this.",{"type":414,"tag":423,"props":942,"children":943},{},[944],{"type":414,"tag":903,"props":945,"children":949},{"alt":946,"className":947,"src":948},"Define the request location: host name + folder path + function name.",[907,908],"/posts/images/w042024tips_function.webp",[],{"type":414,"tag":423,"props":951,"children":952},{},[953],{"type":420,"value":954},"Thus, for my use case, the resulting request is as follows:",{"type":414,"tag":434,"props":956,"children":959},{"className":957,"code":958,"language":212,"meta":401,"style":401},"language-http shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","POST http://localhost:7071/admin/functions/ProcessOrder HTTP/1.1\nContent-Type: application/json\n\n{\n  \"input\": \"{\\n  \\\"product\\\": \\\"laptop\\\",\\n  \\\"count\\\": 3\\n}\"\n}\n",[960],{"type":414,"tag":440,"props":961,"children":962},{"__ignoreMap":401},[963,992,1011,1018,1025,1133],{"type":414,"tag":444,"props":964,"children":965},{"class":446,"line":447},[966,972,977,982,987],{"type":414,"tag":444,"props":967,"children":969},{"style":968},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF;--shiki-light-font-style:italic;--shiki-default-font-style:italic;--shiki-dark-font-style:italic",[970],{"type":420,"value":971},"POST",{"type":414,"tag":444,"props":973,"children":974},{"style":647},[975],{"type":420,"value":976}," http://localhost:7071/admin/functions/ProcessOrder ",{"type":414,"tag":444,"props":978,"children":980},{"style":979},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[981],{"type":420,"value":213},{"type":414,"tag":444,"props":983,"children":984},{"style":647},[985],{"type":420,"value":986},"/",{"type":414,"tag":444,"props":988,"children":989},{"style":979},[990],{"type":420,"value":991},"1.1\n",{"type":414,"tag":444,"props":993,"children":994},{"class":446,"line":499},[995,1001,1006],{"type":414,"tag":444,"props":996,"children":998},{"style":997},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[999],{"type":420,"value":1000},"Content-Type",{"type":414,"tag":444,"props":1002,"children":1003},{"style":979},[1004],{"type":420,"value":1005},":",{"type":414,"tag":444,"props":1007,"children":1008},{"style":748},[1009],{"type":420,"value":1010}," application/json\n",{"type":414,"tag":444,"props":1012,"children":1013},{"class":446,"line":509},[1014],{"type":414,"tag":444,"props":1015,"children":1016},{"emptyLinePlaceholder":503},[1017],{"type":420,"value":506},{"type":414,"tag":444,"props":1019,"children":1020},{"class":446,"line":527},[1021],{"type":414,"tag":444,"props":1022,"children":1023},{"style":468},[1024],{"type":420,"value":533},{"type":414,"tag":444,"props":1026,"children":1027},{"class":446,"line":536},[1028,1033,1038,1042,1046,1051,1055,1060,1065,1070,1075,1080,1084,1089,1093,1098,1102,1106,1111,1115,1120,1124,1128],{"type":414,"tag":444,"props":1029,"children":1030},{"style":468},[1031],{"type":420,"value":1032},"  \"",{"type":414,"tag":444,"props":1034,"children":1035},{"style":451},[1036],{"type":420,"value":1037},"input",{"type":414,"tag":444,"props":1039,"children":1040},{"style":468},[1041],{"type":420,"value":745},{"type":414,"tag":444,"props":1043,"children":1044},{"style":468},[1045],{"type":420,"value":1005},{"type":414,"tag":444,"props":1047,"children":1048},{"style":468},[1049],{"type":420,"value":1050}," \"",{"type":414,"tag":444,"props":1052,"children":1053},{"style":748},[1054],{"type":420,"value":819},{"type":414,"tag":444,"props":1056,"children":1057},{"style":647},[1058],{"type":420,"value":1059},"\\n",{"type":414,"tag":444,"props":1061,"children":1062},{"style":647},[1063],{"type":420,"value":1064},"  \\\"",{"type":414,"tag":444,"props":1066,"children":1067},{"style":748},[1068],{"type":420,"value":1069},"product",{"type":414,"tag":444,"props":1071,"children":1072},{"style":647},[1073],{"type":420,"value":1074},"\\\"",{"type":414,"tag":444,"props":1076,"children":1077},{"style":748},[1078],{"type":420,"value":1079},": ",{"type":414,"tag":444,"props":1081,"children":1082},{"style":647},[1083],{"type":420,"value":1074},{"type":414,"tag":444,"props":1085,"children":1086},{"style":748},[1087],{"type":420,"value":1088},"laptop",{"type":414,"tag":444,"props":1090,"children":1091},{"style":647},[1092],{"type":420,"value":1074},{"type":414,"tag":444,"props":1094,"children":1095},{"style":748},[1096],{"type":420,"value":1097},",",{"type":414,"tag":444,"props":1099,"children":1100},{"style":647},[1101],{"type":420,"value":1059},{"type":414,"tag":444,"props":1103,"children":1104},{"style":647},[1105],{"type":420,"value":1064},{"type":414,"tag":444,"props":1107,"children":1108},{"style":748},[1109],{"type":420,"value":1110},"count",{"type":414,"tag":444,"props":1112,"children":1113},{"style":647},[1114],{"type":420,"value":1074},{"type":414,"tag":444,"props":1116,"children":1117},{"style":748},[1118],{"type":420,"value":1119},": 3",{"type":414,"tag":444,"props":1121,"children":1122},{"style":647},[1123],{"type":420,"value":1059},{"type":414,"tag":444,"props":1125,"children":1126},{"style":748},[1127],{"type":420,"value":838},{"type":414,"tag":444,"props":1129,"children":1130},{"style":468},[1131],{"type":420,"value":1132},"\"\n",{"type":414,"tag":444,"props":1134,"children":1135},{"class":446,"line":580},[1136],{"type":414,"tag":444,"props":1137,"children":1138},{"style":468},[1139],{"type":420,"value":882},{"type":414,"tag":423,"props":1141,"children":1142},{},[1143,1145,1150],{"type":420,"value":1144},"The content of your queue message goes in the value of the key \"input\" and ",{"type":414,"tag":932,"props":1146,"children":1147},{},[1148],{"type":420,"value":1149},"must be escaped",{"type":420,"value":795},{"type":414,"tag":1152,"props":1153,"children":1155},"callout",{"icon":1154},"i-fluent-emoji-flat-construction",[1156],{"type":414,"tag":423,"props":1157,"children":1158},{},[1159],{"type":420,"value":1160},"If like me, you skim through the documentation, you might miss the \"escape\" requirement and your request will fail so be sure to properly escape your content.",{"type":414,"tag":415,"props":1162,"children":1164},{"id":1163},"the-azure-devops-tip-you-did-not-know-about-azure-pipelines-tasks-name-conflicts",[1165],{"type":420,"value":1166},"The Azure DevOps tip you did not know about: Azure Pipelines tasks name conflicts",{"type":414,"tag":423,"props":1168,"children":1169},{},[1170],{"type":420,"value":1171},"I recently discovered that when you install extensions from the Azure DevOps marketplace, several Azure Pipelines tasks can have the same name. And if you use that name in your pipelines, Azure Pipelines won't know which task you are referring to and will prevent your pipeline from running.",{"type":414,"tag":423,"props":1173,"children":1174},{},[1175,1177,1184,1186,1192,1194,1200],{"type":420,"value":1176},"This can easily occur if you install multiple extensions for Terraform in your Azure DevOps organization. For instance, the extensions ",{"type":414,"tag":889,"props":1178,"children":1181},{"href":1179,"rel":1180},"https://marketplace.visualstudio.com/items?itemName=JasonBJohnson.azure-pipelines-tasks-terraform",[893],[1182],{"type":420,"value":1183},"Azure Pipelines Terraform Tasks",{"type":420,"value":1185}," from Jason Johnson and ",{"type":414,"tag":889,"props":1187,"children":1190},{"href":1188,"rel":1189},"https://marketplace.visualstudio.com/items?itemName=ms-devlabs.custom-terraform-tasks",[893],[1191],{"type":420,"value":355},{"type":420,"value":1193}," from Microsoft Dev Labs both have a task named the same way: ",{"type":414,"tag":440,"props":1195,"children":1197},{"className":1196},[],[1198],{"type":420,"value":1199},"TerraformInstaller",{"type":420,"value":795},{"type":414,"tag":423,"props":1202,"children":1203},{},[1204],{"type":420,"value":1205},"To avoid these conflicts, you must use the full name of the tasks in your pipelines. You can find their full names in the GitHub repository of the extensions. Another way is to use these tasks in a test Release and click on the \"View YAML\" button to see the full name of the task you added.",{"type":414,"tag":423,"props":1207,"children":1208},{},[1209],{"type":414,"tag":903,"props":1210,"children":1214},{"alt":1211,"className":1212,"src":1213},"Screenshot of a release in Azure DevOps.",[907,908],"/posts/images/w042024tips_ado_release.webp",[],{"type":414,"tag":415,"props":1216,"children":1218},{"id":1217},"using-metrics-to-understand-your-usage-of-azure-resources",[1219],{"type":420,"value":1220},"Using metrics to understand your usage of Azure resources",{"type":414,"tag":423,"props":1222,"children":1223},{},[1224],{"type":420,"value":1225},"I don't often use all my monthly free credits of my Azure subscription, but this month my spending limit was quickly reached and my subscription was disabled!",{"type":414,"tag":423,"props":1227,"children":1228},{},[1229],{"type":420,"value":1230},"The cost analysis tab of my subscription showed me that an Azure Maps Account resource was responsible for consuming most of my credits but didn't provide more details.",{"type":414,"tag":423,"props":1232,"children":1233},{},[1234,1236,1243],{"type":420,"value":1235},"So, I went to the Metrics tab of my resource and discovered that I could split the Usage metric by API name to determine exactly which Azure Maps API was heavily used by my applications. Combined with the ",{"type":414,"tag":889,"props":1237,"children":1240},{"href":1238,"rel":1239},"https://azure.microsoft.com/en-us/pricing/details/azure-maps/",[893],[1241],{"type":420,"value":1242},"pricing page",{"type":420,"value":1244},", I can deduce which API requests I'm making too frequently and, therefore how to optimize costs.",{"type":414,"tag":423,"props":1246,"children":1247},{},[1248],{"type":414,"tag":903,"props":1249,"children":1253},{"alt":1250,"className":1251,"src":1252},"Azure Maps usage metrics by API name.",[907,908],"/posts/images/w042024tips_azuremaps_metrics.webp",[],{"type":414,"tag":423,"props":1255,"children":1256},{},[1257],{"type":420,"value":1258},"Depending on the type of resource, you will use different metrics and split on different properties. Regardless, metrics can help you comprehend your resource usage and its associated cost.",{"type":414,"tag":423,"props":1260,"children":1261},{},[1262],{"type":420,"value":1263},"And that's it for this week, happy learning!",{"type":414,"tag":1265,"props":1266,"children":1267},"style",{},[1268],{"type":420,"value":1269},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":401,"searchDepth":499,"depth":499,"links":1271},[1272,1273,1274],{"id":417,"depth":499,"text":421},{"id":1163,"depth":499,"text":1166},{"id":1217,"depth":499,"text":1220},"markdown","content:1.posts:58.w04-2024-tips-learned-this-week.md","content","1.posts/58.w04-2024-tips-learned-this-week.md","md",1716749600863]