I have implemented an Azure Service Bus REST API client. At the moment I am building xUnit tests for my REST project and need to create a Queue with a name provided by the test, send messages with the REST client and then delete the Queue with that specific name.
One of my requirements are to specify a Shared Access Policy for the newly created Queue with only Send permissions programmatically but I can't find anything online that suggests that this is possible.
So far I have this
TokenProvider credentials = TokenProvider.CreateSharedAccessSignatureTokenProvider("MyBusAccessPolicy", "XXXXXXXXXXXXXXXX");
NamespaceManager namespaceManager = new NamespaceManager(ServiceBusEnvironment.CreateServiceUri("sb", _serviceNamespace, string.Empty), credentials);
QueueDescription queueDescription = await namespaceManager.CreateQueueAsync(queueName);
How would I proceed to create the Shared Access Policy specifically for that queue if even possible?
Neil,
Something like this should work: