import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Manages a ServiceBus Subscription. * * ## Example Usage * * ```typescript * 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, * }); * ``` * * ## API Providers * * * This resource uses the following Azure API Providers: * * * `Microsoft.ServiceBus` - 2024-01-01 * * ## Import * * Service Bus Subscriptions can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:eventhub/subscription:Subscription example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ServiceBus/namespaces/sbns1/topics/sntopic1/subscriptions/sbsub1 * ``` * * @deprecated azure.eventhub.Subscription has been deprecated in favor of azure.servicebus.Subscription */ export declare class Subscription extends pulumi.CustomResource { /** * Get an existing Subscription resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: SubscriptionState, opts?: pulumi.CustomResourceOptions): Subscription; /** * Returns true if the given object is an instance of Subscription. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Subscription; /** * The idle interval after which the topic is automatically deleted as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). The minimum duration is `5` minutes or `PT5M`. Defaults to `P10675199DT2H48M5.4775807S`. */ readonly autoDeleteOnIdle: pulumi.Output; /** * Boolean flag which controls whether the Subscription supports batched operations. */ readonly batchedOperationsEnabled: pulumi.Output; /** * A `clientScopedSubscription` block as defined below. */ readonly clientScopedSubscription: pulumi.Output; /** * 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). */ readonly clientScopedSubscriptionEnabled: pulumi.Output; /** * Boolean flag which controls whether the Subscription has dead letter support on filter evaluation exceptions. Defaults to `true`. */ readonly deadLetteringOnFilterEvaluationError: pulumi.Output; /** * Boolean flag which controls whether the Subscription has dead letter support when a message expires. */ readonly deadLetteringOnMessageExpiration: pulumi.Output; /** * The Default message timespan to live as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). 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`. */ readonly defaultMessageTtl: pulumi.Output; /** * The name of a Queue or Topic to automatically forward Dead Letter messages to. */ readonly forwardDeadLetteredMessagesTo: pulumi.Output; /** * The name of a Queue or Topic to automatically forward messages to. */ readonly forwardTo: pulumi.Output; /** * The lock duration for the subscription as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). Defaults to `PT1M`. */ readonly lockDuration: pulumi.Output; /** * The maximum number of deliveries. */ readonly maxDeliveryCount: pulumi.Output; /** * Specifies the name of the ServiceBus Subscription resource. Changing this forces a new resource to be created. */ readonly name: pulumi.Output; /** * Boolean flag which controls whether this Subscription supports the concept of a session. Changing this forces a new resource to be created. */ readonly requiresSession: pulumi.Output; /** * The status of the Subscription. Possible values are `Active`,`ReceiveDisabled`, or `Disabled`. Defaults to `Active`. */ readonly status: pulumi.Output; /** * The ID of the ServiceBus Topic to create this Subscription in. Changing this forces a new resource to be created. */ readonly topicId: pulumi.Output; /** * Create a Subscription resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ /** @deprecated azure.eventhub.Subscription has been deprecated in favor of azure.servicebus.Subscription */ constructor(name: string, args: SubscriptionArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Subscription resources. */ export interface SubscriptionState { /** * The idle interval after which the topic is automatically deleted as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). The minimum duration is `5` minutes or `PT5M`. Defaults to `P10675199DT2H48M5.4775807S`. */ autoDeleteOnIdle?: pulumi.Input; /** * Boolean flag which controls whether the Subscription supports batched operations. */ batchedOperationsEnabled?: pulumi.Input; /** * A `clientScopedSubscription` block as defined below. */ clientScopedSubscription?: pulumi.Input; /** * 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). */ clientScopedSubscriptionEnabled?: pulumi.Input; /** * Boolean flag which controls whether the Subscription has dead letter support on filter evaluation exceptions. Defaults to `true`. */ deadLetteringOnFilterEvaluationError?: pulumi.Input; /** * Boolean flag which controls whether the Subscription has dead letter support when a message expires. */ deadLetteringOnMessageExpiration?: pulumi.Input; /** * The Default message timespan to live as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). 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`. */ defaultMessageTtl?: pulumi.Input; /** * The name of a Queue or Topic to automatically forward Dead Letter messages to. */ forwardDeadLetteredMessagesTo?: pulumi.Input; /** * The name of a Queue or Topic to automatically forward messages to. */ forwardTo?: pulumi.Input; /** * The lock duration for the subscription as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). Defaults to `PT1M`. */ lockDuration?: pulumi.Input; /** * The maximum number of deliveries. */ maxDeliveryCount?: pulumi.Input; /** * Specifies the name of the ServiceBus Subscription resource. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * Boolean flag which controls whether this Subscription supports the concept of a session. Changing this forces a new resource to be created. */ requiresSession?: pulumi.Input; /** * The status of the Subscription. Possible values are `Active`,`ReceiveDisabled`, or `Disabled`. Defaults to `Active`. */ status?: pulumi.Input; /** * The ID of the ServiceBus Topic to create this Subscription in. Changing this forces a new resource to be created. */ topicId?: pulumi.Input; } /** * The set of arguments for constructing a Subscription resource. */ export interface SubscriptionArgs { /** * The idle interval after which the topic is automatically deleted as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). The minimum duration is `5` minutes or `PT5M`. Defaults to `P10675199DT2H48M5.4775807S`. */ autoDeleteOnIdle?: pulumi.Input; /** * Boolean flag which controls whether the Subscription supports batched operations. */ batchedOperationsEnabled?: pulumi.Input; /** * A `clientScopedSubscription` block as defined below. */ clientScopedSubscription?: pulumi.Input; /** * 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). */ clientScopedSubscriptionEnabled?: pulumi.Input; /** * Boolean flag which controls whether the Subscription has dead letter support on filter evaluation exceptions. Defaults to `true`. */ deadLetteringOnFilterEvaluationError?: pulumi.Input; /** * Boolean flag which controls whether the Subscription has dead letter support when a message expires. */ deadLetteringOnMessageExpiration?: pulumi.Input; /** * The Default message timespan to live as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). 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`. */ defaultMessageTtl?: pulumi.Input; /** * The name of a Queue or Topic to automatically forward Dead Letter messages to. */ forwardDeadLetteredMessagesTo?: pulumi.Input; /** * The name of a Queue or Topic to automatically forward messages to. */ forwardTo?: pulumi.Input; /** * The lock duration for the subscription as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). Defaults to `PT1M`. */ lockDuration?: pulumi.Input; /** * The maximum number of deliveries. */ maxDeliveryCount: pulumi.Input; /** * Specifies the name of the ServiceBus Subscription resource. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * Boolean flag which controls whether this Subscription supports the concept of a session. Changing this forces a new resource to be created. */ requiresSession?: pulumi.Input; /** * The status of the Subscription. Possible values are `Active`,`ReceiveDisabled`, or `Disabled`. Defaults to `Active`. */ status?: pulumi.Input; /** * The ID of the ServiceBus Topic to create this Subscription in. Changing this forces a new resource to be created. */ topicId: pulumi.Input; }