简体   繁体   中英

Get Azure Service Bus description with SAS key in c#

My project is trying to get various metadata about an Azure ServiceBus. Currently, I am trying to get the ServiceBus Location, and the AccessRghts associated with the SAS key that is being used as auth.

My project is using the old C# SDK (Microsoft.ServiceBus).

There is a NamespaceDescrition Class in the SDK, which contains half the information I need, and a ConnectionDetail Class which contains the other half, but I cannot find any methods that would return either of these objects. They both have empty constructors, so obviously I could create the objects, but I assume that won't populate them with data!

How do I get a populated copy of these objects?

You can make use of Microsoft.Azure.Management.ServiceBus.Fluent library. This is authorized using Service Principal .

This library provides you methods to fetch Namespace details like location, resource group, etc. There are methods available for fetching the SAS keys of the namespaces. In addition CRUD operations can be performed with the Namespaces and Entities under it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM