QueueArgs

data class QueueArgs constructor(val autoDeleteOnIdle: Output<String>? = null, val batchedOperationsEnabled: Output<Boolean>? = null, val deadLetteringOnMessageExpiration: Output<Boolean>? = null, val defaultMessageTtl: Output<String>? = null, val duplicateDetectionHistoryTimeWindow: Output<String>? = null, val expressEnabled: Output<Boolean>? = null, val forwardDeadLetteredMessagesTo: Output<String>? = null, val forwardTo: Output<String>? = null, val lockDuration: Output<String>? = null, val maxDeliveryCount: Output<Int>? = 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 requiresSession: Output<Boolean>? = null, val status: Output<String>? = null) : ConvertibleToJava<QueueArgs>

Manages a ServiceBus Queue.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.core.ResourceGroup("example", {
name: "my-servicebus",
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 exampleQueue = new azure.servicebus.Queue("example", {
name: "tfex_servicebus_queue",
namespaceId: exampleNamespace.id,
partitioningEnabled: true,
});
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="my-servicebus",
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_queue = azure.servicebus.Queue("example",
name="tfex_servicebus_queue",
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 = "my-servicebus",
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 exampleQueue = new Azure.ServiceBus.Queue("example", new()
{
Name = "tfex_servicebus_queue",
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("my-servicebus"),
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.NewQueue(ctx, "example", &servicebus.QueueArgs{
Name: pulumi.String("tfex_servicebus_queue"),
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.Queue;
import com.pulumi.azure.servicebus.QueueArgs;
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("my-servicebus")
.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 exampleQueue = new Queue("exampleQueue", QueueArgs.builder()
.name("tfex_servicebus_queue")
.namespaceId(exampleNamespace.id())
.partitioningEnabled(true)
.build());
}
}
resources:
example:
type: azure:core:ResourceGroup
properties:
name: my-servicebus
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
exampleQueue:
type: azure:servicebus:Queue
name: example
properties:
name: tfex_servicebus_queue
namespaceId: ${exampleNamespace.id}
partitioningEnabled: true

Import

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

$ pulumi import azure:eventhub/queue:Queue example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ServiceBus/namespaces/sbns1/queues/snqueue1

Constructors

Link copied to clipboard
constructor(autoDeleteOnIdle: Output<String>? = null, batchedOperationsEnabled: Output<Boolean>? = null, deadLetteringOnMessageExpiration: Output<Boolean>? = null, defaultMessageTtl: Output<String>? = null, duplicateDetectionHistoryTimeWindow: Output<String>? = null, expressEnabled: Output<Boolean>? = null, forwardDeadLetteredMessagesTo: Output<String>? = null, forwardTo: Output<String>? = null, lockDuration: Output<String>? = null, maxDeliveryCount: Output<Int>? = 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, requiresSession: Output<Boolean>? = null, status: Output<String>? = null)

Properties

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

The ISO 8601 timespan duration of the idle interval after which the Queue is automatically deleted, minimum of 5 minutes.

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

Boolean flag which controls whether server-side batched operations are enabled. Defaults to true.

Link copied to clipboard

Boolean flag which controls whether the Queue has dead letter support when a message expires. Defaults to false.

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

The ISO 8601 timespan duration of the TTL of messages sent to this queue. This is the default value used when TTL is not set on message itself.

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 queue holds a message in memory temporarily before writing it to persistent storage. Defaults to false for Basic and Standard. For Premium, it MUST be set to false.

Link copied to clipboard

The name of a Queue or Topic to automatically forward dead lettered messages to.

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

The name of a Queue or Topic to automatically forward messages to. Please see the documentation for more information.

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

The ISO 8601 timespan duration of a peek-lock; that is, the amount of time that the message is locked for other receivers. Maximum value is 5 minutes. Defaults to PT1M (1 Minute).

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

Integer value which controls when a message is automatically dead lettered. Defaults to 10.

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

Integer value which controls the maximum size of a message allowed on the queue for Premium SKU. For supported values see the "Large messages support" section of this document.

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

Integer value which controls the size of memory allocated for the queue. For supported values see the "Queue or topic size" section of Service Bus Quotas.

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

Specifies the name of the ServiceBus Queue 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 queue 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 queue to be partitioned across multiple message brokers. Changing this forces a new resource to be created. Defaults to false for Basic and Standard.

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

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

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

Boolean flag which controls whether the Queue requires sessions. This will allow ordered handling of unbounded sequences of related messages. With sessions enabled a queue can guarantee first-in-first-out delivery of messages. Changing this forces a new resource to be created. Defaults to false.

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

The status of the Queue. Possible values are Active, Creating, Deleting, Disabled, ReceiveDisabled, Renaming, SendDisabled, Unknown. Note that Restoring is not accepted. Defaults to Active.

Functions

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