We recommend using Azure Native.
published on Monday, Mar 9, 2026 by Pulumi
We recommend using Azure Native.
published on Monday, Mar 9, 2026 by Pulumi
Manages a ServiceBus Subscription.
Example Usage
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
{
NamespaceId = exampleNamespace.Id,
EnablePartitioning = true,
});
var exampleSubscription = new Azure.ServiceBus.Subscription("exampleSubscription", new Azure.ServiceBus.SubscriptionArgs
{
TopicId = exampleTopic.Id,
MaxDeliveryCount = 1,
});
}
}
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v4/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
})
}
Example coming soon!
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,
});
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)
Example coming soon!
Create Subscription Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Subscription(name: string, args: SubscriptionArgs, opts?: CustomResourceOptions);@overload
def Subscription(resource_name: str,
args: SubscriptionArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Subscription(resource_name: str,
opts: Optional[ResourceOptions] = None,
max_delivery_count: Optional[int] = None,
enable_batched_operations: Optional[bool] = None,
requires_session: Optional[bool] = None,
default_message_ttl: Optional[str] = None,
auto_delete_on_idle: Optional[str] = None,
forward_dead_lettered_messages_to: Optional[str] = None,
forward_to: Optional[str] = None,
dead_lettering_on_message_expiration: Optional[bool] = None,
name: Optional[str] = None,
lock_duration: Optional[str] = None,
namespace_name: Optional[str] = None,
dead_lettering_on_filter_evaluation_error: Optional[bool] = None,
resource_group_name: Optional[str] = None,
status: Optional[str] = None,
topic_id: Optional[str] = None,
topic_name: Optional[str] = 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.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var examplesubscriptionResourceResourceFromServicebussubscription = new Azure.ServiceBus.Subscription("examplesubscriptionResourceResourceFromServicebussubscription", new()
{
MaxDeliveryCount = 0,
EnableBatchedOperations = false,
RequiresSession = false,
DefaultMessageTtl = "string",
AutoDeleteOnIdle = "string",
ForwardDeadLetteredMessagesTo = "string",
ForwardTo = "string",
DeadLetteringOnMessageExpiration = false,
Name = "string",
LockDuration = "string",
DeadLetteringOnFilterEvaluationError = false,
Status = "string",
TopicId = "string",
});
example, err := servicebus.NewSubscription(ctx, "examplesubscriptionResourceResourceFromServicebussubscription", &servicebus.SubscriptionArgs{
MaxDeliveryCount: pulumi.Int(0),
EnableBatchedOperations: pulumi.Bool(false),
RequiresSession: pulumi.Bool(false),
DefaultMessageTtl: pulumi.String("string"),
AutoDeleteOnIdle: pulumi.String("string"),
ForwardDeadLetteredMessagesTo: pulumi.String("string"),
ForwardTo: pulumi.String("string"),
DeadLetteringOnMessageExpiration: pulumi.Bool(false),
Name: pulumi.String("string"),
LockDuration: pulumi.String("string"),
DeadLetteringOnFilterEvaluationError: pulumi.Bool(false),
Status: pulumi.String("string"),
TopicId: pulumi.String("string"),
})
var examplesubscriptionResourceResourceFromServicebussubscription = new com.pulumi.azure.servicebus.Subscription("examplesubscriptionResourceResourceFromServicebussubscription", com.pulumi.azure.servicebus.SubscriptionArgs.builder()
.maxDeliveryCount(0)
.enableBatchedOperations(false)
.requiresSession(false)
.defaultMessageTtl("string")
.autoDeleteOnIdle("string")
.forwardDeadLetteredMessagesTo("string")
.forwardTo("string")
.deadLetteringOnMessageExpiration(false)
.name("string")
.lockDuration("string")
.deadLetteringOnFilterEvaluationError(false)
.status("string")
.topicId("string")
.build());
examplesubscription_resource_resource_from_servicebussubscription = azure.servicebus.Subscription("examplesubscriptionResourceResourceFromServicebussubscription",
max_delivery_count=0,
enable_batched_operations=False,
requires_session=False,
default_message_ttl="string",
auto_delete_on_idle="string",
forward_dead_lettered_messages_to="string",
forward_to="string",
dead_lettering_on_message_expiration=False,
name="string",
lock_duration="string",
dead_lettering_on_filter_evaluation_error=False,
status="string",
topic_id="string")
const examplesubscriptionResourceResourceFromServicebussubscription = new azure.servicebus.Subscription("examplesubscriptionResourceResourceFromServicebussubscription", {
maxDeliveryCount: 0,
enableBatchedOperations: false,
requiresSession: false,
defaultMessageTtl: "string",
autoDeleteOnIdle: "string",
forwardDeadLetteredMessagesTo: "string",
forwardTo: "string",
deadLetteringOnMessageExpiration: false,
name: "string",
lockDuration: "string",
deadLetteringOnFilterEvaluationError: false,
status: "string",
topicId: "string",
});
type: azure:servicebus:Subscription
properties:
autoDeleteOnIdle: string
deadLetteringOnFilterEvaluationError: false
deadLetteringOnMessageExpiration: false
defaultMessageTtl: string
enableBatchedOperations: false
forwardDeadLetteredMessagesTo: string
forwardTo: string
lockDuration: string
maxDeliveryCount: 0
name: string
requiresSession: false
status: string
topicId: string
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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Subscription resource accepts the following input properties:
- Max
Delivery intCount - The maximum number of deliveries.
- Auto
Delete stringOn Idle - The idle interval after which the topic is automatically deleted as an ISO 8601 duration. The minimum duration is
5minutes orPT5M. - Dead
Lettering boolOn Filter Evaluation Error - Boolean flag which controls whether the Subscription has dead letter support on filter evaluation exceptions. Defaults to
true. - Dead
Lettering boolOn Message Expiration - Boolean flag which controls whether the Subscription has dead letter support when a message expires. Defaults to
false. - Default
Message stringTtl - 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 boolOperations - Boolean flag which controls whether the Subscription supports batched operations. Defaults to
false. - Forward
Dead stringLettered Messages To - The name of a Queue or Topic to automatically forward Dead Letter messages to.
- Forward
To string - The name of a Queue or Topic to automatically forward messages to.
- Lock
Duration string - The lock duration for the subscription as an ISO 8601 duration. The default value is
1minute orP0DT0H1M0S. The maximum value is5minutes orP0DT0H5M0S. - Name string
- Specifies the name of the ServiceBus Subscription resource. Changing this forces a new resource to be created.
- Namespace
Name string - Requires
Session bool - Boolean flag which controls whether this Subscription supports the concept of a session. Defaults to
false. Changing this forces a new resource to be created. - Resource
Group stringName - Status string
- The status of the Subscription. Possible values are
Active,ReceiveDisabled, orDisabled. Defaults toActive. - Topic
Id string - The ID of the ServiceBus Topic to create this Subscription in. Changing this forces a new resource to be created.
- Topic
Name string
- Max
Delivery intCount - The maximum number of deliveries.
- Auto
Delete stringOn Idle - The idle interval after which the topic is automatically deleted as an ISO 8601 duration. The minimum duration is
5minutes orPT5M. - Dead
Lettering boolOn Filter Evaluation Error - Boolean flag which controls whether the Subscription has dead letter support on filter evaluation exceptions. Defaults to
true. - Dead
Lettering boolOn Message Expiration - Boolean flag which controls whether the Subscription has dead letter support when a message expires. Defaults to
false. - Default
Message stringTtl - 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 boolOperations - Boolean flag which controls whether the Subscription supports batched operations. Defaults to
false. - Forward
Dead stringLettered Messages To - The name of a Queue or Topic to automatically forward Dead Letter messages to.
- Forward
To string - The name of a Queue or Topic to automatically forward messages to.
- Lock
Duration string - The lock duration for the subscription as an ISO 8601 duration. The default value is
1minute orP0DT0H1M0S. The maximum value is5minutes orP0DT0H5M0S. - Name string
- Specifies the name of the ServiceBus Subscription resource. Changing this forces a new resource to be created.
- Namespace
Name string - Requires
Session bool - Boolean flag which controls whether this Subscription supports the concept of a session. Defaults to
false. Changing this forces a new resource to be created. - Resource
Group stringName - Status string
- The status of the Subscription. Possible values are
Active,ReceiveDisabled, orDisabled. Defaults toActive. - Topic
Id string - The ID of the ServiceBus Topic to create this Subscription in. Changing this forces a new resource to be created.
- Topic
Name string
- max
Delivery IntegerCount - The maximum number of deliveries.
- auto
Delete StringOn Idle - The idle interval after which the topic is automatically deleted as an ISO 8601 duration. The minimum duration is
5minutes orPT5M. - dead
Lettering BooleanOn Filter Evaluation Error - Boolean flag which controls whether the Subscription has dead letter support on filter evaluation exceptions. Defaults to
true. - dead
Lettering BooleanOn Message Expiration - Boolean flag which controls whether the Subscription has dead letter support when a message expires. Defaults to
false. - default
Message StringTtl - 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 BooleanOperations - Boolean flag which controls whether the Subscription supports batched operations. Defaults to
false. - forward
Dead StringLettered Messages To - The name of a Queue or Topic to automatically forward Dead Letter messages to.
- forward
To String - The name of a Queue or Topic to automatically forward messages to.
- lock
Duration String - The lock duration for the subscription as an ISO 8601 duration. The default value is
1minute orP0DT0H1M0S. The maximum value is5minutes orP0DT0H5M0S. - name String
- Specifies the name of the ServiceBus Subscription resource. Changing this forces a new resource to be created.
- namespace
Name String - requires
Session Boolean - Boolean flag which controls whether this Subscription supports the concept of a session. Defaults to
false. Changing this forces a new resource to be created. - resource
Group StringName - status String
- The status of the Subscription. Possible values are
Active,ReceiveDisabled, orDisabled. Defaults toActive. - topic
Id String - The ID of the ServiceBus Topic to create this Subscription in. Changing this forces a new resource to be created.
- topic
Name String
- max
Delivery numberCount - The maximum number of deliveries.
- auto
Delete stringOn Idle - The idle interval after which the topic is automatically deleted as an ISO 8601 duration. The minimum duration is
5minutes orPT5M. - dead
Lettering booleanOn Filter Evaluation Error - Boolean flag which controls whether the Subscription has dead letter support on filter evaluation exceptions. Defaults to
true. - dead
Lettering booleanOn Message Expiration - Boolean flag which controls whether the Subscription has dead letter support when a message expires. Defaults to
false. - default
Message stringTtl - 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 booleanOperations - Boolean flag which controls whether the Subscription supports batched operations. Defaults to
false. - forward
Dead stringLettered Messages To - The name of a Queue or Topic to automatically forward Dead Letter messages to.
- forward
To string - The name of a Queue or Topic to automatically forward messages to.
- lock
Duration string - The lock duration for the subscription as an ISO 8601 duration. The default value is
1minute orP0DT0H1M0S. The maximum value is5minutes orP0DT0H5M0S. - name string
- Specifies the name of the ServiceBus Subscription resource. Changing this forces a new resource to be created.
- namespace
Name string - requires
Session boolean - Boolean flag which controls whether this Subscription supports the concept of a session. Defaults to
false. Changing this forces a new resource to be created. - resource
Group stringName - status string
- The status of the Subscription. Possible values are
Active,ReceiveDisabled, orDisabled. Defaults toActive. - topic
Id string - The ID of the ServiceBus Topic to create this Subscription in. Changing this forces a new resource to be created.
- topic
Name string
- max_
delivery_ intcount - The maximum number of deliveries.
- auto_
delete_ stron_ idle - The idle interval after which the topic is automatically deleted as an ISO 8601 duration. The minimum duration is
5minutes orPT5M. - dead_
lettering_ boolon_ filter_ evaluation_ error - Boolean flag which controls whether the Subscription has dead letter support on filter evaluation exceptions. Defaults to
true. - dead_
lettering_ boolon_ message_ expiration - Boolean flag which controls whether the Subscription has dead letter support when a message expires. Defaults to
false. - default_
message_ strttl - 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_ booloperations - Boolean flag which controls whether the Subscription supports batched operations. Defaults to
false. - forward_
dead_ strlettered_ messages_ to - 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
1minute orP0DT0H1M0S. The maximum value is5minutes orP0DT0H5M0S. - name str
- Specifies the name of the ServiceBus Subscription resource. Changing this forces a new resource to be created.
- namespace_
name str - requires_
session bool - Boolean flag which controls whether this Subscription supports the concept of a session. Defaults to
false. Changing this forces a new resource to be created. - resource_
group_ strname - status str
- The status of the Subscription. Possible values are
Active,ReceiveDisabled, orDisabled. Defaults toActive. - topic_
id str - The ID of the ServiceBus Topic to create this Subscription in. Changing this forces a new resource to be created.
- topic_
name str
- max
Delivery NumberCount - The maximum number of deliveries.
- auto
Delete StringOn Idle - The idle interval after which the topic is automatically deleted as an ISO 8601 duration. The minimum duration is
5minutes orPT5M. - dead
Lettering BooleanOn Filter Evaluation Error - Boolean flag which controls whether the Subscription has dead letter support on filter evaluation exceptions. Defaults to
true. - dead
Lettering BooleanOn Message Expiration - Boolean flag which controls whether the Subscription has dead letter support when a message expires. Defaults to
false. - default
Message StringTtl - 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 BooleanOperations - Boolean flag which controls whether the Subscription supports batched operations. Defaults to
false. - forward
Dead StringLettered Messages To - The name of a Queue or Topic to automatically forward Dead Letter messages to.
- forward
To String - The name of a Queue or Topic to automatically forward messages to.
- lock
Duration String - The lock duration for the subscription as an ISO 8601 duration. The default value is
1minute orP0DT0H1M0S. The maximum value is5minutes orP0DT0H5M0S. - name String
- Specifies the name of the ServiceBus Subscription resource. Changing this forces a new resource to be created.
- namespace
Name String - requires
Session Boolean - Boolean flag which controls whether this Subscription supports the concept of a session. Defaults to
false. Changing this forces a new resource to be created. - resource
Group StringName - status String
- The status of the Subscription. Possible values are
Active,ReceiveDisabled, orDisabled. Defaults toActive. - topic
Id String - The ID of the ServiceBus Topic to create this Subscription in. Changing this forces a new resource to be created.
- topic
Name String
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,
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,
namespace_name: Optional[str] = None,
requires_session: Optional[bool] = None,
resource_group_name: Optional[str] = None,
status: Optional[str] = None,
topic_id: Optional[str] = None,
topic_name: Optional[str] = None) -> Subscriptionfunc 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)resources: _: type: azure:servicebus:Subscription get: id: ${id}- 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.
- Auto
Delete stringOn Idle - The idle interval after which the topic is automatically deleted as an ISO 8601 duration. The minimum duration is
5minutes orPT5M. - Dead
Lettering boolOn Filter Evaluation Error - Boolean flag which controls whether the Subscription has dead letter support on filter evaluation exceptions. Defaults to
true. - Dead
Lettering boolOn Message Expiration - Boolean flag which controls whether the Subscription has dead letter support when a message expires. Defaults to
false. - Default
Message stringTtl - 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 boolOperations - Boolean flag which controls whether the Subscription supports batched operations. Defaults to
false. - Forward
Dead stringLettered Messages To - The name of a Queue or Topic to automatically forward Dead Letter messages to.
- Forward
To string - The name of a Queue or Topic to automatically forward messages to.
- Lock
Duration string - The lock duration for the subscription as an ISO 8601 duration. The default value is
1minute orP0DT0H1M0S. The maximum value is5minutes orP0DT0H5M0S. - Max
Delivery intCount - The maximum number of deliveries.
- Name string
- Specifies the name of the ServiceBus Subscription resource. Changing this forces a new resource to be created.
- Namespace
Name string - Requires
Session bool - Boolean flag which controls whether this Subscription supports the concept of a session. Defaults to
false. Changing this forces a new resource to be created. - Resource
Group stringName - Status string
- The status of the Subscription. Possible values are
Active,ReceiveDisabled, orDisabled. Defaults toActive. - Topic
Id string - The ID of the ServiceBus Topic to create this Subscription in. Changing this forces a new resource to be created.
- Topic
Name string
- Auto
Delete stringOn Idle - The idle interval after which the topic is automatically deleted as an ISO 8601 duration. The minimum duration is
5minutes orPT5M. - Dead
Lettering boolOn Filter Evaluation Error - Boolean flag which controls whether the Subscription has dead letter support on filter evaluation exceptions. Defaults to
true. - Dead
Lettering boolOn Message Expiration - Boolean flag which controls whether the Subscription has dead letter support when a message expires. Defaults to
false. - Default
Message stringTtl - 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 boolOperations - Boolean flag which controls whether the Subscription supports batched operations. Defaults to
false. - Forward
Dead stringLettered Messages To - The name of a Queue or Topic to automatically forward Dead Letter messages to.
- Forward
To string - The name of a Queue or Topic to automatically forward messages to.
- Lock
Duration string - The lock duration for the subscription as an ISO 8601 duration. The default value is
1minute orP0DT0H1M0S. The maximum value is5minutes orP0DT0H5M0S. - Max
Delivery intCount - The maximum number of deliveries.
- Name string
- Specifies the name of the ServiceBus Subscription resource. Changing this forces a new resource to be created.
- Namespace
Name string - Requires
Session bool - Boolean flag which controls whether this Subscription supports the concept of a session. Defaults to
false. Changing this forces a new resource to be created. - Resource
Group stringName - Status string
- The status of the Subscription. Possible values are
Active,ReceiveDisabled, orDisabled. Defaults toActive. - Topic
Id string - The ID of the ServiceBus Topic to create this Subscription in. Changing this forces a new resource to be created.
- Topic
Name string
- auto
Delete StringOn Idle - The idle interval after which the topic is automatically deleted as an ISO 8601 duration. The minimum duration is
5minutes orPT5M. - dead
Lettering BooleanOn Filter Evaluation Error - Boolean flag which controls whether the Subscription has dead letter support on filter evaluation exceptions. Defaults to
true. - dead
Lettering BooleanOn Message Expiration - Boolean flag which controls whether the Subscription has dead letter support when a message expires. Defaults to
false. - default
Message StringTtl - 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 BooleanOperations - Boolean flag which controls whether the Subscription supports batched operations. Defaults to
false. - forward
Dead StringLettered Messages To - The name of a Queue or Topic to automatically forward Dead Letter messages to.
- forward
To String - The name of a Queue or Topic to automatically forward messages to.
- lock
Duration String - The lock duration for the subscription as an ISO 8601 duration. The default value is
1minute orP0DT0H1M0S. The maximum value is5minutes orP0DT0H5M0S. - max
Delivery IntegerCount - The maximum number of deliveries.
- name String
- Specifies the name of the ServiceBus Subscription resource. Changing this forces a new resource to be created.
- namespace
Name String - requires
Session Boolean - Boolean flag which controls whether this Subscription supports the concept of a session. Defaults to
false. Changing this forces a new resource to be created. - resource
Group StringName - status String
- The status of the Subscription. Possible values are
Active,ReceiveDisabled, orDisabled. Defaults toActive. - topic
Id String - The ID of the ServiceBus Topic to create this Subscription in. Changing this forces a new resource to be created.
- topic
Name String
- auto
Delete stringOn Idle - The idle interval after which the topic is automatically deleted as an ISO 8601 duration. The minimum duration is
5minutes orPT5M. - dead
Lettering booleanOn Filter Evaluation Error - Boolean flag which controls whether the Subscription has dead letter support on filter evaluation exceptions. Defaults to
true. - dead
Lettering booleanOn Message Expiration - Boolean flag which controls whether the Subscription has dead letter support when a message expires. Defaults to
false. - default
Message stringTtl - 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 booleanOperations - Boolean flag which controls whether the Subscription supports batched operations. Defaults to
false. - forward
Dead stringLettered Messages To - The name of a Queue or Topic to automatically forward Dead Letter messages to.
- forward
To string - The name of a Queue or Topic to automatically forward messages to.
- lock
Duration string - The lock duration for the subscription as an ISO 8601 duration. The default value is
1minute orP0DT0H1M0S. The maximum value is5minutes orP0DT0H5M0S. - max
Delivery numberCount - The maximum number of deliveries.
- name string
- Specifies the name of the ServiceBus Subscription resource. Changing this forces a new resource to be created.
- namespace
Name string - requires
Session boolean - Boolean flag which controls whether this Subscription supports the concept of a session. Defaults to
false. Changing this forces a new resource to be created. - resource
Group stringName - status string
- The status of the Subscription. Possible values are
Active,ReceiveDisabled, orDisabled. Defaults toActive. - topic
Id string - The ID of the ServiceBus Topic to create this Subscription in. Changing this forces a new resource to be created.
- topic
Name string
- auto_
delete_ stron_ idle - The idle interval after which the topic is automatically deleted as an ISO 8601 duration. The minimum duration is
5minutes orPT5M. - dead_
lettering_ boolon_ filter_ evaluation_ error - Boolean flag which controls whether the Subscription has dead letter support on filter evaluation exceptions. Defaults to
true. - dead_
lettering_ boolon_ message_ expiration - Boolean flag which controls whether the Subscription has dead letter support when a message expires. Defaults to
false. - default_
message_ strttl - 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_ booloperations - Boolean flag which controls whether the Subscription supports batched operations. Defaults to
false. - forward_
dead_ strlettered_ messages_ to - 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
1minute orP0DT0H1M0S. The maximum value is5minutes orP0DT0H5M0S. - max_
delivery_ intcount - The maximum number of deliveries.
- name str
- Specifies the name of the ServiceBus Subscription resource. Changing this forces a new resource to be created.
- namespace_
name str - requires_
session bool - Boolean flag which controls whether this Subscription supports the concept of a session. Defaults to
false. Changing this forces a new resource to be created. - resource_
group_ strname - status str
- The status of the Subscription. Possible values are
Active,ReceiveDisabled, orDisabled. Defaults toActive. - topic_
id str - The ID of the ServiceBus Topic to create this Subscription in. Changing this forces a new resource to be created.
- topic_
name str
- auto
Delete StringOn Idle - The idle interval after which the topic is automatically deleted as an ISO 8601 duration. The minimum duration is
5minutes orPT5M. - dead
Lettering BooleanOn Filter Evaluation Error - Boolean flag which controls whether the Subscription has dead letter support on filter evaluation exceptions. Defaults to
true. - dead
Lettering BooleanOn Message Expiration - Boolean flag which controls whether the Subscription has dead letter support when a message expires. Defaults to
false. - default
Message StringTtl - 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 BooleanOperations - Boolean flag which controls whether the Subscription supports batched operations. Defaults to
false. - forward
Dead StringLettered Messages To - The name of a Queue or Topic to automatically forward Dead Letter messages to.
- forward
To String - The name of a Queue or Topic to automatically forward messages to.
- lock
Duration String - The lock duration for the subscription as an ISO 8601 duration. The default value is
1minute orP0DT0H1M0S. The maximum value is5minutes orP0DT0H5M0S. - max
Delivery NumberCount - The maximum number of deliveries.
- name String
- Specifies the name of the ServiceBus Subscription resource. Changing this forces a new resource to be created.
- namespace
Name String - requires
Session Boolean - Boolean flag which controls whether this Subscription supports the concept of a session. Defaults to
false. Changing this forces a new resource to be created. - resource
Group StringName - status String
- The status of the Subscription. Possible values are
Active,ReceiveDisabled, orDisabled. Defaults toActive. - topic
Id String - The ID of the ServiceBus Topic to create this Subscription in. Changing this forces a new resource to be created.
- topic
Name String
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
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.
We recommend using Azure Native.
published on Monday, Mar 9, 2026 by Pulumi