I'm using the Azure Management libraries for .NET with Azure Service Bus. My objective is to create an Shared access policy with Send and Listen claims. I can do this in the Azure Portal.
IServiceBusNamespace serviceBus = ...
IBlank policyDefinition = serviceBus.AuthorizationRules.Define("MySendAndListenPolicy2");
From IBlank
I can call WithListeningEnabled()
or WithSendingEnabled()
. Both return an IWithCreate
, which I can only create the rule from (i.e. Create()
and CreateAsync()
. There doesn't seem to be an option to configure both Send and Listen.
How can I create a policy with Send and Listen using the Azure Management .NET SDK?
I've achieved this by using the Inner objects of the fluent API.
This successfully created the policy