How to run the Azure Government Functions sample

How to run the Azure Government Functions sample

In this video we walk through the different capabilities of as …Azure functions as well as the azure government functions sample here we …navigated as your azure government portal we can see that I already have a function app deployed. Let’s see how quick and easy it is stand-up a function in the cloud in order to create a new function in our function app click on this button right here. Here we can see that there are multiple types of triggers and http trigger, timer, service bus as well as a queue …trigger. These triggers allow us to respond to events such as something being added on a queue or …storage blob. So, let’s create a simple http trigger. Here we can see that there are multiple languages supported. I name…my function select an authorization level for security then click create. Now you can see the function that…just created. If we look at the code is just parsing a name query parameter and then printing that the parameter out on the page so let’s run this function by clicking is run but. Right here we can see we can get the function url which we are going to copy. And, paste right into our browser. We can now and. Our query string parameter at the end of our url. As we can see on this page the function took our query parameter that the user passed in…printed it out on the page. We have navigated back to our function up let’s take a look at the …hub web…function that I’ve created. For a lot of github users…we want to not only respond http but other events such as comments issues or checkins whatever the case may be github has a web hook infrastructure that we can hook into to listen for those events. So, let’s navigate to our github repository have already configured a web hook for this repository that connects back to the function that we just saw let’s write a comment. …navigate back to our function and take a look at our logs we can see that function was triggered as a result of that comment. Now let’s take a look at another example. Here we have a blog trigger function functions offer different connectors which allows to connect blob storage or q storage and respond directly to specific events this one minus code is watching this blob for any change now let’s navigated the integrate tab. Here we can see that in this integration this function is connected to this specific storage account and watching this blob. Now we can come over to the storage explore …can see all the resources in our storage accounts I’ve configured this function to listen for this specific blob so let me upload file for my local machine to this container. We can see that we have successfully uploaded this file to our block container now we navigate back to the portal we can see in our log set the function was triggered by that file upload. In the past…demos we have set up and interact with as your functions directly to the portal however in a real-world application we probably wouldn’t be writing code directly into a ui. In this next demo we’ll be looking at the …function sample which consists of a web application that directly interact very function up as you can see we have the function app opened in visual studio. We have a break point set that will be hit when we uploaded image to our web application I have this website running up and as your government is the azure government image motivator so when people upload images to a system we can moderate which ones have been approved click on the images tab can see that we already have for images of cars that have been approved. So, when someone…image of a car the image will be …if not they will show up as rejected? So, let’s click on the upload… Here I can upload a picture of a car or whatever it may be so let me upload this picture. As we can see this is the image of a car when I hit upload this will write a message to a queue which will then trigger a function that I already have running so let’s click upload. We can see the status is pending and we have hit our break point in our function up by writing to the image…we have triggered this function the passes image moderation async method is actually sending this image to the computer vision api to be analyzed we can see from the caption a blue car parked in front of a house and we have a boolean for containing a car and it’s …true so when I…continue. And, I hit refresh. We should see now the status of this image has been approved as it is the image of a car. We navigate back to images we can now see the picture that we just uploaded …added under the approved tab. So, now let’s try uploading a picture of something that is not a car. As we can see this is a fire hydrants ergo not a car. Status is pending we’ve had our break point the caption is a red fire hydrants sitting on the side-of-the-road and our boolean is false he continue hit refresh we can see that the status has been project. We navigate back to our images and we can see …now there is something under the rejected …we had successfully moderated an image of something that is not a car. In this video we have shown you how easy it is to get started with …azure functions directly in the portal and the various types of triggers that you can set we have also walked through the azure government functions sample which is a simple web application that utilize functions for an image moderation scenario we highly recommend that you navigate to our azure government functions sample where you can follow the detail documentation to set this up on your local machine and see the power of functions for yourself.

Posts created 22719

Leave a Reply

Your email address will not be published. Required fields are marked *

Begin typing your search term above and press enter to search. Press ESC to cancel.

Back To Top