[英]Get Azure Service Bus description with SAS key in c#
My project is trying to get various metadata about an Azure ServiceBus. 我的项目正在尝试获取有关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.
当前,我正在尝试获取ServiceBus位置以及与正用作身份验证的SAS密钥关联的AccessRghts。
My project is using the old C# SDK (Microsoft.ServiceBus). 我的项目正在使用旧的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. SDK中有一个NamespaceDescrition类 ,其中包含我需要的一半信息,而ConnectionDetail类中包含另一半信息,但是我找不到任何会返回这些对象中任何一个的方法。 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. 您可以使用Microsoft.Azure.Management.ServiceBus.Fluent库。 This is authorized using Service Principal .
这是使用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. 该库为您提供了获取名称空间详细信息(例如位置,资源组等)的方法。有些方法可用于获取名称空间的SAS密钥。 In addition CRUD operations can be performed with the Namespaces and Entities under it.
另外,CRUD操作可以在其下的命名空间和实体下执行。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.