问题描述
在 C# 中检索由 Azure EventGrid 域封装的主题名称列表的最佳方法是什么?
使用 Azure-CLI 很容易做到这一点,但很难在 C# 中找到这样的例子.我看过
What is the best way to retrieve a list of topic names that are encapsulated by an Azure EventGrid Domain in C#?
It is easy enough to do this with Azure-CLI, but struggling to find examples of this in C#. I've looked at EventGridManagementClient with usage sample here, however, I feel there is too much overhead to try and get this to work, mainly to do with credentials and authentication.
You can use the REST API call Domain Topics - List By Domain to get the list all the topics in a domain.Once your application has an Authorization Bearer access token, you can get any resource.
Have a look at my article Azure Event Grid Tester based on the Azure API Management using a REST API calls.
The following screen snippet shows getting a list of all the topics in a domain by Azure Event Grid Tester:
这篇关于如何在 C# 中获取 Azure EventGrid 域中现有主题的列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!