azure logo
Azure Classic v5.38.0, Mar 21 23

azure.servicebus.Subscription

Manages a ServiceBus Subscription.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Azure = Pulumi.Azure;

return await Deployment.RunAsync(() => 
{
    var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new()
    {
        Location = "West Europe",
    });

    var exampleNamespace = new Azure.ServiceBus.Namespace("exampleNamespace", new()
    {
        Location = exampleResourceGroup.Location,
        ResourceGroupName = exampleResourceGroup.Name,
        Sku = "Standard",
        Tags = 
        {
            { "source", "example" },
        },
    });

    var exampleTopic = new Azure.ServiceBus.Topic("exampleTopic", new()
    {
        NamespaceId = exampleNamespace.Id,
        EnablePartitioning = true,
    });

    var exampleSubscription = new Azure.ServiceBus.Subscription("exampleSubscription", new()
    {
        TopicId = exampleTopic.Id,
        MaxDeliveryCount = 1,
    });

});
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 {
		exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
			Location: pulumi.String("West Europe"),
		})
		if err != nil {
			return err
		}
		exampleNamespace, err := servicebus.NewNamespace(ctx, "exampleNamespace", &servicebus.NamespaceArgs{
			Location:          exampleResourceGroup.Location,
			ResourceGroupName: exampleResourceGroup.Name,
			Sku:               pulumi.String("Standard"),
			Tags: pulumi.StringMap{
				"source": pulumi.String("example"),
			},
		})
		if err != nil {
			return err
		}
		exampleTopic, err := servicebus.NewTopic(ctx, "exampleTopic", &servicebus.TopicArgs{
			NamespaceId:        exampleNamespace.ID(),
			EnablePartitioning: pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		_, err = servicebus.NewSubscription(ctx, "exampleSubscription", &servicebus.SubscriptionArgs{
			TopicId:          exampleTopic.ID(),
			MaxDeliveryCount: pulumi.Int(1),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
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 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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()        
            .location("West Europe")
            .build());

        var exampleNamespace = new Namespace("exampleNamespace", NamespaceArgs.builder()        
            .location(exampleResourceGroup.location())
            .resourceGroupName(exampleResourceGroup.name())
            .sku("Standard")
            .tags(Map.of("source", "example"))
            .build());

        var exampleTopic = new Topic("exampleTopic", TopicArgs.builder()        
            .namespaceId(exampleNamespace.id())
            .enablePartitioning(true)
            .build());

        var exampleSubscription = new Subscription("exampleSubscription", SubscriptionArgs.builder()        
            .topicId(exampleTopic.id())
            .maxDeliveryCount(1)
            .build());

    }
}
import pulumi
import pulumi_azure as azure

example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_namespace = azure.servicebus.Namespace("exampleNamespace",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    sku="Standard",
    tags={
        "source": "example",
    })
example_topic = azure.servicebus.Topic("exampleTopic",
    namespace_id=example_namespace.id,
    enable_partitioning=True)
example_subscription = azure.servicebus.Subscription("exampleSubscription",
    topic_id=example_topic.id,
    max_delivery_count=1)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const exampleNamespace = new azure.servicebus.Namespace("exampleNamespace", {
    location: exampleResourceGroup.location,
    resourceGroupName: exampleResourceGroup.name,
    sku: "Standard",
    tags: {
        source: "example",
    },
});
const exampleTopic = new azure.servicebus.Topic("exampleTopic", {
    namespaceId: exampleNamespace.id,
    enablePartitioning: true,
});
const exampleSubscription = new azure.servicebus.Subscription("exampleSubscription", {
    topicId: exampleTopic.id,
    maxDeliveryCount: 1,
});
resources:
  exampleResourceGroup:
    type: azure:core:ResourceGroup
    properties:
      location: West Europe
  exampleNamespace:
    type: azure:servicebus:Namespace
    properties:
      location: ${exampleResourceGroup.location}
      resourceGroupName: ${exampleResourceGroup.name}
      sku: Standard
      tags:
        source: example
  exampleTopic:
    type: azure:servicebus:Topic
    properties:
      namespaceId: ${exampleNamespace.id}
      enablePartitioning: true
  exampleSubscription:
    type: azure:servicebus:Subscription
    properties:
      topicId: ${exampleTopic.id}
      maxDeliveryCount: 1

Create Subscription Resource

new Subscription(name: string, args: SubscriptionArgs, opts?: CustomResourceOptions);
@overload
def Subscription(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 auto_delete_on_idle: Optional[str] = None,
                 client_scoped_subscription: Optional[SubscriptionClientScopedSubscriptionArgs] = None,
                 client_scoped_subscription_enabled: Optional[bool] = None,
                 dead_lettering_on_filter_evaluation_error: Optional[bool] = None,
                 dead_lettering_on_message_expiration: Optional[bool] = None,
                 default_message_ttl: Optional[str] = None,
                 enable_batched_operations: Optional[bool] = None,
                 forward_dead_lettered_messages_to: Optional[str] = None,
                 forward_to: Optional[str] = None,
                 lock_duration: Optional[str] = None,
                 max_delivery_count: Optional[int] = None,
                 name: Optional[str] = None,
                 requires_session: Optional[bool] = None,
                 status: Optional[str] = None,
                 topic_id: Optional[str] = None)
@overload
def Subscription(resource_name: str,
                 args: SubscriptionArgs,
                 opts: Optional[ResourceOptions] = None)
func NewSubscription(ctx *Context, name string, args SubscriptionArgs, opts ...ResourceOption) (*Subscription, error)
public Subscription(string name, SubscriptionArgs args, CustomResourceOptions? opts = null)
public Subscription(String name, SubscriptionArgs args)
public Subscription(String name, SubscriptionArgs args, CustomResourceOptions options)
type: azure:servicebus:Subscription
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args SubscriptionArgs
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 SubscriptionArgs
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 SubscriptionArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args SubscriptionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args SubscriptionArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Subscription 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 Subscription resource accepts the following input properties:

MaxDeliveryCount int

The maximum number of deliveries.

TopicId string

The ID of the ServiceBus Topic to create this Subscription in. Changing this forces a new resource to be created.

AutoDeleteOnIdle string

The idle interval after which the topic is automatically deleted as an ISO 8601 duration. The minimum duration is 5 minutes or PT5M.

ClientScopedSubscription SubscriptionClientScopedSubscriptionArgs

A client_scoped_subscription block as defined below.

ClientScopedSubscriptionEnabled bool

whether the subscription is scoped to a client id. Defaults to False.

DeadLetteringOnFilterEvaluationError bool

Boolean flag which controls whether the Subscription has dead letter support on filter evaluation exceptions. Defaults to true.

DeadLetteringOnMessageExpiration bool

Boolean flag which controls whether the Subscription has dead letter support when a message expires.

DefaultMessageTtl string

The Default message timespan to live as an ISO 8601 duration. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself.

EnableBatchedOperations bool

Boolean flag which controls whether the Subscription supports batched operations.

ForwardDeadLetteredMessagesTo string

The name of a Queue or Topic to automatically forward Dead Letter messages to.

ForwardTo string

The name of a Queue or Topic to automatically forward messages to.

LockDuration string

The lock duration for the subscription as an ISO 8601 duration. The default value is 1 minute or P0DT0H1M0S . The maximum value is 5 minutes or P0DT0H5M0S .

Name string

Specifies the name of the ServiceBus Subscription resource. Changing this forces a new resource to be created.

RequiresSession bool

Boolean flag which controls whether this Subscription supports the concept of a session. Changing this forces a new resource to be created.

Status string

The status of the Subscription. Possible values are Active,ReceiveDisabled, or Disabled. Defaults to Active.

MaxDeliveryCount int

The maximum number of deliveries.

TopicId string

The ID of the ServiceBus Topic to create this Subscription in. Changing this forces a new resource to be created.

AutoDeleteOnIdle string

The idle interval after which the topic is automatically deleted as an ISO 8601 duration. The minimum duration is 5 minutes or PT5M.

ClientScopedSubscription SubscriptionClientScopedSubscriptionArgs

A client_scoped_subscription block as defined below.

ClientScopedSubscriptionEnabled bool

whether the subscription is scoped to a client id. Defaults to False.

DeadLetteringOnFilterEvaluationError bool

Boolean flag which controls whether the Subscription has dead letter support on filter evaluation exceptions. Defaults to true.

DeadLetteringOnMessageExpiration bool

Boolean flag which controls whether the Subscription has dead letter support when a message expires.

DefaultMessageTtl string

The Default message timespan to live as an ISO 8601 duration. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself.

EnableBatchedOperations bool

Boolean flag which controls whether the Subscription supports batched operations.

ForwardDeadLetteredMessagesTo string

The name of a Queue or Topic to automatically forward Dead Letter messages to.

ForwardTo string

The name of a Queue or Topic to automatically forward messages to.

LockDuration string

The lock duration for the subscription as an ISO 8601 duration. The default value is 1 minute or P0DT0H1M0S . The maximum value is 5 minutes or P0DT0H5M0S .

Name string

Specifies the name of the ServiceBus Subscription resource. Changing this forces a new resource to be created.

RequiresSession bool

Boolean flag which controls whether this Subscription supports the concept of a session. Changing this forces a new resource to be created.

Status string

The status of the Subscription. Possible values are Active,ReceiveDisabled, or Disabled. Defaults to Active.

maxDeliveryCount Integer

The maximum number of deliveries.

topicId String

The ID of the ServiceBus Topic to create this Subscription in. Changing this forces a new resource to be created.

autoDeleteOnIdle String

The idle interval after which the topic is automatically deleted as an ISO 8601 duration. The minimum duration is 5 minutes or PT5M.

clientScopedSubscription SubscriptionClientScopedSubscriptionArgs

A client_scoped_subscription block as defined below.

clientScopedSubscriptionEnabled Boolean

whether the subscription is scoped to a client id. Defaults to False.

deadLetteringOnFilterEvaluationError Boolean

Boolean flag which controls whether the Subscription has dead letter support on filter evaluation exceptions. Defaults to true.

deadLetteringOnMessageExpiration Boolean

Boolean flag which controls whether the Subscription has dead letter support when a message expires.

defaultMessageTtl String

The Default message timespan to live as an ISO 8601 duration. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself.

enableBatchedOperations Boolean

Boolean flag which controls whether the Subscription supports batched operations.

forwardDeadLetteredMessagesTo String

The name of a Queue or Topic to automatically forward Dead Letter messages to.

forwardTo String

The name of a Queue or Topic to automatically forward messages to.

lockDuration String

The lock duration for the subscription as an ISO 8601 duration. The default value is 1 minute or P0DT0H1M0S . The maximum value is 5 minutes or P0DT0H5M0S .

name String

Specifies the name of the ServiceBus Subscription resource. Changing this forces a new resource to be created.

requiresSession Boolean

Boolean flag which controls whether this Subscription supports the concept of a session. Changing this forces a new resource to be created.

status String

The status of the Subscription. Possible values are Active,ReceiveDisabled, or Disabled. Defaults to Active.

maxDeliveryCount number

The maximum number of deliveries.

topicId string

The ID of the ServiceBus Topic to create this Subscription in. Changing this forces a new resource to be created.

autoDeleteOnIdle string

The idle interval after which the topic is automatically deleted as an ISO 8601 duration. The minimum duration is 5 minutes or PT5M.

clientScopedSubscription SubscriptionClientScopedSubscriptionArgs

A client_scoped_subscription block as defined below.

clientScopedSubscriptionEnabled boolean

whether the subscription is scoped to a client id. Defaults to False.

deadLetteringOnFilterEvaluationError boolean

Boolean flag which controls whether the Subscription has dead letter support on filter evaluation exceptions. Defaults to true.

deadLetteringOnMessageExpiration boolean

Boolean flag which controls whether the Subscription has dead letter support when a message expires.

defaultMessageTtl string

The Default message timespan to live as an ISO 8601 duration. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself.

enableBatchedOperations boolean

Boolean flag which controls whether the Subscription supports batched operations.

forwardDeadLetteredMessagesTo string

The name of a Queue or Topic to automatically forward Dead Letter messages to.

forwardTo string

The name of a Queue or Topic to automatically forward messages to.

lockDuration string

The lock duration for the subscription as an ISO 8601 duration. The default value is 1 minute or P0DT0H1M0S . The maximum value is 5 minutes or P0DT0H5M0S .

name string

Specifies the name of the ServiceBus Subscription resource. Changing this forces a new resource to be created.

requiresSession boolean

Boolean flag which controls whether this Subscription supports the concept of a session. Changing this forces a new resource to be created.

status string

The status of the Subscription. Possible values are Active,ReceiveDisabled, or Disabled. Defaults to Active.

max_delivery_count int

The maximum number of deliveries.

topic_id str

The ID of the ServiceBus Topic to create this Subscription in. Changing this forces a new resource to be created.

auto_delete_on_idle str

The idle interval after which the topic is automatically deleted as an ISO 8601 duration. The minimum duration is 5 minutes or PT5M.

client_scoped_subscription SubscriptionClientScopedSubscriptionArgs

A client_scoped_subscription block as defined below.

client_scoped_subscription_enabled bool

whether the subscription is scoped to a client id. Defaults to False.

dead_lettering_on_filter_evaluation_error bool

Boolean flag which controls whether the Subscription has dead letter support on filter evaluation exceptions. Defaults to true.

dead_lettering_on_message_expiration bool

Boolean flag which controls whether the Subscription has dead letter support when a message expires.

default_message_ttl str

The Default message timespan to live as an ISO 8601 duration. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself.

enable_batched_operations bool

Boolean flag which controls whether the Subscription supports batched operations.

forward_dead_lettered_messages_to str

The name of a Queue or Topic to automatically forward Dead Letter messages to.

forward_to str

The name of a Queue or Topic to automatically forward messages to.

lock_duration str

The lock duration for the subscription as an ISO 8601 duration. The default value is 1 minute or P0DT0H1M0S . The maximum value is 5 minutes or P0DT0H5M0S .

name str

Specifies the name of the ServiceBus Subscription resource. Changing this forces a new resource to be created.

requires_session bool

Boolean flag which controls whether this Subscription supports the concept of a session. Changing this forces a new resource to be created.

status str

The status of the Subscription. Possible values are Active,ReceiveDisabled, or Disabled. Defaults to Active.

maxDeliveryCount Number

The maximum number of deliveries.

topicId String

The ID of the ServiceBus Topic to create this Subscription in. Changing this forces a new resource to be created.

autoDeleteOnIdle String

The idle interval after which the topic is automatically deleted as an ISO 8601 duration. The minimum duration is 5 minutes or PT5M.

clientScopedSubscription Property Map

A client_scoped_subscription block as defined below.

clientScopedSubscriptionEnabled Boolean

whether the subscription is scoped to a client id. Defaults to False.

deadLetteringOnFilterEvaluationError Boolean

Boolean flag which controls whether the Subscription has dead letter support on filter evaluation exceptions. Defaults to true.

deadLetteringOnMessageExpiration Boolean

Boolean flag which controls whether the Subscription has dead letter support when a message expires.

defaultMessageTtl String

The Default message timespan to live as an ISO 8601 duration. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself.

enableBatchedOperations Boolean

Boolean flag which controls whether the Subscription supports batched operations.

forwardDeadLetteredMessagesTo String

The name of a Queue or Topic to automatically forward Dead Letter messages to.

forwardTo String

The name of a Queue or Topic to automatically forward messages to.

lockDuration String

The lock duration for the subscription as an ISO 8601 duration. The default value is 1 minute or P0DT0H1M0S . The maximum value is 5 minutes or P0DT0H5M0S .

name String

Specifies the name of the ServiceBus Subscription resource. Changing this forces a new resource to be created.

requiresSession Boolean

Boolean flag which controls whether this Subscription supports the concept of a session. Changing this forces a new resource to be created.

status String

The status of the Subscription. Possible values are Active,ReceiveDisabled, or Disabled. Defaults to Active.

Outputs

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

Id string

The provider-assigned unique ID for this managed resource.

Id string

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

id string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up Existing Subscription Resource

Get an existing Subscription 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?: SubscriptionState, opts?: CustomResourceOptions): Subscription
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        auto_delete_on_idle: Optional[str] = None,
        client_scoped_subscription: Optional[SubscriptionClientScopedSubscriptionArgs] = None,
        client_scoped_subscription_enabled: Optional[bool] = None,
        dead_lettering_on_filter_evaluation_error: Optional[bool] = None,
        dead_lettering_on_message_expiration: Optional[bool] = None,
        default_message_ttl: Optional[str] = None,
        enable_batched_operations: Optional[bool] = None,
        forward_dead_lettered_messages_to: Optional[str] = None,
        forward_to: Optional[str] = None,
        lock_duration: Optional[str] = None,
        max_delivery_count: Optional[int] = None,
        name: Optional[str] = None,
        requires_session: Optional[bool] = None,
        status: Optional[str] = None,
        topic_id: Optional[str] = None) -> Subscription
