# AzureServiceBusRule

- Kind: `class`
- Package: [Aspire.Hosting.Azure.ServiceBus](/reference/api/csharp/aspire.hosting.azure.servicebus.md)
- Version: `13.4.0`
- Namespace: `Aspire.Hosting.Azure`
- Target framework: `net8.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Azure.ServiceBus/AzureServiceBusRule.cs)

Represents a Service Bus Rule. Initializes a new instance of the [AzureServiceBusRule](/reference/api/csharp/aspire.hosting.azure.servicebus/azureservicebusrule.md) class.

## Definition

```csharp
namespace Aspire.Hosting.Azure;

public class AzureServiceBusRule
{
    // ...
}
```

## ATS metadata

### ATS DTO

- Serialized as a plain JSON object without a `$type` discriminator.

## Remarks

Use `AzureProvisioningResourceExtensions.ConfigureInfrastructure` to configure specific `Azure.Provisioning` properties.

## Constructors

- [AzureServiceBusRule(string)](/reference/api/csharp/aspire.hosting.azure.servicebus/azureservicebusrule/constructors.md#constructor-string) -- Represents a Service Bus Rule. Initializes a new instance of the [AzureServiceBusRule](/reference/api/csharp/aspire.hosting.azure.servicebus/azureservicebusrule.md) class.

## Properties

- [CorrelationFilter](/reference/api/csharp/aspire.hosting.azure.servicebus/azureservicebusrule/properties.md#correlationfilter) : [AzureServiceBusCorrelationFilter](/reference/api/csharp/aspire.hosting.azure.servicebus/azureservicebuscorrelationfilter.md) `get; set` -- Properties of correlation filter.
- [FilterType](/reference/api/csharp/aspire.hosting.azure.servicebus/azureservicebusrule/properties.md#filtertype) : [AzureServiceBusFilterType](/reference/api/csharp/aspire.hosting.azure.servicebus/azureservicebusfiltertype.md) `get; set` -- Filter type that is evaluated against a BrokeredMessage.
- [Name](/reference/api/csharp/aspire.hosting.azure.servicebus/azureservicebusrule/properties.md#name) : `string` `get; set` -- The rule name.
