We recommend using Azure Native.
azure.servicebus.Topic
Explore with Pulumi AI
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)
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
})
}
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 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
Create Topic Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Topic(name: string, args: TopicArgs, opts?: CustomResourceOptions);
@overload
def Topic(resource_name: str,
args: TopicArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Topic(resource_name: str,
opts: Optional[ResourceOptions] = None,
namespace_id: Optional[str] = None,
max_size_in_megabytes: Optional[int] = None,
default_message_ttl: Optional[str] = None,
duplicate_detection_history_time_window: Optional[str] = None,
express_enabled: Optional[bool] = None,
max_message_size_in_kilobytes: Optional[int] = None,
auto_delete_on_idle: Optional[str] = None,
name: Optional[str] = None,
batched_operations_enabled: Optional[bool] = None,
partitioning_enabled: Optional[bool] = None,
requires_duplicate_detection: Optional[bool] = None,
status: Optional[str] = None,
support_ordering: Optional[bool] = None)
func NewTopic(ctx *Context, name string, args TopicArgs, opts ...ResourceOption) (*Topic, error)
public Topic(string name, TopicArgs args, CustomResourceOptions? opts = null)
type: azure:servicebus:Topic
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 TopicArgs
- 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 TopicArgs
- 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 TopicArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TopicArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TopicArgs
- 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 azureTopicResource = new Azure.ServiceBus.Topic("azureTopicResource", new()
{
NamespaceId = "string",
MaxSizeInMegabytes = 0,
DefaultMessageTtl = "string",
DuplicateDetectionHistoryTimeWindow = "string",
ExpressEnabled = false,
MaxMessageSizeInKilobytes = 0,
AutoDeleteOnIdle = "string",
Name = "string",
BatchedOperationsEnabled = false,
PartitioningEnabled = false,
RequiresDuplicateDetection = false,
Status = "string",
SupportOrdering = false,
});
example, err := servicebus.NewTopic(ctx, "azureTopicResource", &servicebus.TopicArgs{
NamespaceId: pulumi.String("string"),
MaxSizeInMegabytes: pulumi.Int(0),
DefaultMessageTtl: pulumi.String("string"),
DuplicateDetectionHistoryTimeWindow: pulumi.String("string"),
ExpressEnabled: pulumi.Bool(false),
MaxMessageSizeInKilobytes: pulumi.Int(0),
AutoDeleteOnIdle: pulumi.String("string"),
Name: pulumi.String("string"),
BatchedOperationsEnabled: pulumi.Bool(false),
PartitioningEnabled: pulumi.Bool(false),
RequiresDuplicateDetection: pulumi.Bool(false),
Status: pulumi.String("string"),
SupportOrdering: pulumi.Bool(false),
})
var azureTopicResource = new Topic("azureTopicResource", TopicArgs.builder()
.namespaceId("string")
.maxSizeInMegabytes(0)
.defaultMessageTtl("string")
.duplicateDetectionHistoryTimeWindow("string")
.expressEnabled(false)
.maxMessageSizeInKilobytes(0)
.autoDeleteOnIdle("string")
.name("string")
.batchedOperationsEnabled(false)
.partitioningEnabled(false)
.requiresDuplicateDetection(false)
.status("string")
.supportOrdering(false)
.build());
azure_topic_resource = azure.servicebus.Topic("azureTopicResource",
namespace_id="string",
max_size_in_megabytes=0,
default_message_ttl="string",
duplicate_detection_history_time_window="string",
express_enabled=False,
max_message_size_in_kilobytes=0,
auto_delete_on_idle="string",
name="string",
batched_operations_enabled=False,
partitioning_enabled=False,
requires_duplicate_detection=False,
status="string",
support_ordering=False)
const azureTopicResource = new azure.servicebus.Topic("azureTopicResource", {
namespaceId: "string",
maxSizeInMegabytes: 0,
defaultMessageTtl: "string",
duplicateDetectionHistoryTimeWindow: "string",
expressEnabled: false,
maxMessageSizeInKilobytes: 0,
autoDeleteOnIdle: "string",
name: "string",
batchedOperationsEnabled: false,
partitioningEnabled: false,
requiresDuplicateDetection: false,
status: "string",
supportOrdering: false,
});
type: azure:servicebus:Topic
properties:
autoDeleteOnIdle: string
batchedOperationsEnabled: false
defaultMessageTtl: string
duplicateDetectionHistoryTimeWindow: string
expressEnabled: false
maxMessageSizeInKilobytes: 0
maxSizeInMegabytes: 0
name: string
namespaceId: string
partitioningEnabled: false
requiresDuplicateDetection: false
status: string
supportOrdering: false
Topic 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 Topic resource accepts the following input properties:
- Namespace
Id string - The ID of the ServiceBus Namespace to create this topic in. Changing this forces a new resource to be created.
- Auto
Delete stringOn Idle - The ISO 8601 timespan duration of the idle interval after which the Topic is automatically deleted, minimum of 5 minutes. Defaults to
P10675199DT2H48M5.4775807S
. - Batched
Operations boolEnabled - Boolean flag which controls if server-side batched operations are enabled.
- Default
Message stringTtl - 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
. - Duplicate
Detection stringHistory Time Window - The ISO 8601 timespan duration during which duplicates can be detected. Defaults to
PT10M
(10 Minutes). - Express
Enabled bool - Boolean flag which controls whether Express Entities are enabled. An express topic holds a message in memory temporarily before writing it to persistent storage.
- Max
Message intSize In Kilobytes - 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
. - Max
Size intIn Megabytes - 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
. - Name string
- Specifies the name of the ServiceBus Topic resource. Changing this forces a new resource to be created.
- Partitioning
Enabled bool 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. Please see the documentation for more information.
- Requires
Duplicate boolDetection - Boolean flag which controls whether the Topic requires duplicate detection. Defaults to
false
. Changing this forces a new resource to be created. - Status string
- The Status of the Service Bus Topic. Acceptable values are
Active
orDisabled
. Defaults toActive
. - Support
Ordering bool - Boolean flag which controls whether the Topic supports ordering.
- Namespace
Id string - The ID of the ServiceBus Namespace to create this topic in. Changing this forces a new resource to be created.
- Auto
Delete stringOn Idle - The ISO 8601 timespan duration of the idle interval after which the Topic is automatically deleted, minimum of 5 minutes. Defaults to
P10675199DT2H48M5.4775807S
. - Batched
Operations boolEnabled - Boolean flag which controls if server-side batched operations are enabled.
- Default
Message stringTtl - 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
. - Duplicate
Detection stringHistory Time Window - The ISO 8601 timespan duration during which duplicates can be detected. Defaults to
PT10M
(10 Minutes). - Express
Enabled bool - Boolean flag which controls whether Express Entities are enabled. An express topic holds a message in memory temporarily before writing it to persistent storage.
- Max
Message intSize In Kilobytes - 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
. - Max
Size intIn Megabytes - 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
. - Name string
- Specifies the name of the ServiceBus Topic resource. Changing this forces a new resource to be created.
- Partitioning
Enabled bool 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. Please see the documentation for more information.
- Requires
Duplicate boolDetection - Boolean flag which controls whether the Topic requires duplicate detection. Defaults to
false
. Changing this forces a new resource to be created. - Status string
- The Status of the Service Bus Topic. Acceptable values are
Active
orDisabled
. Defaults toActive
. - Support
Ordering bool - Boolean flag which controls whether the Topic supports ordering.
- namespace
Id String - The ID of the ServiceBus Namespace to create this topic in. Changing this forces a new resource to be created.
- auto
Delete StringOn Idle - The ISO 8601 timespan duration of the idle interval after which the Topic is automatically deleted, minimum of 5 minutes. Defaults to
P10675199DT2H48M5.4775807S
. - batched
Operations BooleanEnabled - Boolean flag which controls if server-side batched operations are enabled.
- default
Message StringTtl - 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
. - duplicate
Detection StringHistory Time Window - The ISO 8601 timespan duration during which duplicates can be detected. Defaults to
PT10M
(10 Minutes). - express
Enabled Boolean - Boolean flag which controls whether Express Entities are enabled. An express topic holds a message in memory temporarily before writing it to persistent storage.
- max
Message IntegerSize In Kilobytes - 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
. - max
Size IntegerIn Megabytes - 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
. - name String
- Specifies the name of the ServiceBus Topic resource. Changing this forces a new resource to be created.
- partitioning
Enabled Boolean 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. Please see the documentation for more information.
- requires
Duplicate BooleanDetection - Boolean flag which controls whether the Topic requires duplicate detection. Defaults to
false
. Changing this forces a new resource to be created. - status String
- The Status of the Service Bus Topic. Acceptable values are
Active
orDisabled
. Defaults toActive
. - support
Ordering Boolean - Boolean flag which controls whether the Topic supports ordering.
- namespace
Id string - The ID of the ServiceBus Namespace to create this topic in. Changing this forces a new resource to be created.
- auto
Delete stringOn Idle - The ISO 8601 timespan duration of the idle interval after which the Topic is automatically deleted, minimum of 5 minutes. Defaults to
P10675199DT2H48M5.4775807S
. - batched
Operations booleanEnabled - Boolean flag which controls if server-side batched operations are enabled.
- default
Message stringTtl - 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
. - duplicate
Detection stringHistory Time Window - The ISO 8601 timespan duration during which duplicates can be detected. Defaults to
PT10M
(10 Minutes). - express
Enabled boolean - Boolean flag which controls whether Express Entities are enabled. An express topic holds a message in memory temporarily before writing it to persistent storage.
- max
Message numberSize In Kilobytes - 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
. - max
Size numberIn Megabytes - 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
. - name string
- Specifies the name of the ServiceBus Topic resource. Changing this forces a new resource to be created.
- partitioning
Enabled boolean 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. Please see the documentation for more information.
- requires
Duplicate booleanDetection - Boolean flag which controls whether the Topic requires duplicate detection. Defaults to
false
. Changing this forces a new resource to be created. - status string
- The Status of the Service Bus Topic. Acceptable values are
Active
orDisabled
. Defaults toActive
. - support
Ordering boolean - Boolean flag which controls whether the Topic supports ordering.
- namespace_
id str - The ID of the ServiceBus Namespace to create this topic in. Changing this forces a new resource to be created.
- auto_
delete_ stron_ idle - The ISO 8601 timespan duration of the idle interval after which the Topic is automatically deleted, minimum of 5 minutes. Defaults to
P10675199DT2H48M5.4775807S
. - batched_
operations_ boolenabled - Boolean flag which controls if server-side batched operations are enabled.
- default_
message_ strttl - 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
. - duplicate_
detection_ strhistory_ time_ window - The ISO 8601 timespan duration during which duplicates can be detected. Defaults to
PT10M
(10 Minutes). - express_
enabled bool - Boolean flag which controls whether Express Entities are enabled. An express topic holds a message in memory temporarily before writing it to persistent storage.
- max_
message_ intsize_ in_ kilobytes - 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
. - max_
size_ intin_ megabytes - 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
. - name str
- Specifies the name of the ServiceBus Topic resource. Changing this forces a new resource to be created.
- partitioning_
enabled bool 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. Please see the documentation for more information.
- requires_
duplicate_ booldetection - Boolean flag which controls whether the Topic requires duplicate detection. Defaults to
false
. Changing this forces a new resource to be created. - status str
- The Status of the Service Bus Topic. Acceptable values are
Active
orDisabled
. Defaults toActive
. - support_
ordering bool - Boolean flag which controls whether the Topic supports ordering.
- namespace
Id String - The ID of the ServiceBus Namespace to create this topic in. Changing this forces a new resource to be created.
- auto
Delete StringOn Idle - The ISO 8601 timespan duration of the idle interval after which the Topic is automatically deleted, minimum of 5 minutes. Defaults to
P10675199DT2H48M5.4775807S
. - batched
Operations BooleanEnabled - Boolean flag which controls if server-side batched operations are enabled.
- default
Message StringTtl - 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
. - duplicate
Detection StringHistory Time Window - The ISO 8601 timespan duration during which duplicates can be detected. Defaults to
PT10M
(10 Minutes). - express
Enabled Boolean - Boolean flag which controls whether Express Entities are enabled. An express topic holds a message in memory temporarily before writing it to persistent storage.
- max
Message NumberSize In Kilobytes - 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
. - max
Size NumberIn Megabytes - 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
. - name String
- Specifies the name of the ServiceBus Topic resource. Changing this forces a new resource to be created.
- partitioning
Enabled Boolean 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. Please see the documentation for more information.
- requires
Duplicate BooleanDetection - Boolean flag which controls whether the Topic requires duplicate detection. Defaults to
false
. Changing this forces a new resource to be created. - status String
- The Status of the Service Bus Topic. Acceptable values are
Active
orDisabled
. Defaults toActive
. - support
Ordering Boolean - Boolean flag which controls whether the Topic supports ordering.
Outputs
All input properties are implicitly available as output properties. Additionally, the Topic resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Namespace
Name string - Resource
Group stringName
- Id string
- The provider-assigned unique ID for this managed resource.
- Namespace
Name string - Resource
Group stringName
- id String
- The provider-assigned unique ID for this managed resource.
- namespace
Name String - resource
Group StringName
- id string
- The provider-assigned unique ID for this managed resource.
- namespace
Name string - resource
Group stringName
- id str
- The provider-assigned unique ID for this managed resource.
- namespace_
name str - resource_
group_ strname
- id String
- The provider-assigned unique ID for this managed resource.
- namespace
Name String - resource
Group StringName
Look up Existing Topic Resource
Get an existing Topic 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?: TopicState, opts?: CustomResourceOptions): Topic
@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,
default_message_ttl: Optional[str] = None,
duplicate_detection_history_time_window: Optional[str] = None,
express_enabled: Optional[bool] = None,
max_message_size_in_kilobytes: Optional[int] = None,
max_size_in_megabytes: Optional[int] = None,
name: Optional[str] = None,
namespace_id: Optional[str] = None,
namespace_name: Optional[str] = None,
partitioning_enabled: Optional[bool] = None,
requires_duplicate_detection: Optional[bool] = None,
resource_group_name: Optional[str] = None,
status: Optional[str] = None,
support_ordering: Optional[bool] = None) -> Topic
func GetTopic(ctx *Context, name string, id IDInput, state *TopicState, opts ...ResourceOption) (*Topic, error)
public static Topic Get(string name, Input<string> id, TopicState? state, CustomResourceOptions? opts = null)
public static Topic get(String name, Output<String> id, TopicState 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 ISO 8601 timespan duration of the idle interval after which the Topic is automatically deleted, minimum of 5 minutes. Defaults to
P10675199DT2H48M5.4775807S
. - Batched
Operations boolEnabled - Boolean flag which controls if server-side batched operations are enabled.
- Default
Message stringTtl - 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
. - Duplicate
Detection stringHistory Time Window - The ISO 8601 timespan duration during which duplicates can be detected. Defaults to
PT10M
(10 Minutes). - Express
Enabled bool - Boolean flag which controls whether Express Entities are enabled. An express topic holds a message in memory temporarily before writing it to persistent storage.
- Max
Message intSize In Kilobytes - 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
. - Max
Size intIn Megabytes - 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
. - Name string
- Specifies the name of the ServiceBus Topic resource. Changing this forces a new resource to be created.
- Namespace
Id string - The ID of the ServiceBus Namespace to create this topic in. Changing this forces a new resource to be created.
- Namespace
Name string - Partitioning
Enabled bool 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. Please see the documentation for more information.
- Requires
Duplicate boolDetection - Boolean flag which controls whether the Topic requires duplicate detection. Defaults to
false
. Changing this forces a new resource to be created. - Resource
Group stringName - Status string
- The Status of the Service Bus Topic. Acceptable values are
Active
orDisabled
. Defaults toActive
. - Support
Ordering bool - Boolean flag which controls whether the Topic supports ordering.
- Auto
Delete stringOn Idle - The ISO 8601 timespan duration of the idle interval after which the Topic is automatically deleted, minimum of 5 minutes. Defaults to
P10675199DT2H48M5.4775807S
. - Batched
Operations boolEnabled - Boolean flag which controls if server-side batched operations are enabled.
- Default
Message stringTtl - 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
. - Duplicate
Detection stringHistory Time Window - The ISO 8601 timespan duration during which duplicates can be detected. Defaults to
PT10M
(10 Minutes). - Express
Enabled bool - Boolean flag which controls whether Express Entities are enabled. An express topic holds a message in memory temporarily before writing it to persistent storage.
- Max
Message intSize In Kilobytes - 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
. - Max
Size intIn Megabytes - 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
. - Name string
- Specifies the name of the ServiceBus Topic resource. Changing this forces a new resource to be created.
- Namespace
Id string - The ID of the ServiceBus Namespace to create this topic in. Changing this forces a new resource to be created.
- Namespace
Name string - Partitioning
Enabled bool 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. Please see the documentation for more information.
- Requires
Duplicate boolDetection - Boolean flag which controls whether the Topic requires duplicate detection. Defaults to
false
. Changing this forces a new resource to be created. - Resource
Group stringName - Status string
- The Status of the Service Bus Topic. Acceptable values are
Active
orDisabled
. Defaults toActive
. - Support
Ordering bool - Boolean flag which controls whether the Topic supports ordering.
- auto
Delete StringOn Idle - The ISO 8601 timespan duration of the idle interval after which the Topic is automatically deleted, minimum of 5 minutes. Defaults to
P10675199DT2H48M5.4775807S
. - batched
Operations BooleanEnabled - Boolean flag which controls if server-side batched operations are enabled.
- default
Message StringTtl - 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
. - duplicate
Detection StringHistory Time Window - The ISO 8601 timespan duration during which duplicates can be detected. Defaults to
PT10M
(10 Minutes). - express
Enabled Boolean - Boolean flag which controls whether Express Entities are enabled. An express topic holds a message in memory temporarily before writing it to persistent storage.
- max
Message IntegerSize In Kilobytes - 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
. - max
Size IntegerIn Megabytes - 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
. - name String
- Specifies the name of the ServiceBus Topic resource. Changing this forces a new resource to be created.
- namespace
Id String - The ID of the ServiceBus Namespace to create this topic in. Changing this forces a new resource to be created.
- namespace
Name String - partitioning
Enabled Boolean 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. Please see the documentation for more information.
- requires
Duplicate BooleanDetection - Boolean flag which controls whether the Topic requires duplicate detection. Defaults to
false
. Changing this forces a new resource to be created. - resource
Group StringName - status String
- The Status of the Service Bus Topic. Acceptable values are
Active
orDisabled
. Defaults toActive
. - support
Ordering Boolean - Boolean flag which controls whether the Topic supports ordering.
- auto
Delete stringOn Idle - The ISO 8601 timespan duration of the idle interval after which the Topic is automatically deleted, minimum of 5 minutes. Defaults to
P10675199DT2H48M5.4775807S
. - batched
Operations booleanEnabled - Boolean flag which controls if server-side batched operations are enabled.
- default
Message stringTtl - 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
. - duplicate
Detection stringHistory Time Window - The ISO 8601 timespan duration during which duplicates can be detected. Defaults to
PT10M
(10 Minutes). - express
Enabled boolean - Boolean flag which controls whether Express Entities are enabled. An express topic holds a message in memory temporarily before writing it to persistent storage.
- max
Message numberSize In Kilobytes - 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
. - max
Size numberIn Megabytes - 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
. - name string
- Specifies the name of the ServiceBus Topic resource. Changing this forces a new resource to be created.
- namespace
Id string - The ID of the ServiceBus Namespace to create this topic in. Changing this forces a new resource to be created.
- namespace
Name string - partitioning
Enabled boolean 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. Please see the documentation for more information.
- requires
Duplicate booleanDetection - Boolean flag which controls whether the Topic requires duplicate detection. Defaults to
false
. Changing this forces a new resource to be created. - resource
Group stringName - status string
- The Status of the Service Bus Topic. Acceptable values are
Active
orDisabled
. Defaults toActive
. - support
Ordering boolean - Boolean flag which controls whether the Topic supports ordering.
- auto_
delete_ stron_ idle - The ISO 8601 timespan duration of the idle interval after which the Topic is automatically deleted, minimum of 5 minutes. Defaults to
P10675199DT2H48M5.4775807S
. - batched_
operations_ boolenabled - Boolean flag which controls if server-side batched operations are enabled.
- default_
message_ strttl - 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
. - duplicate_
detection_ strhistory_ time_ window - The ISO 8601 timespan duration during which duplicates can be detected. Defaults to
PT10M
(10 Minutes). - express_
enabled bool - Boolean flag which controls whether Express Entities are enabled. An express topic holds a message in memory temporarily before writing it to persistent storage.
- max_
message_ intsize_ in_ kilobytes - 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
. - max_
size_ intin_ megabytes - 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
. - name str
- Specifies the name of the ServiceBus Topic resource. Changing this forces a new resource to be created.
- namespace_
id str - The ID of the ServiceBus Namespace to create this topic in. Changing this forces a new resource to be created.
- namespace_
name str - partitioning_
enabled bool 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. Please see the documentation for more information.
- requires_
duplicate_ booldetection - Boolean flag which controls whether the Topic requires duplicate detection. Defaults to
false
. Changing this forces a new resource to be created. - resource_
group_ strname - status str
- The Status of the Service Bus Topic. Acceptable values are
Active
orDisabled
. Defaults toActive
. - support_
ordering bool - Boolean flag which controls whether the Topic supports ordering.
- auto
Delete StringOn Idle - The ISO 8601 timespan duration of the idle interval after which the Topic is automatically deleted, minimum of 5 minutes. Defaults to
P10675199DT2H48M5.4775807S
. - batched
Operations BooleanEnabled - Boolean flag which controls if server-side batched operations are enabled.
- default
Message StringTtl - 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
. - duplicate
Detection StringHistory Time Window - The ISO 8601 timespan duration during which duplicates can be detected. Defaults to
PT10M
(10 Minutes). - express
Enabled Boolean - Boolean flag which controls whether Express Entities are enabled. An express topic holds a message in memory temporarily before writing it to persistent storage.
- max
Message NumberSize In Kilobytes - 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
. - max
Size NumberIn Megabytes - 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
. - name String
- Specifies the name of the ServiceBus Topic resource. Changing this forces a new resource to be created.
- namespace
Id String - The ID of the ServiceBus Namespace to create this topic in. Changing this forces a new resource to be created.
- namespace
Name String - partitioning
Enabled Boolean 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. Please see the documentation for more information.
- requires
Duplicate BooleanDetection - Boolean flag which controls whether the Topic requires duplicate detection. Defaults to
false
. Changing this forces a new resource to be created. - resource
Group StringName - status String
- The Status of the Service Bus Topic. Acceptable values are
Active
orDisabled
. Defaults toActive
. - support
Ordering Boolean - Boolean flag which controls whether the Topic supports ordering.
Import
Service Bus Topics can be imported using the resource id
, e.g.
$ pulumi import azure:servicebus/topic:Topic example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ServiceBus/namespaces/sbns1/topics/sntopic1
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.