func GetSubscription(ctx *Context, name string, id IDInput, state *SubscriptionState, opts ...ResourceOption) (*Subscription, error)
public static Subscription Get(string name, Input<string> id, SubscriptionState? state, CustomResourceOptions? opts = null)
public static Subscription get(String name, Output<String> id, SubscriptionState 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:
AutoDeleteOnIdle string

The idle interval after which the topic is automatically deleted as an ISO 8601 duration. The minimum duration is 5 minutes or PT5M.

ClientScopedSubscription SubscriptionClientScopedSubscriptionArgs

A client_scoped_subscription block as defined below.

ClientScopedSubscriptionEnabled bool

whether the subscription is scoped to a client id. Defaults to False.

DeadLetteringOnFilterEvaluationError bool

Boolean flag which controls whether the Subscription has dead letter support on filter evaluation exceptions. Defaults to true.

DeadLetteringOnMessageExpiration bool

Boolean flag which controls whether the Subscription has dead letter support when a message expires.

DefaultMessageTtl string

The Default message timespan to live as an ISO 8601 duration. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself.

EnableBatchedOperations bool

Boolean flag which controls whether the Subscription supports batched operations.

ForwardDeadLetteredMessagesTo string

The name of a Queue or Topic to automatically forward Dead Letter messages to.

ForwardTo string

The name of a Queue or Topic to automatically forward messages to.

LockDuration string

The lock duration for the subscription as an ISO 8601 duration. The default value is 1 minute or P0DT0H1M0S . The maximum value is 5 minutes or P0DT0H5M0S .

MaxDeliveryCount int

The maximum number of deliveries.

Name string

Specifies the name of the ServiceBus Subscription resource. Changing this forces a new resource to be created.

RequiresSession bool

Boolean flag which controls whether this Subscription supports the concept of a session. Changing this forces a new resource to be created.

Status string

The status of the Subscription. Possible values are Active,ReceiveDisabled, or Disabled. Defaults to Active.

TopicId string

The ID of the ServiceBus Topic to create this Subscription in. Changing this forces a new resource to be created.

AutoDeleteOnIdle string

The idle interval after which the topic is automatically deleted as an ISO 8601 duration. The minimum duration is 5 minutes or PT5M.

ClientScopedSubscription SubscriptionClientScopedSubscriptionArgs

A client_scoped_subscription block as defined below.

ClientScopedSubscriptionEnabled bool

whether the subscription is scoped to a client id. Defaults to False.

DeadLetteringOnFilterEvaluationError bool

Boolean flag which controls whether the Subscription has dead letter support on filter evaluation exceptions. Defaults to true.

DeadLetteringOnMessageExpiration bool

Boolean flag which controls whether the Subscription has dead letter support when a message expires.

DefaultMessageTtl string

The Default message timespan to live as an ISO 8601 duration. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself.

EnableBatchedOperations bool

Boolean flag which controls whether the Subscription supports batched operations.

ForwardDeadLetteredMessagesTo string

The name of a Queue or Topic to automatically forward Dead Letter messages to.

ForwardTo string

The name of a Queue or Topic to automatically forward messages to.

LockDuration string

The lock duration for the subscription as an ISO 8601 duration. The default value is 1 minute or P0DT0H1M0S . The maximum value is 5 minutes or P0DT0H5M0S .

MaxDeliveryCount int

The maximum number of deliveries.

Name string

Specifies the name of the ServiceBus Subscription resource. Changing this forces a new resource to be created.

RequiresSession bool

Boolean flag which controls whether this Subscription supports the concept of a session. Changing this forces a new resource to be created.

Status string

The status of the Subscription. Possible values are Active,ReceiveDisabled, or Disabled. Defaults to Active.

TopicId string

The ID of the ServiceBus Topic to create this Subscription in. Changing this forces a new resource to be created.

autoDeleteOnIdle String

The idle interval after which the topic is automatically deleted as an ISO 8601 duration. The minimum duration is 5 minutes or PT5M.

clientScopedSubscription SubscriptionClientScopedSubscriptionArgs

A client_scoped_subscription block as defined below.

clientScopedSubscriptionEnabled Boolean

whether the subscription is scoped to a client id. Defaults to False.

deadLetteringOnFilterEvaluationError Boolean

Boolean flag which controls whether the Subscription has dead letter support on filter evaluation exceptions. Defaults to true.

deadLetteringOnMessageExpiration Boolean

Boolean flag which controls whether the Subscription has dead letter support when a message expires.

defaultMessageTtl String

The Default message timespan to live as an ISO 8601 duration. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself.

enableBatchedOperations Boolean

Boolean flag which controls whether the Subscription supports batched operations.

forwardDeadLetteredMessagesTo String

The name of a Queue or Topic to automatically forward Dead Letter messages to.

forwardTo String

The name of a Queue or Topic to automatically forward messages to.

lockDuration String

The lock duration for the subscription as an ISO 8601 duration. The default value is 1 minute or P0DT0H1M0S . The maximum value is 5 minutes or P0DT0H5M0S .

maxDeliveryCount Integer

The maximum number of deliveries.

name String

Specifies the name of the ServiceBus Subscription resource. Changing this forces a new resource to be created.

requiresSession Boolean

Boolean flag which controls whether this Subscription supports the concept of a session. Changing this forces a new resource to be created.

status String

The status of the Subscription. Possible values are Active,ReceiveDisabled, or Disabled. Defaults to Active.

topicId String

The ID of the ServiceBus Topic to create this Subscription in. Changing this forces a new resource to be created.

autoDeleteOnIdle string

The idle interval after which the topic is automatically deleted as an ISO 8601 duration. The minimum duration is 5 minutes or PT5M.

clientScopedSubscription SubscriptionClientScopedSubscriptionArgs

A client_scoped_subscription block as defined below.

clientScopedSubscriptionEnabled boolean

whether the subscription is scoped to a client id. Defaults to False.

deadLetteringOnFilterEvaluationError boolean

Boolean flag which controls whether the Subscription has dead letter support on filter evaluation exceptions. Defaults to true.

deadLetteringOnMessageExpiration boolean

Boolean flag which controls whether the Subscription has dead letter support when a message expires.

defaultMessageTtl string

The Default message timespan to live as an ISO 8601 duration. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself.

enableBatchedOperations boolean

Boolean flag which controls whether the Subscription supports batched operations.

forwardDeadLetteredMessagesTo string

The name of a Queue or Topic to automatically forward Dead Letter messages to.

forwardTo string

The name of a Queue or Topic to automatically forward messages to.

lockDuration string

The lock duration for the subscription as an ISO 8601 duration. The default value is 1 minute or P0DT0H1M0S . The maximum value is 5 minutes or P0DT0H5M0S .

maxDeliveryCount number

The maximum number of deliveries.

name string

Specifies the name of the ServiceBus Subscription resource. Changing this forces a new resource to be created.

requiresSession boolean

Boolean flag which controls whether this Subscription supports the concept of a session. Changing this forces a new resource to be created.

status string

The status of the Subscription. Possible values are Active,ReceiveDisabled, or Disabled. Defaults to Active.

topicId string

The ID of the ServiceBus Topic to create this Subscription in. Changing this forces a new resource to be created.

auto_delete_on_idle str

The idle interval after which the topic is automatically deleted as an ISO 8601 duration. The minimum duration is 5 minutes or PT5M.

client_scoped_subscription SubscriptionClientScopedSubscriptionArgs

A client_scoped_subscription block as defined below.

client_scoped_subscription_enabled bool

whether the subscription is scoped to a client id. Defaults to False.

dead_lettering_on_filter_evaluation_error bool

Boolean flag which controls whether the Subscription has dead letter support on filter evaluation exceptions. Defaults to true.

dead_lettering_on_message_expiration bool

Boolean flag which controls whether the Subscription has dead letter support when a message expires.

default_message_ttl str

The Default message timespan to live as an ISO 8601 duration. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself.

enable_batched_operations bool

Boolean flag which controls whether the Subscription supports batched operations.

forward_dead_lettered_messages_to str

The name of a Queue or Topic to automatically forward Dead Letter messages to.

forward_to str

The name of a Queue or Topic to automatically forward messages to.

lock_duration str

The lock duration for the subscription as an ISO 8601 duration. The default value is 1 minute or P0DT0H1M0S . The maximum value is 5 minutes or P0DT0H5M0S .

max_delivery_count int

The maximum number of deliveries.

name str

Specifies the name of the ServiceBus Subscription resource. Changing this forces a new resource to be created.

requires_session bool

Boolean flag which controls whether this Subscription supports the concept of a session. Changing this forces a new resource to be created.

status str

The status of the Subscription. Possible values are Active,ReceiveDisabled, or Disabled. Defaults to Active.

topic_id str

The ID of the ServiceBus Topic to create this Subscription in. Changing this forces a new resource to be created.

autoDeleteOnIdle String

The idle interval after which the topic is automatically deleted as an ISO 8601 duration. The minimum duration is 5 minutes or PT5M.

clientScopedSubscription Property Map

A client_scoped_subscription block as defined below.

clientScopedSubscriptionEnabled Boolean

whether the subscription is scoped to a client id. Defaults to False.

deadLetteringOnFilterEvaluationError Boolean

Boolean flag which controls whether the Subscription has dead letter support on filter evaluation exceptions. Defaults to true.

deadLetteringOnMessageExpiration Boolean

Boolean flag which controls whether the Subscription has dead letter support when a message expires.

defaultMessageTtl String

The Default message timespan to live as an ISO 8601 duration. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself.

enableBatchedOperations Boolean

Boolean flag which controls whether the Subscription supports batched operations.

forwardDeadLetteredMessagesTo String

The name of a Queue or Topic to automatically forward Dead Letter messages to.

forwardTo String

The name of a Queue or Topic to automatically forward messages to.

lockDuration String

The lock duration for the subscription as an ISO 8601 duration. The default value is 1 minute or P0DT0H1M0S . The maximum value is 5 minutes or P0DT0H5M0S .

maxDeliveryCount Number

The maximum number of deliveries.

name String

Specifies the name of the ServiceBus Subscription resource. Changing this forces a new resource to be created.

requiresSession Boolean

Boolean flag which controls whether this Subscription supports the concept of a session. Changing this forces a new resource to be created.

status String

The status of the Subscription. Possible values are Active,ReceiveDisabled, or Disabled. Defaults to Active.

topicId String

The ID of the ServiceBus Topic to create this Subscription in. Changing this forces a new resource to be created.

Supporting Types

SubscriptionClientScopedSubscription

ClientId string

Specifies the Client ID of the application that created the client-scoped subscription. Changing this forces a new resource to be created.

IsClientScopedSubscriptionDurable bool

Whether the client scoped subscription is durable. This property can only be controlled from the application side.

IsClientScopedSubscriptionShareable bool

Whether the client scoped subscription is shareable. Defaults to true Changing this forces a new resource to be created.

ClientId string

Specifies the Client ID of the application that created the client-scoped subscription. Changing this forces a new resource to be created.

IsClientScopedSubscriptionDurable bool

Whether the client scoped subscription is durable. This property can only be controlled from the application side.

IsClientScopedSubscriptionShareable bool

Whether the client scoped subscription is shareable. Defaults to true Changing this forces a new resource to be created.

clientId String

Specifies the Client ID of the application that created the client-scoped subscription. Changing this forces a new resource to be created.

isClientScopedSubscriptionDurable Boolean

Whether the client scoped subscription is durable. This property can only be controlled from the application side.

isClientScopedSubscriptionShareable Boolean

Whether the client scoped subscription is shareable. Defaults to true Changing this forces a new resource to be created.

clientId string

Specifies the Client ID of the application that created the client-scoped subscription. Changing this forces a new resource to be created.

isClientScopedSubscriptionDurable boolean

Whether the client scoped subscription is durable. This property can only be controlled from the application side.

isClientScopedSubscriptionShareable boolean

Whether the client scoped subscription is shareable. Defaults to true Changing this forces a new resource to be created.

client_id str

Specifies the Client ID of the application that created the client-scoped subscription. Changing this forces a new resource to be created.

is_client_scoped_subscription_durable bool

Whether the client scoped subscription is durable. This property can only be controlled from the application side.

is_client_scoped_subscription_shareable bool

Whether the client scoped subscription is shareable. Defaults to true Changing this forces a new resource to be created.

clientId String

Specifies the Client ID of the application that created the client-scoped subscription. Changing this forces a new resource to be created.

isClientScopedSubscriptionDurable Boolean

Whether the client scoped subscription is durable. This property can only be controlled from the application side.

isClientScopedSubscriptionShareable Boolean

Whether the client scoped subscription is shareable. Defaults to true Changing this forces a new resource to be created.

Import

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

 $ pulumi import azure:servicebus/subscription:Subscription example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ServiceBus/namespaces/sbns1/topics/sntopic1/subscriptions/sbsub1

Package Details

Repository
Azure Classic pulumi/pulumi-azure
License
Apache-2.0
Notes

This Pulumi package is based on the azurerm Terraform Provider.