We recommend using Azure Native.
azure.servicebus.Subscription
Explore with Pulumi AI
Manages a ServiceBus Subscription.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.core.ResourceGroup("example", {
name: "tfex-servicebus-subscription",
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,
partitioningEnabled: true,
});
const exampleSubscription = new azure.servicebus.Subscription("example", {
name: "tfex_servicebus_subscription",
topicId: exampleTopic.id,
maxDeliveryCount: 1,
});
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="tfex-servicebus-subscription",
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,
partitioning_enabled=True)
example_subscription = azure.servicebus.Subscription("example",
name="tfex_servicebus_subscription",
topic_id=example_topic.id,
max_delivery_count=1)
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v6/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"),
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(),
PartitioningEnabled: pulumi.Bool(true),
})
if err != nil {
return err
}
_, 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
}
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",
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,
PartitioningEnabled = true,
});
var exampleSubscription = new Azure.ServiceBus.Subscription("example", new()
{
Name = "tfex_servicebus_subscription",
TopicId = exampleTopic.Id,
MaxDeliveryCount = 1,
});
});
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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
.name("tfex-servicebus-subscription")
.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())
.partitioningEnabled(true)
.build());
var exampleSubscription = new Subscription("exampleSubscription", SubscriptionArgs.builder()
.name("tfex_servicebus_subscription")
.topicId(exampleTopic.id())
.maxDeliveryCount(1)
.build());
}
}
resources:
example:
type: azure:core:ResourceGroup
properties:
name: tfex-servicebus-subscription
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}
partitioningEnabled: true
exampleSubscription:
type: azure:servicebus:Subscription
name: example
properties:
name: tfex_servicebus_subscription
topicId: ${exampleTopic.id}
maxDeliveryCount: 1
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,
topic_id: Optional[str] = None,
default_message_ttl: Optional[str] = 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,
auto_delete_on_idle: Optional[str] = None,
forward_dead_lettered_messages_to: Optional[str] = None,
forward_to: Optional[str] = None,
lock_duration: Optional[str] = None,
client_scoped_subscription: Optional[SubscriptionClientScopedSubscriptionArgs] = None,
name: Optional[str] = None,
requires_session: Optional[bool] = None,
status: Optional[str] = None,
batched_operations_enabled: Optional[bool] = 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,
TopicId = "string",
DefaultMessageTtl = "string",
ClientScopedSubscriptionEnabled = false,
DeadLetteringOnFilterEvaluationError = false,
DeadLetteringOnMessageExpiration = false,
AutoDeleteOnIdle = "string",
ForwardDeadLetteredMessagesTo = "string",
ForwardTo = "string",
LockDuration = "string",
ClientScopedSubscription = new Azure.ServiceBus.Inputs.SubscriptionClientScopedSubscriptionArgs
{
ClientId = "string",
IsClientScopedSubscriptionDurable = false,
IsClientScopedSubscriptionShareable = false,
},
Name = "string",
RequiresSession = false,
Status = "string",
BatchedOperationsEnabled = false,
});
example, err := servicebus.NewSubscription(ctx, "examplesubscriptionResourceResourceFromServicebussubscription", &servicebus.SubscriptionArgs{
MaxDeliveryCount: pulumi.Int(0),
TopicId: pulumi.String("string"),
DefaultMessageTtl: pulumi.String("string"),
ClientScopedSubscriptionEnabled: pulumi.Bool(false),
DeadLetteringOnFilterEvaluationError: pulumi.Bool(false),
DeadLetteringOnMessageExpiration: pulumi.Bool(false),
AutoDeleteOnIdle: pulumi.String("string"),
ForwardDeadLetteredMessagesTo: pulumi.String("string"),
ForwardTo: pulumi.String("string"),
LockDuration: pulumi.String("string"),
ClientScopedSubscription: &servicebus.SubscriptionClientScopedSubscriptionArgs{
ClientId: pulumi.String("string"),
IsClientScopedSubscriptionDurable: pulumi.Bool(false),
IsClientScopedSubscriptionShareable: pulumi.Bool(false),
},
Name: pulumi.String("string"),
RequiresSession: pulumi.Bool(false),
Status: pulumi.String("string"),
BatchedOperationsEnabled: pulumi.Bool(false),
})
var examplesubscriptionResourceResourceFromServicebussubscription = new Subscription("examplesubscriptionResourceResourceFromServicebussubscription", SubscriptionArgs.builder()
.maxDeliveryCount(0)
.topicId("string")
.defaultMessageTtl("string")
.clientScopedSubscriptionEnabled(false)
.deadLetteringOnFilterEvaluationError(false)
.deadLetteringOnMessageExpiration(false)
.autoDeleteOnIdle("string")
.forwardDeadLetteredMessagesTo("string")
.forwardTo("string")
.lockDuration("string")
.clientScopedSubscription(SubscriptionClientScopedSubscriptionArgs.builder()
.clientId("string")
.isClientScopedSubscriptionDurable(false)
.isClientScopedSubscriptionShareable(false)
.build())
.name("string")
.requiresSession(false)
.status("string")
.batchedOperationsEnabled(false)
.build());
examplesubscription_resource_resource_from_servicebussubscription = azure.servicebus.Subscription("examplesubscriptionResourceResourceFromServicebussubscription",
max_delivery_count=0,
topic_id="string",
default_message_ttl="string",
client_scoped_subscription_enabled=False,
dead_lettering_on_filter_evaluation_error=False,
dead_lettering_on_message_expiration=False,
auto_delete_on_idle="string",
forward_dead_lettered_messages_to="string",
forward_to="string",
lock_duration="string",
client_scoped_subscription={
"clientId": "string",
"isClientScopedSubscriptionDurable": False,
"isClientScopedSubscriptionShareable": False,
},
name="string",
requires_session=False,
status="string",
batched_operations_enabled=False)
const examplesubscriptionResourceResourceFromServicebussubscription = new azure.servicebus.Subscription("examplesubscriptionResourceResourceFromServicebussubscription", {
maxDeliveryCount: 0,
topicId: "string",
defaultMessageTtl: "string",
clientScopedSubscriptionEnabled: false,
deadLetteringOnFilterEvaluationError: false,
deadLetteringOnMessageExpiration: false,
autoDeleteOnIdle: "string",
forwardDeadLetteredMessagesTo: "string",
forwardTo: "string",
lockDuration: "string",
clientScopedSubscription: {
clientId: "string",
isClientScopedSubscriptionDurable: false,
isClientScopedSubscriptionShareable: false,
},
name: "string",
requiresSession: false,
status: "string",
batchedOperationsEnabled: false,
});
type: azure:servicebus:Subscription
properties:
autoDeleteOnIdle: string
batchedOperationsEnabled: false
clientScopedSubscription:
clientId: string
isClientScopedSubscriptionDurable: false
isClientScopedSubscriptionShareable: false
clientScopedSubscriptionEnabled: false
deadLetteringOnFilterEvaluationError: false
deadLetteringOnMessageExpiration: false
defaultMessageTtl: string
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
The Subscription resource accepts the following input properties:
- Max
Delivery intCount - The maximum number of deliveries.
- Topic
Id string - The ID of the ServiceBus Topic to create this Subscription in. Changing this forces a new resource to be created.
- Auto
Delete stringOn Idle - The idle interval after which the topic is automatically deleted as an ISO 8601 duration. The minimum duration is
5
minutes orPT5M
. Defaults toP10675199DT2H48M5.4775807S
. - Batched
Operations boolEnabled - Boolean flag which controls whether the Subscription supports batched operations.
- Client
Scoped SubscriptionSubscription Client Scoped Subscription - A
client_scoped_subscription
block as defined below. - Client
Scoped boolSubscription Enabled whether the subscription is scoped to a client id. Defaults to
false
.NOTE: Client Scoped Subscription can only be used for JMS subscription (Java Message Service).
- 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.
- 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 value used when TimeToLive is not set on a message itself. Defaults to
P10675199DT2H48M5.4775807S
. - 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
1
minute orP0DT0H1M0S
. The maximum value is5
minutes orP0DT0H5M0S
. Defaults toPT1M
. - Name string
- 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 string
- The status of the Subscription. Possible values are
Active
,ReceiveDisabled
, orDisabled
. Defaults toActive
.
- Max
Delivery intCount - The maximum number of deliveries.
- Topic
Id string - The ID of the ServiceBus Topic to create this Subscription in. Changing this forces a new resource to be created.
- Auto
Delete stringOn Idle - The idle interval after which the topic is automatically deleted as an ISO 8601 duration. The minimum duration is
5
minutes orPT5M
. Defaults toP10675199DT2H48M5.4775807S
. - Batched
Operations boolEnabled - Boolean flag which controls whether the Subscription supports batched operations.
- Client
Scoped SubscriptionSubscription Client Scoped Subscription Args - A
client_scoped_subscription
block as defined below. - Client
Scoped boolSubscription Enabled whether the subscription is scoped to a client id. Defaults to
false
.NOTE: Client Scoped Subscription can only be used for JMS subscription (Java Message Service).
- 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.
- 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 value used when TimeToLive is not set on a message itself. Defaults to
P10675199DT2H48M5.4775807S
. - 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
1
minute orP0DT0H1M0S
. The maximum value is5
minutes orP0DT0H5M0S
. Defaults toPT1M
. - Name string
- 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 string
- The status of the Subscription. Possible values are
Active
,ReceiveDisabled
, orDisabled
. Defaults toActive
.
- max
Delivery IntegerCount - The maximum number of deliveries.
- topic
Id String - The ID of the ServiceBus Topic to create this Subscription in. Changing this forces a new resource to be created.
- auto
Delete StringOn Idle - The idle interval after which the topic is automatically deleted as an ISO 8601 duration. The minimum duration is
5
minutes orPT5M
. Defaults toP10675199DT2H48M5.4775807S
. - batched
Operations BooleanEnabled - Boolean flag which controls whether the Subscription supports batched operations.
- client
Scoped SubscriptionSubscription Client Scoped Subscription - A
client_scoped_subscription
block as defined below. - client
Scoped BooleanSubscription Enabled whether the subscription is scoped to a client id. Defaults to
false
.NOTE: Client Scoped Subscription can only be used for JMS subscription (Java Message Service).
- 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.
- 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 value used when TimeToLive is not set on a message itself. Defaults to
P10675199DT2H48M5.4775807S
. - 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
1
minute orP0DT0H1M0S
. The maximum value is5
minutes orP0DT0H5M0S
. Defaults toPT1M
. - name String
- Specifies the name of the ServiceBus Subscription resource. Changing this forces a new resource to be created.
- requires
Session 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
, orDisabled
. Defaults toActive
.
- max
Delivery numberCount - The maximum number of deliveries.
- topic
Id string - The ID of the ServiceBus Topic to create this Subscription in. Changing this forces a new resource to be created.
- auto
Delete stringOn Idle - The idle interval after which the topic is automatically deleted as an ISO 8601 duration. The minimum duration is
5
minutes orPT5M
. Defaults toP10675199DT2H48M5.4775807S
. - batched
Operations booleanEnabled - Boolean flag which controls whether the Subscription supports batched operations.
- client
Scoped SubscriptionSubscription Client Scoped Subscription - A
client_scoped_subscription
block as defined below. - client
Scoped booleanSubscription Enabled whether the subscription is scoped to a client id. Defaults to
false
.NOTE: Client Scoped Subscription can only be used for JMS subscription (Java Message Service).
- 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.
- 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 value used when TimeToLive is not set on a message itself. Defaults to
P10675199DT2H48M5.4775807S
. - 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
1
minute orP0DT0H1M0S
. The maximum value is5
minutes orP0DT0H5M0S
. Defaults toPT1M
. - name string
- Specifies the name of the ServiceBus Subscription resource. Changing this forces a new resource to be created.
- requires
Session 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
, orDisabled
. Defaults toActive
.
- max_
delivery_ intcount - 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_ stron_ idle - The idle interval after which the topic is automatically deleted as an ISO 8601 duration. The minimum duration is
5
minutes orPT5M
. Defaults toP10675199DT2H48M5.4775807S
. - batched_
operations_ boolenabled - Boolean flag which controls whether the Subscription supports batched operations.
- client_
scoped_ Subscriptionsubscription Client Scoped Subscription Args - A
client_scoped_subscription
block as defined below. - client_
scoped_ boolsubscription_ enabled whether the subscription is scoped to a client id. Defaults to
false
.NOTE: Client Scoped Subscription can only be used for JMS subscription (Java Message Service).
- 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.
- 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 value used when TimeToLive is not set on a message itself. Defaults to
P10675199DT2H48M5.4775807S
. - 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
1
minute orP0DT0H1M0S
. The maximum value is5
minutes orP0DT0H5M0S
. Defaults toPT1M
. - 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
, orDisabled
. Defaults toActive
.
- max
Delivery NumberCount - The maximum number of deliveries.
- topic
Id String - The ID of the ServiceBus Topic to create this Subscription in. Changing this forces a new resource to be created.
- auto
Delete StringOn Idle - The idle interval after which the topic is automatically deleted as an ISO 8601 duration. The minimum duration is
5
minutes orPT5M
. Defaults toP10675199DT2H48M5.4775807S
. - batched
Operations BooleanEnabled - Boolean flag which controls whether the Subscription supports batched operations.
- client
Scoped Property MapSubscription - A
client_scoped_subscription
block as defined below. - client
Scoped BooleanSubscription Enabled whether the subscription is scoped to a client id. Defaults to
false
.NOTE: Client Scoped Subscription can only be used for JMS subscription (Java Message Service).
- 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.
- 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 value used when TimeToLive is not set on a message itself. Defaults to
P10675199DT2H48M5.4775807S
. - 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
1
minute orP0DT0H1M0S
. The maximum value is5
minutes orP0DT0H5M0S
. Defaults toPT1M
. - name String
- Specifies the name of the ServiceBus Subscription resource. Changing this forces a new resource to be created.
- requires
Session 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
, orDisabled
. Defaults toActive
.
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,
batched_operations_enabled: Optional[bool] = 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,
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.
- Auto
Delete stringOn Idle - The idle interval after which the topic is automatically deleted as an ISO 8601 duration. The minimum duration is
5
minutes orPT5M
. Defaults toP10675199DT2H48M5.4775807S
. - Batched
Operations boolEnabled - Boolean flag which controls whether the Subscription supports batched operations.
- Client
Scoped SubscriptionSubscription Client Scoped Subscription - A
client_scoped_subscription
block as defined below. - Client
Scoped boolSubscription Enabled whether the subscription is scoped to a client id. Defaults to
false
.NOTE: Client Scoped Subscription can only be used for JMS subscription (Java Message Service).
- 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.
- 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 value used when TimeToLive is not set on a message itself. Defaults to
P10675199DT2H48M5.4775807S
. - 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
1
minute orP0DT0H1M0S
. The maximum value is5
minutes orP0DT0H5M0S
. Defaults toPT1M
. - 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.
- 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 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.
- Auto
Delete stringOn Idle - The idle interval after which the topic is automatically deleted as an ISO 8601 duration. The minimum duration is
5
minutes orPT5M
. Defaults toP10675199DT2H48M5.4775807S
. - Batched
Operations boolEnabled - Boolean flag which controls whether the Subscription supports batched operations.
- Client
Scoped SubscriptionSubscription Client Scoped Subscription Args - A
client_scoped_subscription
block as defined below. - Client
Scoped boolSubscription Enabled whether the subscription is scoped to a client id. Defaults to
false
.NOTE: Client Scoped Subscription can only be used for JMS subscription (Java Message Service).
- 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.
- 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 value used when TimeToLive is not set on a message itself. Defaults to
P10675199DT2H48M5.4775807S
. - 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
1
minute orP0DT0H1M0S
. The maximum value is5
minutes orP0DT0H5M0S
. Defaults toPT1M
. - 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.
- 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 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.
- auto
Delete StringOn Idle - The idle interval after which the topic is automatically deleted as an ISO 8601 duration. The minimum duration is
5
minutes orPT5M
. Defaults toP10675199DT2H48M5.4775807S
. - batched
Operations BooleanEnabled - Boolean flag which controls whether the Subscription supports batched operations.
- client
Scoped SubscriptionSubscription Client Scoped Subscription - A
client_scoped_subscription
block as defined below. - client
Scoped BooleanSubscription Enabled whether the subscription is scoped to a client id. Defaults to
false
.NOTE: Client Scoped Subscription can only be used for JMS subscription (Java Message Service).
- 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.
- 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 value used when TimeToLive is not set on a message itself. Defaults to
P10675199DT2H48M5.4775807S
. - 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
1
minute orP0DT0H1M0S
. The maximum value is5
minutes orP0DT0H5M0S
. Defaults toPT1M
. - 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.
- requires
Session 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
, 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.
- auto
Delete stringOn Idle - The idle interval after which the topic is automatically deleted as an ISO 8601 duration. The minimum duration is
5
minutes orPT5M
. Defaults toP10675199DT2H48M5.4775807S
. - batched
Operations booleanEnabled - Boolean flag which controls whether the Subscription supports batched operations.
- client
Scoped SubscriptionSubscription Client Scoped Subscription - A
client_scoped_subscription
block as defined below. - client
Scoped booleanSubscription Enabled whether the subscription is scoped to a client id. Defaults to
false
.NOTE: Client Scoped Subscription can only be used for JMS subscription (Java Message Service).
- 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.
- 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 value used when TimeToLive is not set on a message itself. Defaults to
P10675199DT2H48M5.4775807S
. - 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
1
minute orP0DT0H1M0S
. The maximum value is5
minutes orP0DT0H5M0S
. Defaults toPT1M
. - 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.
- requires
Session 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
, 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.
- auto_
delete_ stron_ idle - The idle interval after which the topic is automatically deleted as an ISO 8601 duration. The minimum duration is
5
minutes orPT5M
. Defaults toP10675199DT2H48M5.4775807S
. - batched_
operations_ boolenabled - Boolean flag which controls whether the Subscription supports batched operations.
- client_
scoped_ Subscriptionsubscription Client Scoped Subscription Args - A
client_scoped_subscription
block as defined below. - client_
scoped_ boolsubscription_ enabled whether the subscription is scoped to a client id. Defaults to
false
.NOTE: Client Scoped Subscription can only be used for JMS subscription (Java Message Service).
- 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.
- 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 value used when TimeToLive is not set on a message itself. Defaults to
P10675199DT2H48M5.4775807S
. - 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
1
minute orP0DT0H1M0S
. The maximum value is5
minutes orP0DT0H5M0S
. Defaults toPT1M
. - 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.
- 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
, 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.
- auto
Delete StringOn Idle - The idle interval after which the topic is automatically deleted as an ISO 8601 duration. The minimum duration is
5
minutes orPT5M
. Defaults toP10675199DT2H48M5.4775807S
. - batched
Operations BooleanEnabled - Boolean flag which controls whether the Subscription supports batched operations.
- client
Scoped Property MapSubscription - A
client_scoped_subscription
block as defined below. - client
Scoped BooleanSubscription Enabled whether the subscription is scoped to a client id. Defaults to
false
.NOTE: Client Scoped Subscription can only be used for JMS subscription (Java Message Service).
- 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.
- 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 value used when TimeToLive is not set on a message itself. Defaults to
P10675199DT2H48M5.4775807S
. - 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
1
minute orP0DT0H1M0S
. The maximum value is5
minutes orP0DT0H5M0S
. Defaults toPT1M
. - 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.
- requires
Session 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
, 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.
Supporting Types
SubscriptionClientScopedSubscription, SubscriptionClientScopedSubscriptionArgs
- Client
Id string Specifies the Client ID of the application that created the client-scoped subscription. Changing this forces a new resource to be created.
NOTE: Client ID can be null or empty, but it must match the client ID set on the JMS client application. From the Azure Service Bus perspective, a null client ID and an empty client id have the same behavior. If the client ID is set to null or empty, it is only accessible to client applications whose client ID is also set to null or empty.
- Is
Client boolScoped Subscription Durable - Whether the client scoped subscription is durable. This property can only be controlled from the application side.
- bool
- Whether the client scoped subscription is shareable. Defaults to
true
Changing this forces a new resource to be created.
- Client
Id string Specifies the Client ID of the application that created the client-scoped subscription. Changing this forces a new resource to be created.
NOTE: Client ID can be null or empty, but it must match the client ID set on the JMS client application. From the Azure Service Bus perspective, a null client ID and an empty client id have the same behavior. If the client ID is set to null or empty, it is only accessible to client applications whose client ID is also set to null or empty.
- Is
Client boolScoped Subscription Durable - Whether the client scoped subscription is durable. This property can only be controlled from the application side.
- bool
- Whether the client scoped subscription is shareable. Defaults to
true
Changing this forces a new resource to be created.
- client
Id String Specifies the Client ID of the application that created the client-scoped subscription. Changing this forces a new resource to be created.
NOTE: Client ID can be null or empty, but it must match the client ID set on the JMS client application. From the Azure Service Bus perspective, a null client ID and an empty client id have the same behavior. If the client ID is set to null or empty, it is only accessible to client applications whose client ID is also set to null or empty.
- is
Client BooleanScoped Subscription Durable - Whether the client scoped subscription is durable. This property can only be controlled from the application side.
- Boolean
- Whether the client scoped subscription is shareable. Defaults to
true
Changing this forces a new resource to be created.
- client
Id string Specifies the Client ID of the application that created the client-scoped subscription. Changing this forces a new resource to be created.
NOTE: Client ID can be null or empty, but it must match the client ID set on the JMS client application. From the Azure Service Bus perspective, a null client ID and an empty client id have the same behavior. If the client ID is set to null or empty, it is only accessible to client applications whose client ID is also set to null or empty.
- is
Client booleanScoped Subscription Durable - Whether the client scoped subscription is durable. This property can only be controlled from the application side.
- 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.
NOTE: Client ID can be null or empty, but it must match the client ID set on the JMS client application. From the Azure Service Bus perspective, a null client ID and an empty client id have the same behavior. If the client ID is set to null or empty, it is only accessible to client applications whose client ID is also set to null or empty.
- is_
client_ boolscoped_ subscription_ durable - Whether the client scoped subscription is durable. This property can only be controlled from the application side.
- bool
- Whether the client scoped subscription is shareable. Defaults to
true
Changing this forces a new resource to be created.
- client
Id String Specifies the Client ID of the application that created the client-scoped subscription. Changing this forces a new resource to be created.
NOTE: Client ID can be null or empty, but it must match the client ID set on the JMS client application. From the Azure Service Bus perspective, a null client ID and an empty client id have the same behavior. If the client ID is set to null or empty, it is only accessible to client applications whose client ID is also set to null or empty.
- is
Client BooleanScoped Subscription Durable - Whether the client scoped subscription is durable. This property can only be controlled from the application side.
- 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
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
azurerm
Terraform Provider.