 Hi there and welcome to another edition of Tuesdays with Corey. We are not live. We are on the show today with Mr. Dan Rossanova, who is the product manager in charge of the recently launched Azure Event Grid. Azure Event Grid, I'm going to take a pass at this. You tell me if I got it because I've been talking to a lot of people about it. So the way to think about this is you got a bunch of, let's say, serverless capabilities, things like Azure Functions or things like Azure Logic Apps. They know servers underneath, they run code, they can launch execution, and they're all event-driven. So basically an event fires and your Azure function runs. So it's super cool and we've seen a lot of usage in those capabilities. But there's half of that's missing. Half of that's missing is managing the events itself. This is what this new Azure Event Grid service does. It basically allows you to, from any source to any destination, it doesn't even have to be those serverless products, you can now fire an event and react to an event all using Azure Event Grid as a single place to manage and host all of the events that you want to run across the platform. Is that the right? Yeah, that's it. Wow. Pretty good. It's a cool service. It is. So you've been working on this one. How long, how would you use like six months, five months, something like that? Some active development, yeah. Yeah, it's got it. Good, good, good. So this is, and it's built on service fabric. It is, yeah. It's built on service fabric which enables the scale and so on. Anything about it that you're like, I'd love it. One of the things that I think is really unique about it is not only can you subscribe or be delivering all these events around, you get some intelligence in that, so you can get only the intent events that you want, yeah, which is pretty important. Again, it treats events as like first class. Absolutely. So you can now filter them, you can do what, like prefix base, event type base, what have you. Yep, and even suffix. Yeah. Oh, that's the end suffix. Just in case. We call it ends width. Ends width, ends width versus starts width. Yes. Yes. Okay. Begins width. What's that? Begins width, yeah. I don't know why you had to change that. Okay, so today you're going to show us a demo. Yeah, absolutely. What is this demo going to be? So in addition, one of the things that's really cool about Grid is in addition to being able to react to all of the stuff going on in Azure. Yes. You actually get the same exact experience in technology for your own application. Yes. So you can send your own events and other people can subscribe to them. So like custom events can go through this sucker. Absolutely. That's really nice. And so the thing we're going to start with today is using actually CloudShelf to go create our own event Grid topic. Yes. And then send some events to it with Curl. Okay. So this is like the 100-level couple commands to get started. But 100-level for developers, right? Because this means you're using custom events, you're listening to custom events. Cool. And you're in CloudShelf. And you're in CloudShelf. So you're probably close to me. Yeah, yeah. Okay, developer. Okay, okay. Well, let's go in and take a little look and see what we got here. All right, so the first thing I'm going to do, I have the Azure CLI running right now. I might actually make that full screen. Make it full screen. Just not be so obnoxious. And the first thing I'm going to do is put in a command to create my custom topic. And that topic is going to get a name, whatever I want it to be. And I'm going to call this Dan's topic. So let's say you're saying topic creating this. So just to be clear, this topic is your endpoint for custom events. Yeah, this is where I will send custom events. Got it. And so all you're saying here is you've got a resource group, you've got a location, you've got a name. Yep. Boom. And now you can send events to your heart's desire. Is that right? Well, after I hit enter. After you hit enter. Yeah. So this is going to spin up here. It's actually creating a fully qualified domain name off of that. Of course, because that's where the rest endpoint will be. Got it. And standing up. And so this is like a fully managed service. This is like, there's no VMs, it's nothing. And it will scale very high. So that's a core to the design. That's right. Again, that's service traffic underpinnings. Yeah. Absolutely. Yeah. So when this command runs here, it's going behind the scenes and creating this piece for me. And then the next command I'm going to run. And I'm actually going to cheat and go. Nope, there you go. You can see. Well, I'm going to cheat and get the next command. OK, I'll tab up to get the next command. All right. So what I want to do, when I send to this, I need to send a key. So it's authenticated. So I'm going to list the keys on that. And actually, I listed them on the wrong one. So here, let's list on topic 10. 10. Got it. And so these are now the keys for you to be able to send events to. To post, yeah. To use for my HTTP post. And then the next thing I'm going to do is create a subscription on that topic. And so my topic was 10. And this is going to let me send those events to someplace that I care about. So what is the subscription versus topic? Tell me a little bit about the subscription. Yeah, so the topic is the source. The publisher uses the topic as the channel to output data. Yes. And when I want some data, I'm going to go subscribe with a filter. I see. So this is the listener now. Yes, now I'm the listener. I see. So to create the topic, that's all you need to do for the customer event. And then you can have listeners, built-in listeners, like functions even straight from there. All kinds. But this now you're creating a custom listener, as well as a custom event. Yes. And to make this super easy, I'm actually just going to go to request bin. You see? Am I making you uncomfortable, Dan? No, you're not. OK. So I'm just going to go. I was trying to. I four-old your brother. It's nothing that makes me uncomfortable. So I'm going to go to request bin if it's a tool that you haven't seen or people haven't seen before. It's pretty cool. It's for testing agents. It's like an open source. Yeah, it's open source. Public event driven. It's a tool. Like it's not Azure thing. No, not Azure at all. And so I just created a request bin. It's giving me the short URL that I can use. I see. So the key P here is that this is basically, this is sort of your webhook. Yeah. This is where the webhook is going to be yet. Standing in because I haven't written a webhook yet. And so now if I come into here. Oh, and so this is now giving the endpoint. This is saying send the events here. Yes, this is the here. So I'm saying OK. This is the here. And I put in that address, hit Create. And now what it's going to do is actually go subscribe to that custom topic. Yes. And then tell me when it's done. And then I connect to this URL. So just to make sure I get this. So you now have an application topic that you've created. Super simple API. Now you've also submitted effectively a subscription. Someone that's going to listen to this. That's at this given endpoint. Now you could create 10, 20, 30 of these. So you can create all the subscription subscribers that you want to. And so this single event will fire from your custom topic, your custom event. And then it will go to all those subscribers. And they will do whatever they want. Unlimited. Absolutely. And you can see here when I created my topic, I got a URL for it. So that's where my topic lives. That's where your topic lives. And when I created my subscription, it's even telling me, well, where did I tell it to send the events? So I can see it's a web book. So both of these are the rest of it here. Yep, got it. Now I'm all ready to send data here. And if I come up to a curl command. And again, curl is just something we use test web stuff with. You know what? I don't know if I put the curl one in here. I have it. I'll just type it out. This is going to be a good challenge. Yes. It's going to challenge him to go type this curl command right in the screen. He copied and pasted it from another document right in the screen. And so mainly because I'm doing a second curl here. So what do you do? You have some people to see what you're doing here. What's going on here? So I did a curl to go get some body of a custom event that I want to publish here. It's a JSON object. And then I'm going to load it into a variable here in Bash. And I'll echo that out so you can see what it is. Let me see what that is. Yep. And I want to put quotes on that. And then we can see that here is the JSON that's going to be sent. OK, got it. I'm using some Bash stuff in there to do real late time. Motorcycles. Yeah, this one's for me. My subject's motorcycles. OK. And now if I actually want to send this event, this is pretty easy too. I do a curl. I need to use the key that I got from before. And I need to use the endpoint. And you're sending the body here. Yep. And I'm using the body. So it's the endpoint. So you've got to copy this in now, Gray. And so this will be pretty easy. There's my key. And now to give the endpoint that I want to send to, which is just a little bit higher up from this original output. I see. And that's the event endpoint. Yep. This is where do I want to send my request. Now like if I was just writing an app that wanted to use this, of course I wouldn't use curl. I'd actually post the stuff I want to post. Yeah, this curl command, if you look at it, we're just telling it, do HTTP post. Do put the header in for auth. Yes. And then send it to this specific URL. And when I go send this, it came back and said OK. And if I go refresh my request bin, what I'll see here is that it's the body of what I just sent. That was sent to this event. And now I'm taking care of it for you. Wow. And so you can have 100,000 of these listeners of functions, logic gaps, third party. Absolutely. Cool. Yeah. All events, first class. That's what I like. I like everything first class. We actually have a logic gaps one in here as well if you want to see it real quick. You have a logic gaps. Oh, listening. OK, pull it up. This one is using a little bit of the magic of television because we've pre-created it. Actually, we didn't create the logic gap, but I'll show it to you. I'll show you with the experience. There's very little magic associated with the show. Sorry, Rick. Rick's a great producer. So here what I want to do is listen. You are making you uncomfortable, Rick. Are we going to edit all this out? OK, logic gaps. Yes. So what I want to do here is actually create a logic gap to tell me when someone creates a VM. Yes, of course. I think my Azure subscription. Of course. So what I can do is a great example of this is just serverless automation is effectively what you're creating right now. Absolutely, especially when you get to things like your production subscriptions, you want to know who's doing what. So here I can go into the logic gaps designer, create a blank logic gap. Everyone likes logic gaps. Once you see this, you'll see why. Type in Event Grid. I already do that. Well, there you go. I don't know how to do it even more. So Event Grid's just built in right now. Event Grid's built in right now. I can click right on Event Grid. Opens up. Gives me options of what I want to listen to in Event Grid. And so here I'm going to pick my Azure subscription that I want to listen to. This is just showing me right now. Yeah, it's pretty cool. This team does good work. So now I'm saying in this Azure subscription, listen for these types of events. I haven't even called it Azure Event Grid, but it could be anything. It does. And you can see that I can listen to my custom. Like I can go listen to that custom topic right here. Right? And fire logic. Yeah, I can go browse and listen to that right now. But I can also listen to Microsoft resource manager. I see. So I can say for an entire Azure subscription, give me events within that subscription. And let's filter that down to just to which ones I want to do. And on my next step, I can do something like just pick an action that I want to do. So whenever something happens, I can do a conditional. Or you can do an analysis like oh, there's a VM, right? OK, cool. And do routing. And then do things like send an email. If you have not played with Logic Apps, you should. We should get someone to do Logic Apps on this show if we haven't yet. OK. Oh, we should. Because this is how cool this is now. I want to send an email. It's going to load that up. And then it's actually context-driven. So when I click here on the two, I'll just put myself in. But you can see it gives me a context menu. So I can say what's the subject, what's the type. Based on the event that's coming through. Yes, on the previous step. So this ID, if I drag ID into the body field, it's going to be the full ARM path of the VM that was created. It will be in the email that you send out. Just within a couple seconds, you build that out. Wow. Just hit save, and it's done. And you can, of course, do this with functions as well. It's got the built-in support and functions as well. But this is super cool, a user experience in Logic Apps. And there's even a step here if you want to tag a VM. There's a tag. There's a VM tagging step. Very cool. Dan, this is awesome. So we showed this launch of this new service that is an event as a first-class service. We showed custom events. We showed the listening by third-party custom event listener. But then we also showed integration deeply with Logic Apps and the API side of the house to be able to create events using APIs, and then Logic Apps to be able to fire them and walk through them. And I mean, you can do the combinations here or endless. Application created that then will fire a Logic App or something tied with the ARM API that then will fire some third-party thing. All we're using a webhook. All this is possible. And it's just incoming, outgoing, boom. That's the picture. I like that picture. You like that picture? Thank you, Dan. This is awesome. This is a great demo. I think it's really cool. We should probably do more demos on this. We will plan to do more demos on this. But this is a good taste of what we've got with Azure Logic Apps. Just went live last Wednesday. So please go try it out. It is public preview. So everyone can go use this, like there's no tomorrow. Yes, OK. And please go try it out. So thank you, Dan. And thank you. Have a wonderful Tuesday. If you've got questions or comments, you can hit us up on hashtag AzureTWC. That stands for Tuesdays with Corey. And with that, have a great day. All right. You ready, Rick? I'm excited. What are you doing? All right, let's see here. 12, 20. OK, good. All right. We have to do it. I'm going to get you out of it. He doesn't understand. He's like, that clapped was an event, man. All right. You ready? Yeah. All right.