Class Subscription
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
{
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,
});
}
}
Inherited Members
Namespace: Pulumi.Azure.ServiceBus
Assembly: Pulumi.Azure.dll
Syntax
public class Subscription : CustomResource
Constructors
View SourceSubscription(String, SubscriptionArgs, CustomResourceOptions)
Create a Subscription resource with the given unique name, arguments, and options.
Declaration
public Subscription(string name, SubscriptionArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| SubscriptionArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceAutoDeleteOnIdle
The idle interval after which the topic is automatically deleted as an ISO 8601 duration. The minimum duration is 5 minutes or P5M.
Declaration
public Output<string> AutoDeleteOnIdle { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
DeadLetteringOnMessageExpiration
Boolean flag which controls whether the Subscription has dead letter support when a message expires. Defaults to false.
Declaration
public Output<bool?> DeadLetteringOnMessageExpiration { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
DefaultMessageTtl
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.
Declaration
public Output<string> DefaultMessageTtl { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
EnableBatchedOperations
Boolean flag which controls whether the Subscription supports batched operations. Defaults to false.
Declaration
public Output<bool?> EnableBatchedOperations { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
ForwardDeadLetteredMessagesTo
The name of a Queue or Topic to automatically forward Dead Letter messages to.
Declaration
public Output<string> ForwardDeadLetteredMessagesTo { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ForwardTo
The name of a Queue or Topic to automatically forward messages to.
Declaration
public Output<string> ForwardTo { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
LockDuration
The lock duration for the subscription as an ISO 8601 duration. The default value is 1 minute or P1M.
Declaration
public Output<string> LockDuration { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
MaxDeliveryCount
The maximum number of deliveries.
Declaration
public Output<int> MaxDeliveryCount { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
Name
Specifies the name of the ServiceBus Subscription resource. Changing this forces a new resource to be created.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
NamespaceName
The name of the ServiceBus Namespace to create this Subscription in. Changing this forces a new resource to be created.
Declaration
public Output<string> NamespaceName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
RequiresSession
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.
Declaration
public Output<bool?> RequiresSession { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
ResourceGroupName
The name of the resource group in which to create the namespace. Changing this forces a new resource to be created.
Declaration
public Output<string> ResourceGroupName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
TopicName
The name of the ServiceBus Topic to create this Subscription in. Changing this forces a new resource to be created.
Declaration
public Output<string> TopicName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, SubscriptionState, CustomResourceOptions)
Get an existing Subscription resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static Subscription Get(string name, Input<string> id, SubscriptionState 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. |
| SubscriptionState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| Subscription |