Problem scenario
You want a REST API program to write to logs in a serverless way. You want to have a program (or some very basic lines of code to) execute upon certain events happening (e.g., to write intelligent pre-processed logs and potentially gather data from multiple sources). You want to use an Azure PaaS for this. How do you use Azure functions?
Solution
1. Log into Azure.
2. Click "Create a resource" in the upper-right hand corner.
3. Click "Serverless Function App"
4. For the "App name" enter something unique (e.g., adkeui37672hd73hx)
5. For "Runtime Stack" select "JavaScript".
6. Adjust other settings as needed. Click "Create" near the bottom.
7. Processing will occur. There will be a laser-like horizontal bar that will scroll near the top of the Azure Portal GUI. When this bar disappears, the "Function" has been created.
8. Click "Function Apps" (either on the left or in the middle of the screen). (Or go here: https://portal.azure.com/#blade/WebsitesExtension/FunctionsIFrameBladeMain )
9. On the left you should see the unique name you gave it. Find the name you entered and click on it [to expand it].
10. Underneath that should be an icon and the word "Functions".
11. Expand Functions and click on plus sign.
12. Click the "In-portal" option in the middle of the screen.
13. Click "Continue"
14. Click "Webhook + API" and then click "Create"
15. Click "</> Get function URL "
16. The pop-up window should have a section called "URL". Copy that URL text (e.g., by clicking the hyperlinked, blue "Copy text" on the right of the pop-up window).
17.a. Draft a URL by pasting the copied text into a text editor.
17.b. Append "&name=MikeSmith" to the text.
17.c. Replace "Mike Smith" with your name.
17.d. This text is the draft or "composed URL".
It will look something like this:
https://mkwjeu1857234.azurewebsites.net/api/HttpTrigger1?code=v3dkeE651Kh29xmnwbRE/N4c6ej393MBN==&name=Hello Mike Smith
18. Open a new web browser and go to this composed URL. You should see something like "Hello Mike Smith"
19. You are done. To learn about the details (e.g., pricing) see this link.