import * as pulumi from "@pulumi/pulumi"; /** * Manages a ServiceBus Topic. * * > **Note:** Topics can only be created in Namespaces with an SKU of `Standard` or higher. * * ## 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-topic", * 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, * }); * ``` * * ## API Providers * * * This resource uses the following Azure API Providers: * * * `Microsoft.ServiceBus` - 2024-01-01 * * ## Import * * Service Bus Topics can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:eventhub/topic:Topic example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ServiceBus/namespaces/sbns1/topics/sntopic1 * ``` * * @deprecated azure.eventhub.Topic has been deprecated in favor of azure.servicebus.Topic */ export declare class Topic extends pulumi.CustomResource { /** * Get an existing Topic 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?: TopicState, opts?: pulumi.CustomResourceOptions): Topic; /** * Returns true if the given object is an instance of Topic. 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 Topic; /** * The ISO 8601 timespan duration of the idle interval after which the Topic is automatically deleted, minimum of 5 minutes. Defaults to `P10675199DT2H48M5.4775807S`. */ readonly autoDeleteOnIdle: pulumi.Output; /** * Boolean flag which controls if server-side batched operations are enabled. */ readonly batchedOperationsEnabled: pulumi.Output; /** * The ISO 8601 timespan duration of TTL of messages sent to this topic if no TTL value is set on the message itself. Defaults to `P10675199DT2H48M5.4775807S`. */ readonly defaultMessageTtl: pulumi.Output; /** * The ISO 8601 timespan duration during which duplicates can be detected. Defaults to `PT10M` (10 Minutes). */ readonly duplicateDetectionHistoryTimeWindow: pulumi.Output; /** * Boolean flag which controls whether Express Entities are enabled. An express topic holds a message in memory temporarily before writing it to persistent storage. */ readonly expressEnabled: pulumi.Output; /** * Integer value which controls the maximum size of a message allowed on the topic for Premium SKU. For supported values see the "Large messages support" section of [this document](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-premium-messaging#large-messages-support-preview). Defaults to `256`. */ readonly maxMessageSizeInKilobytes: pulumi.Output; /** * Integer value which controls the size of memory allocated for the topic. For supported values see the "Queue/topic size" section of [this document](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-quotas). Defaults to `5120`. */ readonly maxSizeInMegabytes: pulumi.Output; /** * Specifies the name of the ServiceBus Topic resource. Changing this forces a new resource to be created. */ readonly name: pulumi.Output; /** * The ID of the ServiceBus Namespace to create this topic in. Changing this forces a new resource to be created. */ readonly namespaceId: pulumi.Output; readonly namespaceName: pulumi.Output; /** * Boolean flag which controls whether to enable the topic to be partitioned across multiple message brokers. Changing this forces a new resource to be created. * * > **Note:** Partitioning is available at entity creation for all queues and topics in Basic or Standard SKUs. It is not available for the Premium messaging SKU, but any previously existing partitioned entities in Premium namespaces continue to work as expected. For premium namespaces, partitioning is available at namespace creation and all queues and topics in the partitioned namespace will be partitioned. Premium namespaces that have `premiumMessagingPartitions` set to `1` are not partitioned. Please [see the documentation](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-partitioning) for more information. */ readonly partitioningEnabled: pulumi.Output; /** * Boolean flag which controls whether the Topic requires duplicate detection. Defaults to `false`. Changing this forces a new resource to be created. */ readonly requiresDuplicateDetection: pulumi.Output; readonly resourceGroupName: pulumi.Output; /** * The Status of the Service Bus Topic. Acceptable values are `Active` or `Disabled`. Defaults to `Active`. */ readonly status: pulumi.Output; /** * Boolean flag which controls whether the Topic supports ordering. */ readonly supportOrdering: pulumi.Output; /** * Create a Topic 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.Topic has been deprecated in favor of azure.servicebus.Topic */ constructor(name: string, args: TopicArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Topic resources. */ export interface TopicState { /** * The ISO 8601 timespan duration of the idle interval after which the Topic is automatically deleted, minimum of 5 minutes. Defaults to `P10675199DT2H48M5.4775807S`. */ autoDeleteOnIdle?: pulumi.Input; /** * Boolean flag which controls if server-side batched operations are enabled. */ batchedOperationsEnabled?: pulumi.Input; /** * The ISO 8601 timespan duration of TTL of messages sent to this topic if no TTL value is set on the message itself. Defaults to `P10675199DT2H48M5.4775807S`. */ defaultMessageTtl?: pulumi.Input; /** * The ISO 8601 timespan duration during which duplicates can be detected. Defaults to `PT10M` (10 Minutes). */ duplicateDetectionHistoryTimeWindow?: pulumi.Input; /** * Boolean flag which controls whether Express Entities are enabled. An express topic holds a message in memory temporarily before writing it to persistent storage. */ expressEnabled?: pulumi.Input; /** * Integer value which controls the maximum size of a message allowed on the topic for Premium SKU. For supported values see the "Large messages support" section of [this document](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-premium-messaging#large-messages-support-preview). Defaults to `256`. */ maxMessageSizeInKilobytes?: pulumi.Input; /** * Integer value which controls the size of memory allocated for the topic. For supported values see the "Queue/topic size" section of [this document](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-quotas). Defaults to `5120`. */ maxSizeInMegabytes?: pulumi.Input; /** * Specifies the name of the ServiceBus Topic resource. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * The ID of the ServiceBus Namespace to create this topic in. Changing this forces a new resource to be created. */ namespaceId?: pulumi.Input; namespaceName?: pulumi.Input; /** * Boolean flag which controls whether to enable the topic to be partitioned across multiple message brokers. Changing this forces a new resource to be created. * * > **Note:** Partitioning is available at entity creation for all queues and topics in Basic or Standard SKUs. It is not available for the Premium messaging SKU, but any previously existing partitioned entities in Premium namespaces continue to work as expected. For premium namespaces, partitioning is available at namespace creation and all queues and topics in the partitioned namespace will be partitioned. Premium namespaces that have `premiumMessagingPartitions` set to `1` are not partitioned. Please [see the documentation](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-partitioning) for more information. */ partitioningEnabled?: pulumi.Input; /** * Boolean flag which controls whether the Topic requires duplicate detection. Defaults to `false`. Changing this forces a new resource to be created. */ requiresDuplicateDetection?: pulumi.Input; resourceGroupName?: pulumi.Input; /** * The Status of the Service Bus Topic. Acceptable values are `Active` or `Disabled`. Defaults to `Active`. */ status?: pulumi.Input; /** * Boolean flag which controls whether the Topic supports ordering. */ supportOrdering?: pulumi.Input; } /** * The set of arguments for constructing a Topic resource. */ export interface TopicArgs { /** * The ISO 8601 timespan duration of the idle interval after which the Topic is automatically deleted, minimum of 5 minutes. Defaults to `P10675199DT2H48M5.4775807S`. */ autoDeleteOnIdle?: pulumi.Input; /** * Boolean flag which controls if server-side batched operations are enabled. */ batchedOperationsEnabled?: pulumi.Input; /** * The ISO 8601 timespan duration of TTL of messages sent to this topic if no TTL value is set on the message itself. Defaults to `P10675199DT2H48M5.4775807S`. */ defaultMessageTtl?: pulumi.Input; /** * The ISO 8601 timespan duration during which duplicates can be detected. Defaults to `PT10M` (10 Minutes). */ duplicateDetectionHistoryTimeWindow?: pulumi.Input; /** * Boolean flag which controls whether Express Entities are enabled. An express topic holds a message in memory temporarily before writing it to persistent storage. */ expressEnabled?: pulumi.Input; /** * Integer value which controls the maximum size of a message allowed on the topic for Premium SKU. For supported values see the "Large messages support" section of [this document](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-premium-messaging#large-messages-support-preview). Defaults to `256`. */ maxMessageSizeInKilobytes?: pulumi.Input; /** * Integer value which controls the size of memory allocated for the topic. For supported values see the "Queue/topic size" section of [this document](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-quotas). Defaults to `5120`. */ maxSizeInMegabytes?: pulumi.Input; /** * Specifies the name of the ServiceBus Topic resource. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * The ID of the ServiceBus Namespace to create this topic in. Changing this forces a new resource to be created. */ namespaceId: pulumi.Input; /** * Boolean flag which controls whether to enable the topic to be partitioned across multiple message brokers. Changing this forces a new resource to be created. * * > **Note:** Partitioning is available at entity creation for all queues and topics in Basic or Standard SKUs. It is not available for the Premium messaging SKU, but any previously existing partitioned entities in Premium namespaces continue to work as expected. For premium namespaces, partitioning is available at namespace creation and all queues and topics in the partitioned namespace will be partitioned. Premium namespaces that have `premiumMessagingPartitions` set to `1` are not partitioned. Please [see the documentation](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-partitioning) for more information. */ partitioningEnabled?: pulumi.Input; /** * Boolean flag which controls whether the Topic requires duplicate detection. Defaults to `false`. Changing this forces a new resource to be created. */ requiresDuplicateDetection?: pulumi.Input; /** * The Status of the Service Bus Topic. Acceptable values are `Active` or `Disabled`. Defaults to `Active`. */ status?: pulumi.Input; /** * Boolean flag which controls whether the Topic supports ordering. */ supportOrdering?: pulumi.Input; }