I want to create event grid topic dynamically. Whenever my azure function is triggered, it will create new topic based on input it gets. I just want to know if there is any way I can create azure topic without going to azure portal.
Asked
Active
Viewed 1,155 times
2
-
1you can use for example the REST APIs, see more details in the https://learn.microsoft.com/en-us/rest/api/eventgrid/ – Roman Kiss Nov 26 '19 at 09:05
-
Thanks. This is what I looking for. – Shrirang Nov 28 '19 at 05:46
-
1Note, that the AEG has a limit for number of custom topics such as 100. I do recommend to create an event domain topics, where the limit is 100,000 per event domain. – Roman Kiss Nov 28 '19 at 06:21
-
Yes I know that. Thanks for sharing. Can you know answer this question please if you know how to do it? https://stackoverflow.com/questions/59083546/how-to-create-event-grid-domain-topic-subscription-using-rest-api – Shrirang Nov 28 '19 at 07:20
-
See my answer for that question. – Roman Kiss Nov 28 '19 at 08:15
2 Answers
2
There is an EventGrid management library Microsoft.Azure.Management.EventGrid (documentation) for .NET that you could use.

Sean Feldman
- 23,443
- 7
- 55
- 80
-
That's not what I am looking for. I know how to publish and consume event. I posted answer below. – Shrirang Nov 28 '19 at 05:52
-
4The library I've linked to is **not** for publishing and subscribing. It's designed for _management_ operations. Not the same as `Microsoft.Azure.EventGrid`, which is used to publish events. – Sean Feldman Nov 28 '19 at 06:03
1
@Roman Kiss answer: REST APIs, see more details in the https://learn.microsoft.com/en-us/rest/api/eventgrid/. You can create event topic by calling microsoft rest api.

Shrirang
- 1,286
- 10
- 23
-
1
-
1
-
1https://learn.microsoft.com/en-us/rest/api/eventgrid/ Here is the latest link. I don't know why Microsoft keep updating their rest api links. – Shrirang Jul 19 '21 at 06:28