Skip to content

Commit

Permalink
Refer to correct article regarding ServiceBusAdministrationClient (#3…
Browse files Browse the repository at this point in the history
…9699)

* refer to correct article regarding ServiceBusAdministrationClient

While the previously referenced CRUD-sample shows CRUD-operations on topics and subscriptions, it does not show any usage of topic filters.

The deletion and creation of topic filters using *RuleFilter is shown in the now linked article.

* Update sdk/servicebus/Azure.Messaging.ServiceBus/samples/Sample12_ManagingRules.md

* Update sdk/servicebus/Azure.Messaging.ServiceBus/samples/Sample12_ManagingRules.md

---------

Co-authored-by: Jesse Squire <[email protected]>
  • Loading branch information
paulroho and jsquire authored Nov 13, 2023
1 parent 2818ef1 commit 615cfcc
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Managing rules

As shown in the [CRUD operations sample](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/servicebus/Azure.Messaging.ServiceBus/samples/Sample07_CrudOperations.md), rules can be created, deleted, and retrieved using the `ServiceBusAdministrationClient`. In order to perform these operations, you need to have `Manage` rights to the Service Bus namespace. When using Azure Identity, this translates to requiring the [Service Bus Data Owner role](https://docs.microsoft.com/azure/role-based-access-control/built-in-roles#azure-service-bus-data-owner) be granted to your identity. It is also possible to perform these rule management operations using the `ServiceBusRuleManager` type. The major benefit to using this type is that you only need `Listen` rights for the subscription you wish to manage rules for, which corresponds to the [Service Bus Data Receiver role](https://docs.microsoft.com/azure/role-based-access-control/built-in-roles#azure-service-bus-data-receiver). The following snippet provides an example of how to use this type.
As shown in the article on [Topic filters and actions](https://learn.microsoft.com/azure/service-bus-messaging/topic-filters), rules can be managed using the `ServiceBusAdministrationClient`. In order to perform these operations, you need to have `Manage` rights to the Service Bus namespace. When using Azure Identity, this translates to requiring the [Service Bus Data Owner role](https://learn.microsoft.com/azure/role-based-access-control/built-in-roles#azure-service-bus-data-owner) be granted to your identity.

It is also possible to perform these rule management operations using the `ServiceBusRuleManager` type. The major benefit to using this type is that you only need `Listen` rights for the subscription you wish to manage rules for, which corresponds to the [Service Bus Data Receiver role](https://learn.microsoft.com/azure/role-based-access-control/built-in-roles#azure-service-bus-data-receiver). The following snippet provides an example of how to use this type.

```C# Snippet:ServiceBusManageRules
string connectionString = "<connection_string>";
Expand Down

0 comments on commit 615cfcc

Please sign in to comment.