azureservicebusazure-cliazure-servicebus-topicsazure-servicebus-subscriptions

How to Create Azure Servicebus Topic Custom Correlation Filter using the CLI


I am able to create a system properties correlation filter using this syntax:

az servicebus topic subscription rule create --name "rulename" --namespace-name "my-servicebus" --resource-group "my-rg" --subscription-name "mysub" --filter-type "CorrelationFilter" --topic-name "my-topic" --label="my-value"

What is the CLI syntax for creating a correlation filter using a custom key value pair? (As in the section under "CUSTOM PROPERTIES" in the GUI.)


Solution

  • The way I did it is to revert back to the REST API calling the Management endpint, https://management.azure.com/

    Since doign this, there may be a "native" CLI way to do it, but the REST API technique works fine so we have left it as it is.