I’m trying to create a topic using ServiceBusAdministrationClient connected through a namespace’s root manage access key
(com.azure:azure-messaging-servicebus:7.8.0)
def createOptions = new CreateTopicOptions()
def authRule = new SharedAccessAuthorizationRule(authRuleName, [AccessRights.SEND, AccessRights.LISTEN])
createOptions.authorizationRules.add(authRule)
def topicProps = administrationClient.createTopic(topicName, createOptions)
but there are no AuthorizationRules associated with the topic.
I did the same thing when creating a queue and it worked.
Any ideas what I might be missing?
2
Answers
There are two different ways to do the required thing.
There is a professional documentation to the series of steps to be followe.
Tutorial: Update inventory using Azure portal and topics/subscriptions
For the authorization rule, you need to use Azure Resource Management library
Below is a sample to create an authorization rule