Class Topic
Manages a ServiceBus Topic.
Note Topics can only be created in Namespaces with an SKU of standard or higher.
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
{
Location = "West Europe",
});
var exampleNamespace = new Azure.ServiceBus.Namespace("exampleNamespace", new Azure.ServiceBus.NamespaceArgs
{
Location = exampleResourceGroup.Location,
ResourceGroupName = exampleResourceGroup.Name,
Sku = "Standard",
Tags =
{
{ "source", "example" },
},
});
var exampleTopic = new Azure.ServiceBus.Topic("exampleTopic", new Azure.ServiceBus.TopicArgs
{
ResourceGroupName = exampleResourceGroup.Name,
NamespaceName = exampleNamespace.Name,
EnablePartitioning = true,
});
}
}
Inherited Members
Namespace: Pulumi.Azure.ServiceBus
Assembly: Pulumi.Azure.dll
Syntax
public class Topic : CustomResource
Constructors
View SourceTopic(String, TopicArgs, CustomResourceOptions)
Create a Topic resource with the given unique name, arguments, and options.
Declaration
public Topic(string name, TopicArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| TopicArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceAutoDeleteOnIdle
The ISO 8601 timespan duration of the idle interval after which the Topic is automatically deleted, minimum of 5 minutes.
Declaration
public Output<string> AutoDeleteOnIdle { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
DefaultMessageTtl
The ISO 8601 timespan duration of TTL of messages sent to this topic if no TTL value is set on the message itself.
Declaration
public Output<string> DefaultMessageTtl { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
DuplicateDetectionHistoryTimeWindow
The ISO 8601 timespan duration during which
duplicates can be detected. Defaults to 10 minutes. (PT10M)
Declaration
public Output<string> DuplicateDetectionHistoryTimeWindow { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
EnableBatchedOperations
Boolean flag which controls if server-side batched operations are enabled. Defaults to false.
Declaration
public Output<bool?> EnableBatchedOperations { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
EnableExpress
Boolean flag which controls whether Express Entities are enabled. An express topic holds a message in memory temporarily before writing it to persistent storage. Defaults to false.
Declaration
public Output<bool?> EnableExpress { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
EnablePartitioning
Boolean flag which controls whether to enable the topic to be partitioned across multiple message brokers. Defaults to false. Changing this forces a new resource to be created.
Declaration
public Output<bool?> EnablePartitioning { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
MaxSizeInMegabytes
Integer value which controls the size of memory allocated for the topic. For supported values see the "Queue/topic size" section of this document.
Declaration
public Output<int> MaxSizeInMegabytes { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
Name
Specifies the name of the ServiceBus Topic resource. Changing this forces a new resource to be created.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
NamespaceName
The name of the ServiceBus Namespace to create this topic in. Changing this forces a new resource to be created.
Declaration
public Output<string> NamespaceName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
RequiresDuplicateDetection
Boolean flag which controls whether the Topic requires duplicate detection. Defaults to false. Changing this forces a new resource to be created.
Declaration
public Output<bool?> RequiresDuplicateDetection { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
ResourceGroupName
The name of the resource group in which to create the namespace. Changing this forces a new resource to be created.
Declaration
public Output<string> ResourceGroupName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Status
The Status of the Service Bus Topic. Acceptable values are Active or Disabled. Defaults to Active.
Declaration
public Output<string> Status { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
SupportOrdering
Boolean flag which controls whether the Topic supports ordering. Defaults to false.
Declaration
public Output<bool?> SupportOrdering { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
Methods
View SourceGet(String, Input<String>, TopicState, CustomResourceOptions)
Get an existing Topic resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static Topic Get(string name, Input<string> id, TopicState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| TopicState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| Topic |