1. Packages
  2. Azure Classic
  3. API Docs
  4. eventhub
  5. SubscriptionRule

We recommend using Azure Native.

Azure Classic v5.70.0 published on Wednesday, Mar 27, 2024 by Pulumi

azure.eventhub.SubscriptionRule

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.70.0 published on Wednesday, Mar 27, 2024 by Pulumi
    Deprecated: azure.eventhub.SubscriptionRule has been deprecated in favor of azure.servicebus.SubscriptionRule

    Manages a ServiceBus Subscription Rule.

    Example Usage

    SQL Filter)

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = new azure.core.ResourceGroup("example", {
        name: "tfex-servicebus-subscription-rule-sql",
        location: "West Europe",
    });
    const exampleNamespace = new azure.servicebus.Namespace("example", {
        name: "tfex-servicebus-namespace",
        location: example.location,
        resourceGroupName: example.name,
        sku: "Standard",
        tags: {
            source: "example",
        },
    });
    const exampleTopic = new azure.servicebus.Topic("example", {
        name: "tfex_servicebus_topic",
        namespaceId: exampleNamespace.id,
        enablePartitioning: true,
    });
    const exampleSubscription = new azure.servicebus.Subscription("example", {
        name: "tfex_servicebus_subscription",
        topicId: exampleTopic.id,
        maxDeliveryCount: 1,
    });
    const exampleSubscriptionRule = new azure.servicebus.SubscriptionRule("example", {
        name: "tfex_servicebus_rule",
        subscriptionId: exampleSubscription.id,
        filterType: "SqlFilter",
        sqlFilter: "colour = 'red'",
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.core.ResourceGroup("example",
        name="tfex-servicebus-subscription-rule-sql",
        location="West Europe")
    example_namespace = azure.servicebus.Namespace("example",
        name="tfex-servicebus-namespace",
        location=example.location,
        resource_group_name=example.name,
        sku="Standard",
        tags={
            "source": "example",
        })
    example_topic = azure.servicebus.Topic("example",
        name="tfex_servicebus_topic",
        namespace_id=example_namespace.id,
        enable_partitioning=True)
    example_subscription = azure.servicebus.Subscription("example",
        name="tfex_servicebus_subscription",
        topic_id=example_topic.id,
        max_delivery_count=1)
    example_subscription_rule = azure.servicebus.SubscriptionRule("example",
        name="tfex_servicebus_rule",
        subscription_id=example_subscription.id,
        filter_type="SqlFilter",
        sql_filter="colour = 'red'")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/servicebus"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
    			Name:     pulumi.String("tfex-servicebus-subscription-rule-sql"),
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleNamespace, err := servicebus.NewNamespace(ctx, "example", &servicebus.NamespaceArgs{
    			Name:              pulumi.String("tfex-servicebus-namespace"),
    			Location:          example.Location,
    			ResourceGroupName: example.Name,
    			Sku:               pulumi.String("Standard"),
    			Tags: pulumi.StringMap{
    				"source": pulumi.String("example"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		exampleTopic, err := servicebus.NewTopic(ctx, "example", &servicebus.TopicArgs{
    			Name:               pulumi.String("tfex_servicebus_topic"),
    			NamespaceId:        exampleNamespace.ID(),
    			EnablePartitioning: pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		exampleSubscription, err := servicebus.NewSubscription(ctx, "example", &servicebus.SubscriptionArgs{
    			Name:             pulumi.String("tfex_servicebus_subscription"),
    			TopicId:          exampleTopic.ID(),
    			MaxDeliveryCount: pulumi.Int(1),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = servicebus.NewSubscriptionRule(ctx, "example", &servicebus.SubscriptionRuleArgs{
    			Name:           pulumi.String("tfex_servicebus_rule"),
    			SubscriptionId: exampleSubscription.ID(),
    			FilterType:     pulumi.String("SqlFilter"),
    			SqlFilter:      pulumi.String("colour = 'red'"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Azure.Core.ResourceGroup("example", new()
        {
            Name = "tfex-servicebus-subscription-rule-sql",
            Location = "West Europe",
        });
    
        var exampleNamespace = new Azure.ServiceBus.Namespace("example", new()
        {
            Name = "tfex-servicebus-namespace",
            Location = example.Location,
            ResourceGroupName = example.Name,
            Sku = "Standard",
            Tags = 
            {
                { "source", "example" },
            },
        });
    
        var exampleTopic = new Azure.ServiceBus.Topic("example", new()
        {
            Name = "tfex_servicebus_topic",
            NamespaceId = exampleNamespace.Id,
            EnablePartitioning = true,
        });
    
        var exampleSubscription = new Azure.ServiceBus.Subscription("example", new()
        {
            Name = "tfex_servicebus_subscription",
            TopicId = exampleTopic.Id,
            MaxDeliveryCount = 1,
        });
    
        var exampleSubscriptionRule = new Azure.ServiceBus.SubscriptionRule("example", new()
        {
            Name = "tfex_servicebus_rule",
            SubscriptionId = exampleSubscription.Id,
            FilterType = "SqlFilter",
            SqlFilter = "colour = 'red'",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.core.ResourceGroup;
    import com.pulumi.azure.core.ResourceGroupArgs;
    import com.pulumi.azure.servicebus.Namespace;
    import com.pulumi.azure.servicebus.NamespaceArgs;
    import com.pulumi.azure.servicebus.Topic;
    import com.pulumi.azure.servicebus.TopicArgs;
    import com.pulumi.azure.servicebus.Subscription;
    import com.pulumi.azure.servicebus.SubscriptionArgs;
    import com.pulumi.azure.servicebus.SubscriptionRule;
    import com.pulumi.azure.servicebus.SubscriptionRuleArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new ResourceGroup("example", ResourceGroupArgs.builder()        
                .name("tfex-servicebus-subscription-rule-sql")
                .location("West Europe")
                .build());
    
            var exampleNamespace = new Namespace("exampleNamespace", NamespaceArgs.builder()        
                .name("tfex-servicebus-namespace")
                .location(example.location())
                .resourceGroupName(example.name())
                .sku("Standard")
                .tags(Map.of("source", "example"))
                .build());
    
            var exampleTopic = new Topic("exampleTopic", TopicArgs.builder()        
                .name("tfex_servicebus_topic")
                .namespaceId(exampleNamespace.id())
                .enablePartitioning(true)
                .build());
    
            var exampleSubscription = new Subscription("exampleSubscription", SubscriptionArgs.builder()        
                .name("tfex_servicebus_subscription")
                .topicId(exampleTopic.id())
                .maxDeliveryCount(1)
                .build());
    
            var exampleSubscriptionRule = new SubscriptionRule("exampleSubscriptionRule", SubscriptionRuleArgs.builder()        
                .name("tfex_servicebus_rule")
                .subscriptionId(exampleSubscription.id())
                .filterType("SqlFilter")
                .sqlFilter("colour = 'red'")
                .build());
    
        }
    }
    
    resources:
      example:
        type: azure:core:ResourceGroup
        properties:
          name: tfex-servicebus-subscription-rule-sql
          location: West Europe
      exampleNamespace:
        type: azure:servicebus:Namespace
        name: example
        properties:
          name: tfex-servicebus-namespace
          location: ${example.location}
          resourceGroupName: ${example.name}
          sku: Standard
          tags:
            source: example
      exampleTopic:
        type: azure:servicebus:Topic
        name: example
        properties:
          name: tfex_servicebus_topic
          namespaceId: ${exampleNamespace.id}
          enablePartitioning: true
      exampleSubscription:
        type: azure:servicebus:Subscription
        name: example
        properties:
          name: tfex_servicebus_subscription
          topicId: ${exampleTopic.id}
          maxDeliveryCount: 1
      exampleSubscriptionRule:
        type: azure:servicebus:SubscriptionRule
        name: example
        properties:
          name: tfex_servicebus_rule
          subscriptionId: ${exampleSubscription.id}
          filterType: SqlFilter
          sqlFilter: colour = 'red'
    

    Correlation Filter)

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = new azure.core.ResourceGroup("example", {
        name: "tfex-servicebus-subscription-rule-cor",
        location: "West Europe",
    });
    const exampleNamespace = new azure.servicebus.Namespace("example", {
        name: "tfex-servicebus-namespace",
        location: example.location,
        resourceGroupName: example.name,
        sku: "Standard",
        tags: {
            source: "example",
        },
    });
    const exampleTopic = new azure.servicebus.Topic("example", {
        name: "tfex_servicebus_topic",
        namespaceId: exampleNamespace.id,
        enablePartitioning: true,
    });
    const exampleSubscription = new azure.servicebus.Subscription("example", {
        name: "tfex_servicebus_subscription",
        topicId: exampleTopic.id,
        maxDeliveryCount: 1,
    });
    const exampleSubscriptionRule = new azure.servicebus.SubscriptionRule("example", {
        name: "tfex_servicebus_rule",
        subscriptionId: exampleSubscription.id,
        filterType: "CorrelationFilter",
        correlationFilter: {
            correlationId: "high",
            label: "red",
            properties: {
                customProperty: "value",
            },
        },
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.core.ResourceGroup("example",
        name="tfex-servicebus-subscription-rule-cor",
        location="West Europe")
    example_namespace = azure.servicebus.Namespace("example",
        name="tfex-servicebus-namespace",
        location=example.location,
        resource_group_name=example.name,
        sku="Standard",
        tags={
            "source": "example",
        })
    example_topic = azure.servicebus.Topic("example",
        name="tfex_servicebus_topic",
        namespace_id=example_namespace.id,
        enable_partitioning=True)
    example_subscription = azure.servicebus.Subscription("example",
        name="tfex_servicebus_subscription",
        topic_id=example_topic.id,
        max_delivery_count=1)
    example_subscription_rule = azure.servicebus.SubscriptionRule("example",
        name="tfex_servicebus_rule",
        subscription_id=example_subscription.id,
        filter_type="CorrelationFilter",
        correlation_filter=azure.servicebus.SubscriptionRuleCorrelationFilterArgs(
            correlation_id="high",
            label="red",
            properties={
                "customProperty": "value",
            },
        ))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/servicebus"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
    			Name:     pulumi.String("tfex-servicebus-subscription-rule-cor"),
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleNamespace, err := servicebus.NewNamespace(ctx, "example", &servicebus.NamespaceArgs{
    			Name:              pulumi.String("tfex-servicebus-namespace"),
    			Location:          example.Location,
    			ResourceGroupName: example.Name,
    			Sku:               pulumi.String("Standard"),
    			Tags: pulumi.StringMap{
    				"source": pulumi.String("example"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		exampleTopic, err := servicebus.NewTopic(ctx, "example", &servicebus.TopicArgs{
    			Name:               pulumi.String("tfex_servicebus_topic"),
    			NamespaceId:        exampleNamespace.ID(),
    			EnablePartitioning: pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		exampleSubscription, err := servicebus.NewSubscription(ctx, "example", &servicebus.SubscriptionArgs{
    			Name:             pulumi.String("tfex_servicebus_subscription"),
    			TopicId:          exampleTopic.ID(),
    			MaxDeliveryCount: pulumi.Int(1),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = servicebus.NewSubscriptionRule(ctx, "example", &servicebus.SubscriptionRuleArgs{
    			Name:           pulumi.String("tfex_servicebus_rule"),
    			SubscriptionId: exampleSubscription.ID(),
    			FilterType:     pulumi.String("CorrelationFilter"),
    			CorrelationFilter: &servicebus.SubscriptionRuleCorrelationFilterArgs{
    				CorrelationId: pulumi.String("high"),
    				Label:         pulumi.String("red"),
    				Properties: pulumi.StringMap{
    					"customProperty": pulumi.String("value"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Azure.Core.ResourceGroup("example", new()
        {
            Name = "tfex-servicebus-subscription-rule-cor",
            Location = "West Europe",
        });
    
        var exampleNamespace = new Azure.ServiceBus.Namespace("example", new()
        {
            Name = "tfex-servicebus-namespace",
            Location = example.Location,
            ResourceGroupName = example.Name,
            Sku = "Standard",
            Tags = 
            {
                { "source", "example" },
            },
        });
    
        var exampleTopic = new Azure.ServiceBus.Topic("example", new()
        {
            Name = "tfex_servicebus_topic",
            NamespaceId = exampleNamespace.Id,
            EnablePartitioning = true,
        });
    
        var exampleSubscription = new Azure.ServiceBus.Subscription("example", new()
        {
            Name = "tfex_servicebus_subscription",
            TopicId = exampleTopic.Id,
            MaxDeliveryCount = 1,
        });
    
        var exampleSubscriptionRule = new Azure.ServiceBus.SubscriptionRule("example", new()
        {
            Name = "tfex_servicebus_rule",
            SubscriptionId = exampleSubscription.Id,
            FilterType = "CorrelationFilter",
            CorrelationFilter = new Azure.ServiceBus.Inputs.SubscriptionRuleCorrelationFilterArgs
            {
                CorrelationId = "high",
                Label = "red",
                Properties = 
                {
                    { "customProperty", "value" },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.core.ResourceGroup;
    import com.pulumi.azure.core.ResourceGroupArgs;
    import com.pulumi.azure.servicebus.Namespace;
    import com.pulumi.azure.servicebus.NamespaceArgs;
    import com.pulumi.azure.servicebus.Topic;
    import com.pulumi.azure.servicebus.TopicArgs;
    import com.pulumi.azure.servicebus.Subscription;
    import com.pulumi.azure.servicebus.SubscriptionArgs;
    import com.pulumi.azure.servicebus.SubscriptionRule;
    import com.pulumi.azure.servicebus.SubscriptionRuleArgs;
    import com.pulumi.azure.servicebus.inputs.SubscriptionRuleCorrelationFilterArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new ResourceGroup("example", ResourceGroupArgs.builder()        
                .name("tfex-servicebus-subscription-rule-cor")
                .location("West Europe")
                .build());
    
            var exampleNamespace = new Namespace("exampleNamespace", NamespaceArgs.builder()        
                .name("tfex-servicebus-namespace")
                .location(example.location())
                .resourceGroupName(example.name())
                .sku("Standard")
                .tags(Map.of("source", "example"))
                .build());
    
            var exampleTopic = new Topic("exampleTopic", TopicArgs.builder()        
                .name("tfex_servicebus_topic")
                .namespaceId(exampleNamespace.id())
                .enablePartitioning(true)
                .build());
    
            var exampleSubscription = new Subscription("exampleSubscription", SubscriptionArgs.builder()        
                .name("tfex_servicebus_subscription")
                .topicId(exampleTopic.id())
                .maxDeliveryCount(1)
                .build());
    
            var exampleSubscriptionRule = new SubscriptionRule("exampleSubscriptionRule", SubscriptionRuleArgs.builder()        
                .name("tfex_servicebus_rule")
                .subscriptionId(exampleSubscription.id())
                .filterType("CorrelationFilter")
                .correlationFilter(SubscriptionRuleCorrelationFilterArgs.builder()
                    .correlationId("high")
                    .label("red")
                    .properties(Map.of("customProperty", "value"))
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: azure:core:ResourceGroup
        properties:
          name: tfex-servicebus-subscription-rule-cor
          location: West Europe
      exampleNamespace:
        type: azure:servicebus:Namespace
        name: example
        properties:
          name: tfex-servicebus-namespace
          location: ${example.location}
          resourceGroupName: ${example.name}
          sku: Standard
          tags:
            source: example
      exampleTopic:
        type: azure:servicebus:Topic
        name: example
        properties:
          name: tfex_servicebus_topic
          namespaceId: ${exampleNamespace.id}
          enablePartitioning: true
      exampleSubscription:
        type: azure:servicebus:Subscription
        name: example
        properties:
          name: tfex_servicebus_subscription
          topicId: ${exampleTopic.id}
          maxDeliveryCount: 1
      exampleSubscriptionRule:
        type: azure:servicebus:SubscriptionRule
        name: example
        properties:
          name: tfex_servicebus_rule
          subscriptionId: ${exampleSubscription.id}
          filterType: CorrelationFilter
          correlationFilter:
            correlationId: high
            label: red
            properties:
              customProperty: value
    

    Create SubscriptionRule Resource

    new SubscriptionRule(name: string, args: SubscriptionRuleArgs, opts?: CustomResourceOptions);
    @overload
    def SubscriptionRule(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         action: Optional[str] = None,
                         correlation_filter: Optional[SubscriptionRuleCorrelationFilterArgs] = None,
                         filter_type: Optional[str] = None,
                         name: Optional[str] = None,
                         sql_filter: Optional[str] = None,
                         subscription_id: Optional[str] = None)
    @overload
    def SubscriptionRule(resource_name: str,
                         args: SubscriptionRuleArgs,
                         opts: Optional[ResourceOptions] = None)
    func NewSubscriptionRule(ctx *Context, name string, args SubscriptionRuleArgs, opts ...ResourceOption) (*SubscriptionRule, error)
    public SubscriptionRule(string name, SubscriptionRuleArgs args, CustomResourceOptions? opts = null)
    public SubscriptionRule(String name, SubscriptionRuleArgs args)
    public SubscriptionRule(String name, SubscriptionRuleArgs args, CustomResourceOptions options)
    
    type: azure:eventhub:SubscriptionRule
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args SubscriptionRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args SubscriptionRuleArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args SubscriptionRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SubscriptionRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SubscriptionRuleArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    SubscriptionRule Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The SubscriptionRule resource accepts the following input properties:

    FilterType string
    Type of filter to be applied to a BrokeredMessage. Possible values are SqlFilter and CorrelationFilter.
    SubscriptionId string
    The ID of the ServiceBus Subscription in which this Rule should be created. Changing this forces a new resource to be created.
    Action string
    Represents set of actions written in SQL language-based syntax that is performed against a BrokeredMessage.
    CorrelationFilter SubscriptionRuleCorrelationFilter
    A correlation_filter block as documented below to be evaluated against a BrokeredMessage. Required when filter_type is set to CorrelationFilter.
    Name string
    Specifies the name of the ServiceBus Subscription Rule. Changing this forces a new resource to be created.
    SqlFilter string
    Represents a filter written in SQL language-based syntax that to be evaluated against a BrokeredMessage. Required when filter_type is set to SqlFilter.
    FilterType string
    Type of filter to be applied to a BrokeredMessage. Possible values are SqlFilter and CorrelationFilter.
    SubscriptionId string
    The ID of the ServiceBus Subscription in which this Rule should be created. Changing this forces a new resource to be created.
    Action string
    Represents set of actions written in SQL language-based syntax that is performed against a BrokeredMessage.
    CorrelationFilter SubscriptionRuleCorrelationFilterArgs
    A correlation_filter block as documented below to be evaluated against a BrokeredMessage. Required when filter_type is set to CorrelationFilter.
    Name string
    Specifies the name of the ServiceBus Subscription Rule. Changing this forces a new resource to be created.
    SqlFilter string
    Represents a filter written in SQL language-based syntax that to be evaluated against a BrokeredMessage. Required when filter_type is set to SqlFilter.
    filterType String
    Type of filter to be applied to a BrokeredMessage. Possible values are SqlFilter and CorrelationFilter.
    subscriptionId String
    The ID of the ServiceBus Subscription in which this Rule should be created. Changing this forces a new resource to be created.
    action String
    Represents set of actions written in SQL language-based syntax that is performed against a BrokeredMessage.
    correlationFilter SubscriptionRuleCorrelationFilter
    A correlation_filter block as documented below to be evaluated against a BrokeredMessage. Required when filter_type is set to CorrelationFilter.
    name String
    Specifies the name of the ServiceBus Subscription Rule. Changing this forces a new resource to be created.
    sqlFilter String
    Represents a filter written in SQL language-based syntax that to be evaluated against a BrokeredMessage. Required when filter_type is set to SqlFilter.
    filterType string
    Type of filter to be applied to a BrokeredMessage. Possible values are SqlFilter and CorrelationFilter.
    subscriptionId string
    The ID of the ServiceBus Subscription in which this Rule should be created. Changing this forces a new resource to be created.
    action string
    Represents set of actions written in SQL language-based syntax that is performed against a BrokeredMessage.
    correlationFilter SubscriptionRuleCorrelationFilter
    A correlation_filter block as documented below to be evaluated against a BrokeredMessage. Required when filter_type is set to CorrelationFilter.
    name string
    Specifies the name of the ServiceBus Subscription Rule. Changing this forces a new resource to be created.
    sqlFilter string
    Represents a filter written in SQL language-based syntax that to be evaluated against a BrokeredMessage. Required when filter_type is set to SqlFilter.
    filter_type str
    Type of filter to be applied to a BrokeredMessage. Possible values are SqlFilter and CorrelationFilter.
    subscription_id str
    The ID of the ServiceBus Subscription in which this Rule should be created. Changing this forces a new resource to be created.
    action str
    Represents set of actions written in SQL language-based syntax that is performed against a BrokeredMessage.
    correlation_filter SubscriptionRuleCorrelationFilterArgs
    A correlation_filter block as documented below to be evaluated against a BrokeredMessage. Required when filter_type is set to CorrelationFilter.
    name str
    Specifies the name of the ServiceBus Subscription Rule. Changing this forces a new resource to be created.
    sql_filter str
    Represents a filter written in SQL language-based syntax that to be evaluated against a BrokeredMessage. Required when filter_type is set to SqlFilter.
    filterType String
    Type of filter to be applied to a BrokeredMessage. Possible values are SqlFilter and CorrelationFilter.
    subscriptionId String
    The ID of the ServiceBus Subscription in which this Rule should be created. Changing this forces a new resource to be created.
    action String
    Represents set of actions written in SQL language-based syntax that is performed against a BrokeredMessage.
    correlationFilter Property Map
    A correlation_filter block as documented below to be evaluated against a BrokeredMessage. Required when filter_type is set to CorrelationFilter.
    name String
    Specifies the name of the ServiceBus Subscription Rule. Changing this forces a new resource to be created.
    sqlFilter String
    Represents a filter written in SQL language-based syntax that to be evaluated against a BrokeredMessage. Required when filter_type is set to SqlFilter.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the SubscriptionRule resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    SqlFilterCompatibilityLevel int
    Id string
    The provider-assigned unique ID for this managed resource.
    SqlFilterCompatibilityLevel int
    id String
    The provider-assigned unique ID for this managed resource.
    sqlFilterCompatibilityLevel Integer
    id string
    The provider-assigned unique ID for this managed resource.
    sqlFilterCompatibilityLevel number
    id str
    The provider-assigned unique ID for this managed resource.
    sql_filter_compatibility_level int
    id String
    The provider-assigned unique ID for this managed resource.
    sqlFilterCompatibilityLevel Number

    Look up Existing SubscriptionRule Resource

    Get an existing SubscriptionRule resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: SubscriptionRuleState, opts?: CustomResourceOptions): SubscriptionRule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            action: Optional[str] = None,
            correlation_filter: Optional[SubscriptionRuleCorrelationFilterArgs] = None,
            filter_type: Optional[str] = None,
            name: Optional[str] = None,
            sql_filter: Optional[str] = None,
            sql_filter_compatibility_level: Optional[int] = None,
            subscription_id: Optional[str] = None) -> SubscriptionRule
    func GetSubscriptionRule(ctx *Context, name string, id IDInput, state *SubscriptionRuleState, opts ...ResourceOption) (*SubscriptionRule, error)
    public static SubscriptionRule Get(string name, Input<string> id, SubscriptionRuleState? state, CustomResourceOptions? opts = null)
    public static SubscriptionRule get(String name, Output<String> id, SubscriptionRuleState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Action string
    Represents set of actions written in SQL language-based syntax that is performed against a BrokeredMessage.
    CorrelationFilter SubscriptionRuleCorrelationFilter
    A correlation_filter block as documented below to be evaluated against a BrokeredMessage. Required when filter_type is set to CorrelationFilter.
    FilterType string
    Type of filter to be applied to a BrokeredMessage. Possible values are SqlFilter and CorrelationFilter.
    Name string
    Specifies the name of the ServiceBus Subscription Rule. Changing this forces a new resource to be created.
    SqlFilter string
    Represents a filter written in SQL language-based syntax that to be evaluated against a BrokeredMessage. Required when filter_type is set to SqlFilter.
    SqlFilterCompatibilityLevel int
    SubscriptionId string
    The ID of the ServiceBus Subscription in which this Rule should be created. Changing this forces a new resource to be created.
    Action string
    Represents set of actions written in SQL language-based syntax that is performed against a BrokeredMessage.
    CorrelationFilter SubscriptionRuleCorrelationFilterArgs
    A correlation_filter block as documented below to be evaluated against a BrokeredMessage. Required when filter_type is set to CorrelationFilter.
    FilterType string
    Type of filter to be applied to a BrokeredMessage. Possible values are SqlFilter and CorrelationFilter.
    Name string
    Specifies the name of the ServiceBus Subscription Rule. Changing this forces a new resource to be created.
    SqlFilter string
    Represents a filter written in SQL language-based syntax that to be evaluated against a BrokeredMessage. Required when filter_type is set to SqlFilter.
    SqlFilterCompatibilityLevel int
    SubscriptionId string
    The ID of the ServiceBus Subscription in which this Rule should be created. Changing this forces a new resource to be created.
    action String
    Represents set of actions written in SQL language-based syntax that is performed against a BrokeredMessage.
    correlationFilter SubscriptionRuleCorrelationFilter
    A correlation_filter block as documented below to be evaluated against a BrokeredMessage. Required when filter_type is set to CorrelationFilter.
    filterType String
    Type of filter to be applied to a BrokeredMessage. Possible values are SqlFilter and CorrelationFilter.
    name String
    Specifies the name of the ServiceBus Subscription Rule. Changing this forces a new resource to be created.
    sqlFilter String
    Represents a filter written in SQL language-based syntax that to be evaluated against a BrokeredMessage. Required when filter_type is set to SqlFilter.
    sqlFilterCompatibilityLevel Integer
    subscriptionId String
    The ID of the ServiceBus Subscription in which this Rule should be created. Changing this forces a new resource to be created.
    action string
    Represents set of actions written in SQL language-based syntax that is performed against a BrokeredMessage.
    correlationFilter SubscriptionRuleCorrelationFilter
    A correlation_filter block as documented below to be evaluated against a BrokeredMessage. Required when filter_type is set to CorrelationFilter.
    filterType string
    Type of filter to be applied to a BrokeredMessage. Possible values are SqlFilter and CorrelationFilter.
    name string
    Specifies the name of the ServiceBus Subscription Rule. Changing this forces a new resource to be created.
    sqlFilter string
    Represents a filter written in SQL language-based syntax that to be evaluated against a BrokeredMessage. Required when filter_type is set to SqlFilter.
    sqlFilterCompatibilityLevel number
    subscriptionId string
    The ID of the ServiceBus Subscription in which this Rule should be created. Changing this forces a new resource to be created.
    action str
    Represents set of actions written in SQL language-based syntax that is performed against a BrokeredMessage.
    correlation_filter SubscriptionRuleCorrelationFilterArgs
    A correlation_filter block as documented below to be evaluated against a BrokeredMessage. Required when filter_type is set to CorrelationFilter.
    filter_type str
    Type of filter to be applied to a BrokeredMessage. Possible values are SqlFilter and CorrelationFilter.
    name str
    Specifies the name of the ServiceBus Subscription Rule. Changing this forces a new resource to be created.
    sql_filter str
    Represents a filter written in SQL language-based syntax that to be evaluated against a BrokeredMessage. Required when filter_type is set to SqlFilter.
    sql_filter_compatibility_level int
    subscription_id str
    The ID of the ServiceBus Subscription in which this Rule should be created. Changing this forces a new resource to be created.
    action String
    Represents set of actions written in SQL language-based syntax that is performed against a BrokeredMessage.
    correlationFilter Property Map
    A correlation_filter block as documented below to be evaluated against a BrokeredMessage. Required when filter_type is set to CorrelationFilter.
    filterType String
    Type of filter to be applied to a BrokeredMessage. Possible values are SqlFilter and CorrelationFilter.
    name String
    Specifies the name of the ServiceBus Subscription Rule. Changing this forces a new resource to be created.
    sqlFilter String
    Represents a filter written in SQL language-based syntax that to be evaluated against a BrokeredMessage. Required when filter_type is set to SqlFilter.
    sqlFilterCompatibilityLevel Number
    subscriptionId String
    The ID of the ServiceBus Subscription in which this Rule should be created. Changing this forces a new resource to be created.

    Supporting Types

    SubscriptionRuleCorrelationFilter, SubscriptionRuleCorrelationFilterArgs

    ContentType string
    Content type of the message.
    CorrelationId string
    Identifier of the correlation.
    Label string
    Application specific label.
    MessageId string
    Identifier of the message.
    Properties Dictionary<string, string>

    A list of user defined properties to be included in the filter. Specified as a map of name/value pairs.

    NOTE: When creating a subscription rule of type CorrelationFilter at least one property must be set in the correlation_filter block.

    ReplyTo string
    Address of the queue to reply to.
    ReplyToSessionId string
    Session identifier to reply to.
    SessionId string
    Session identifier.
    To string
    Address to send to.
    ContentType string
    Content type of the message.
    CorrelationId string
    Identifier of the correlation.
    Label string
    Application specific label.
    MessageId string
    Identifier of the message.
    Properties map[string]string

    A list of user defined properties to be included in the filter. Specified as a map of name/value pairs.

    NOTE: When creating a subscription rule of type CorrelationFilter at least one property must be set in the correlation_filter block.

    ReplyTo string
    Address of the queue to reply to.
    ReplyToSessionId string
    Session identifier to reply to.
    SessionId string
    Session identifier.
    To string
    Address to send to.
    contentType String
    Content type of the message.
    correlationId String
    Identifier of the correlation.
    label String
    Application specific label.
    messageId String
    Identifier of the message.
    properties Map<String,String>

    A list of user defined properties to be included in the filter. Specified as a map of name/value pairs.

    NOTE: When creating a subscription rule of type CorrelationFilter at least one property must be set in the correlation_filter block.

    replyTo String
    Address of the queue to reply to.
    replyToSessionId String
    Session identifier to reply to.
    sessionId String
    Session identifier.
    to String
    Address to send to.
    contentType string
    Content type of the message.
    correlationId string
    Identifier of the correlation.
    label string
    Application specific label.
    messageId string
    Identifier of the message.
    properties {[key: string]: string}

    A list of user defined properties to be included in the filter. Specified as a map of name/value pairs.

    NOTE: When creating a subscription rule of type CorrelationFilter at least one property must be set in the correlation_filter block.

    replyTo string
    Address of the queue to reply to.
    replyToSessionId string
    Session identifier to reply to.
    sessionId string
    Session identifier.
    to string
    Address to send to.
    content_type str
    Content type of the message.
    correlation_id str
    Identifier of the correlation.
    label str
    Application specific label.
    message_id str
    Identifier of the message.
    properties Mapping[str, str]

    A list of user defined properties to be included in the filter. Specified as a map of name/value pairs.

    NOTE: When creating a subscription rule of type CorrelationFilter at least one property must be set in the correlation_filter block.

    reply_to str
    Address of the queue to reply to.
    reply_to_session_id str
    Session identifier to reply to.
    session_id str
    Session identifier.
    to str
    Address to send to.
    contentType String
    Content type of the message.
    correlationId String
    Identifier of the correlation.
    label String
    Application specific label.
    messageId String
    Identifier of the message.
    properties Map<String>

    A list of user defined properties to be included in the filter. Specified as a map of name/value pairs.

    NOTE: When creating a subscription rule of type CorrelationFilter at least one property must be set in the correlation_filter block.

    replyTo String
    Address of the queue to reply to.
    replyToSessionId String
    Session identifier to reply to.
    sessionId String
    Session identifier.
    to String
    Address to send to.

    Import

    Service Bus Subscription Rule can be imported using the resource id, e.g.

    $ pulumi import azure:eventhub/subscriptionRule:SubscriptionRule example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ServiceBus/namespaces/sbns1/topics/sntopic1/subscriptions/sbsub1/rules/sbrule1
    

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure Classic v5.70.0 published on Wednesday, Mar 27, 2024 by Pulumi