Azure Service Bus, Azure Resource Manager, And This Character "/"

Here's an odd one you might have noticed when using special characters in your resource names.  Azure Resource Manager does not support resource names that have "/" in the name!

If you created resource names with "/" in them, for example a queue called queue/account/order, you would have been able to manage these Service Bus Queues, Topics, or WCF Relay entities in the classic Azure Portal.  However, you would not be able to manage these same resources in the new Azure Portal without incurring an error. In fact, any client built on top of an Azure Resource Manager API surface would not be able to create or manage entities with "/".


What is going on here?

Azure Resource Manager (ARM) has an implicit assumption that the names of ARM addressable resources should not contain multiple URI segments in the resource name.

ARM is required to parse the Resource ID URI for routing, authorization, auditing, policy, etc. and all those functions require URI segments to be in pairs, where the first segment in the pair is the resource type and the second segment is the resource name.

For example, in the below ARM ID for a topic, ARM expects the segments in bold to denote the resource “type” and the segments in italics to be the resource name:

/subscriptions/ {sub-id} /resourcegroups/ {resourceGroupName} /provider/Microsoft.ServiceBus/namespaces/myServiceBusNamespace/topics/myTopicName

This assumption in obviously broken in the case of multi-segment topic names that Service Bus and Relays natively support meaning that these specific entities cannot be created or managed with Azure Resource Manager.

As you know, we are planning to off-board Azure Service Bus, Event Hubs, and Relay from the classic Azure Portal on September 15, 2017. If you wanted a portal experience or to manage entities with "/" you wouldn't have one and we don't want to leave our customers in this position!


Getting ARM to recognize
On the Service Bus side we will convert "/" to "~" when interfacing with ARM, but retain the slashes in our back-end so things continue to work the way they are supposed to. However, one small caveat is that entities with slashes in their names may appear with tildes "~" instead in certain blades of the Portal. Please rest assured that nothing is wrong with your entities other than this visual quirk to make this work.

If you want to create a new entity in the portal with slashes you will need to use "~" instead where you would put "/" in the name. To use the example above, creating queue~account~order in the portal will translate to queue/account/order in Service Bus.  And if using an ARM template, notice the use of tildes for the Service Bus topic name:

/subscriptions/ {sub-id} /resourcegroups/ {resourceGroupName} /provider/Microsoft.ServiceBus/namespaces/myServiceBusNamespace/topics/my~Topic~Name


Hope you have found this helpful!


Happy Messaging and Data Streaming,

The Azure Service Bus, Event Hubs, and Relay team

–Relay out–