One Developer
One Developer

Reputation: 566

How to set the primaryConnectionString for Azure servicebus using cli?

How to set the primaryConnectionString for Azure servicebus using az cli? Would this work?

az servicebus namespace authorization-rule update --set primaryConnectionString "connection string"

Upvotes: 1

Views: 242

Answers (1)

suziki
suziki

Reputation: 14088

Update:

If you want to set your own key as a PrimaryKey, it is not possiable.

Original:

Please use the code below:

az servicebus namespace authorization-rule keys renew --key PrimaryKey --name xxx --namespace-name xxxxxx --resource-group xxxxxx --subscription xxxxxx

And please refer to this doc:

https://learn.microsoft.com/en-us/cli/azure/servicebus/namespace/authorization-rule/keys?view=azure-cli-latest#az_servicebus_namespace_authorization_rule_keys_renew

Upvotes: 1

Related Questions