Class SubscriptionRule
Manages a ServiceBus Subscription Rule.
Example Usage (SQL Filter)
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
{
Location = "West Europe",
});
var exampleNamespace = new Azure.ServiceBus.Namespace("exampleNamespace", new Azure.ServiceBus.NamespaceArgs
{
Location = exampleResourceGroup.Location,
ResourceGroupName = exampleResourceGroup.Name,
Sku = "Standard",
Tags =
{
{ "source", "example" },
},
});
var exampleTopic = new Azure.ServiceBus.Topic("exampleTopic", new Azure.ServiceBus.TopicArgs
{
ResourceGroupName = exampleResourceGroup.Name,
NamespaceName = exampleNamespace.Name,
EnablePartitioning = true,
});
var exampleSubscription = new Azure.ServiceBus.Subscription("exampleSubscription", new Azure.ServiceBus.SubscriptionArgs
{
ResourceGroupName = exampleResourceGroup.Name,
NamespaceName = exampleNamespace.Name,
TopicName = exampleTopic.Name,
MaxDeliveryCount = 1,
});
var exampleSubscriptionRule = new Azure.ServiceBus.SubscriptionRule("exampleSubscriptionRule", new Azure.ServiceBus.SubscriptionRuleArgs
{
ResourceGroupName = exampleResourceGroup.Name,
NamespaceName = exampleNamespace.Name,
TopicName = exampleTopic.Name,
SubscriptionName = exampleSubscription.Name,
FilterType = "SqlFilter",
SqlFilter = "colour = 'red'",
});
}
}
Inherited Members
Namespace: Pulumi.Azure.ServiceBus
Assembly: Pulumi.Azure.dll
Syntax
public class SubscriptionRule : CustomResource
Constructors
View SourceSubscriptionRule(String, SubscriptionRuleArgs, CustomResourceOptions)
Create a SubscriptionRule resource with the given unique name, arguments, and options.
Declaration
public SubscriptionRule(string name, SubscriptionRuleArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| SubscriptionRuleArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceAction
Represents set of actions written in SQL language-based syntax that is performed against a BrokeredMessage.
Declaration
public Output<string> Action { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
CorrelationFilter
A correlation_filter block as documented below to be evaluated against a BrokeredMessage. Required when filter_type is set to CorrelationFilter.
Declaration
public Output<SubscriptionRuleCorrelationFilter> CorrelationFilter { get; }
Property Value
| Type | Description |
|---|---|
| Output<SubscriptionRuleCorrelationFilter> |
FilterType
Type of filter to be applied to a BrokeredMessage. Possible values are SqlFilter and CorrelationFilter.
Declaration
public Output<string> FilterType { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Name
Specifies the name of the ServiceBus Subscription Rule. Changing this forces a new resource to be created.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
NamespaceName
The name of the ServiceBus Namespace in which the ServiceBus Topic exists. Changing this forces a new resource to be created.
Declaration
public Output<string> NamespaceName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ResourceGroupName
The name of the resource group in the ServiceBus Namespace exists. Changing this forces a new resource to be created.
Declaration
public Output<string> ResourceGroupName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
SqlFilter
Represents a filter written in SQL language-based syntax that to be evaluated against a BrokeredMessage. Required when filter_type is set to SqlFilter.
Declaration
public Output<string> SqlFilter { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
SubscriptionName
The name of the ServiceBus Subscription in which this Rule should be created. Changing this forces a new resource to be created.
Declaration
public Output<string> SubscriptionName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
TopicName
The name of the ServiceBus Topic in which the ServiceBus Subscription exists. Changing this forces a new resource to be created.
Declaration
public Output<string> TopicName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, SubscriptionRuleState, CustomResourceOptions)
Get an existing SubscriptionRule resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static SubscriptionRule Get(string name, Input<string> id, SubscriptionRuleState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| SubscriptionRuleState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| SubscriptionRule |