TopicArgs

data class TopicArgs constructor(val autoDeleteOnIdle: Output<String>? = null, val batchedOperationsEnabled: Output<Boolean>? = null, val defaultMessageTtl: Output<String>? = null, val duplicateDetectionHistoryTimeWindow: Output<String>? = null, val expressEnabled: Output<Boolean>? = null, val maxMessageSizeInKilobytes: Output<Int>? = null, val maxSizeInMegabytes: Output<Int>? = null, val name: Output<String>? = null, val namespaceId: Output<String>? = null, val partitioningEnabled: Output<Boolean>? = null, val requiresDuplicateDetection: Output<Boolean>? = null, val status: Output<String>? = null, val supportOrdering: Output<Boolean>? = null) : ConvertibleToJava<TopicArgs>

Manages a ServiceBus Topic. Note Topics can only be created in Namespaces with an SKU of standard or higher.

Example Usage

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,
});
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="tfex-servicebus-topic",
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)
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-topic",
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,
});
});
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-topic"),
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
}
_, 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
}
return nil
})
}
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 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-topic")
.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());
}
}
resources:
example:
type: azure:core:ResourceGroup
properties:
name: tfex-servicebus-topic
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

Import

Service Bus Topics can be imported using the resource id, e.g.

$ pulumi import azure:eventhub/topic:Topic example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ServiceBus/namespaces/sbns1/topics/sntopic1

Constructors

Link copied to clipboard
constructor(autoDeleteOnIdle: Output<String>? = null, batchedOperationsEnabled: Output<Boolean>? = null, defaultMessageTtl: Output<String>? = null, duplicateDetectionHistoryTimeWindow: Output<String>? = null, expressEnabled: Output<Boolean>? = null, maxMessageSizeInKilobytes: Output<Int>? = null, maxSizeInMegabytes: Output<Int>? = null, name: Output<String>? = null, namespaceId: Output<String>? = null, partitioningEnabled: Output<Boolean>? = null, requiresDuplicateDetection: Output<Boolean>? = null, status: Output<String>? = null, supportOrdering: Output<Boolean>? = null)

Properties

Link copied to clipboard
val autoDeleteOnIdle: Output<String>? = null

The ISO 8601 timespan duration of the idle interval after which the Topic is automatically deleted, minimum of 5 minutes. Defaults to P10675199DT2H48M5.4775807S.

Link copied to clipboard
val batchedOperationsEnabled: Output<Boolean>? = null

Boolean flag which controls if server-side batched operations are enabled.

Link copied to clipboard
val defaultMessageTtl: Output<String>? = null

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.

Link copied to clipboard

The ISO 8601 timespan duration during which duplicates can be detected. Defaults to PT10M (10 Minutes).

Link copied to clipboard
val expressEnabled: Output<Boolean>? = null

Boolean flag which controls whether Express Entities are enabled. An express topic holds a message in memory temporarily before writing it to persistent storage.

Link copied to clipboard
val maxMessageSizeInKilobytes: Output<Int>? = null

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. Defaults to 256.

Link copied to clipboard
val maxSizeInMegabytes: Output<Int>? = null

Integer value which controls the size of memory allocated for the topic. For supported values see the "Queue/topic size" section of this document. Defaults to 5120.

Link copied to clipboard
val name: Output<String>? = null

Specifies the name of the ServiceBus Topic resource. Changing this forces a new resource to be created.

Link copied to clipboard
val namespaceId: Output<String>? = null

The ID of the ServiceBus Namespace to create this topic in. Changing this forces a new resource to be created.

Link copied to clipboard
val partitioningEnabled: Output<Boolean>? = null

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.

Link copied to clipboard
val requiresDuplicateDetection: Output<Boolean>? = null

Boolean flag which controls whether the Topic requires duplicate detection. Defaults to false. Changing this forces a new resource to be created.

Link copied to clipboard
val status: Output<String>? = null

The Status of the Service Bus Topic. Acceptable values are Active or Disabled. Defaults to Active.

Link copied to clipboard
val supportOrdering: Output<Boolean>? = null

Boolean flag which controls whether the Topic supports ordering.

Functions

Link copied to clipboard
open override fun toJava(): TopicArgs