Show / Hide Table of Contents

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'",
    });
}

}
Inheritance
System.Object
Resource
CustomResource
SubscriptionRule
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Azure.ServiceBus
Assembly: Pulumi.Azure.dll
Syntax
public class SubscriptionRule : CustomResource

Constructors

View Source

SubscriptionRule(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 Source

Action

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>
View Source

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>
View Source

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>
View Source

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>
View Source

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>
View Source

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>
View Source

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>
View Source

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>
View Source

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 Source

Get(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
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.