Welcome back on this episode, we're gonna take a look at Azure functions with the demo
again. My objective is just to go out to the Azure portal and create an azure function. The one in our demo is gonna be based on a simple http trigger that is available through a template
here in our portal under Azure service is we would have function app showing up for us. So let's go and select it.
Click on add to create our first function up.
First, we need to give our function APPA name. And if you noticed, it's gonna be a sub domain of dot As your websites dot net a function APP has a publicly accessible euro. So the app name we give it has to be globally unique all across azure
going to use our existing resource group
if we go down into the options for the function. At first we have our operating system selection will select windows first.
Then we have a hosting plan option. For right now, I'm gonna use my consumption plan, which is just pay as you go. But you can also assign this function app into an APP service plan. Now We haven't discussed APP service plans yet, but it is a topic will go over in later episodes.
Next, we'll leave our location as central us.
And then we have our run times stack, which is the programming language that we're gonna be using them. The function app for Windows. We have gotten that core
no. J s Java and Power Shell Corps, which is currently in preview.
If we go back and select Lennox,
our options will change to Python know Js or dot net core.
Next, we need a storage account to use. And since we're using a consumption plan and not the APP service plan, we have to define a storage account that has filed Service is in it. I don't have an existing ones right now, so I'm just gonna select the create new storage account option and let it use the name it gave me. Then, finally, we can plug this into application insights.
Let's go and click on Create.
Let's go ahead and refresh.
And our new function app is now available. Let's go configure it settings
and next to functions here on the left was go ahead and click on the plus sign
and we have a couple of different options for developing and creating our function app.
Just for this demo, I'm gonna select in portal,
then select Web Hook or a P I.
This will create an http trigger inside of our function app. And if you notice our coat is C sharp, which is a dot net language, let's minimize this to get us a little more space.
Now, we don't necessarily need to understand what this code is doing, but if you take a look at it here,
it's gonna be looking for a name being passed to it.
And then it's going to output to the window. Hello and that name that it has passed.
If it doesn't, it's just going to give us a bad request results saying Please pass the name. Let's go and get our function you Earl.
We'll copy this.
We'll open up a new tab,
and we'll get that message saying we need to pass a name and the query string.
So let's change our u R l just a little bit.
And the response we get back now is Hello, Jeff.
Looking back in our azure function, there are a couple other options we can take a look at
under integrate. We can add new inputs and define additional outputs for when we call the azure function
Under manage, we can disable the function as well. Azad Additional keys for authentication against the azure function.
Finally, we have the option to monitor the function to see previous runs as well as any success and errors that are currently going on with it. That does it for our demo. Let's jump back to the slides and wrap this up.
Coming up next, We're gonna take a look at how to configure service bus in our service bus Demo. See you in the next episode.