Queue

Manages a ServiceBus Queue.

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 exampleQueue = new Azure.ServiceBus.Queue("exampleQueue", new Azure.ServiceBus.QueueArgs
        {
            ResourceGroupName = exampleResourceGroup.Name,
            NamespaceName = exampleNamespace.Name,
            EnablePartitioning = true,
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
    "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/servicebus"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
            Location: pulumi.String("West Europe"),
        })
        if err != nil {
            return err
        }
        exampleNamespace, err := servicebus.NewNamespace(ctx, "exampleNamespace", &servicebus.NamespaceArgs{
            Location:          exampleResourceGroup.Location,
            ResourceGroupName: exampleResourceGroup.Name,
            Sku:               pulumi.String("Standard"),
            Tags: pulumi.Map{
                "source": pulumi.String("example"),
            },
        })
        if err != nil {
            return err
        }
        _, err = servicebus.NewQueue(ctx, "exampleQueue", &servicebus.QueueArgs{
            ResourceGroupName:  exampleResourceGroup.Name,
            NamespaceName:      exampleNamespace.Name,
            EnablePartitioning: pulumi.Bool(true),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_azure as azure

example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_namespace = azure.servicebus.Namespace("exampleNamespace",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    sku="Standard",
    tags={
        "source": "example",
    })
example_queue = azure.servicebus.Queue("exampleQueue",
    resource_group_name=example_resource_group.name,
    namespace_name=example_namespace.name,
    enable_partitioning=True)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const exampleNamespace = new azure.servicebus.Namespace("exampleNamespace", {
    location: exampleResourceGroup.location,
    resourceGroupName: exampleResourceGroup.name,
    sku: "Standard",
    tags: {
        source: "example",
    },
});
const exampleQueue = new azure.servicebus.Queue("exampleQueue", {
    resourceGroupName: exampleResourceGroup.name,
    namespaceName: exampleNamespace.name,
    enablePartitioning: true,
});

Deprecated: azure.eventhub.Queue has been deprecated in favor of azure.servicebus.Queue

Create a Queue Resource

new Queue(name: string, args: QueueArgs, opts?: CustomResourceOptions);
def Queue(resource_name, opts=None, auto_delete_on_idle=None, dead_lettering_on_message_expiration=None, default_message_ttl=None, duplicate_detection_history_time_window=None, enable_express=None, enable_partitioning=None, lock_duration=None, max_delivery_count=None, max_size_in_megabytes=None, name=None, namespace_name=None, requires_duplicate_detection=None, requires_session=None, resource_group_name=None, __props__=None);
func NewQueue(ctx *Context, name string, args QueueArgs, opts ...ResourceOption) (*Queue, error)
public Queue(string name, QueueArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args QueueArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args QueueArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args QueueArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Queue Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The Queue resource accepts the following input properties:

NamespaceName string

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

ResourceGroupName string

The name of the resource group in which to create the namespace. Changing this forces a new resource to be created.

AutoDeleteOnIdle string

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

DeadLetteringOnMessageExpiration bool

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

DefaultMessageTtl string

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.

DuplicateDetectionHistoryTimeWindow string

The ISO 8601 timespan duration during which duplicates can be detected. Default value is 10 minutes. (PT10M)

EnableExpress bool

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.

EnablePartitioning bool

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. For Premium, it MUST be set to true.

LockDuration string

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 1 minute. (PT1M)

MaxDeliveryCount int

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

MaxSizeInMegabytes int

Integer value which controls the size of memory allocated for the queue. For supported values see the “Queue/topic size” section of this document.

Name string

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

RequiresDuplicateDetection bool

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

RequiresSession bool

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.

NamespaceName string

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

ResourceGroupName string

The name of the resource group in which to create the namespace. Changing this forces a new resource to be created.

AutoDeleteOnIdle string

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

DeadLetteringOnMessageExpiration bool

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

DefaultMessageTtl string

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.

DuplicateDetectionHistoryTimeWindow string

The ISO 8601 timespan duration during which duplicates can be detected. Default value is 10 minutes. (PT10M)

EnableExpress bool

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.

EnablePartitioning bool

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. For Premium, it MUST be set to true.

LockDuration string

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 1 minute. (PT1M)

MaxDeliveryCount int

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

MaxSizeInMegabytes int

Integer value which controls the size of memory allocated for the queue. For supported values see the “Queue/topic size” section of this document.

Name string

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

RequiresDuplicateDetection bool

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

RequiresSession bool

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.

namespaceName string

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

resourceGroupName string

The name of the resource group in which to create the namespace. Changing this forces a new resource to be created.

autoDeleteOnIdle string

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

deadLetteringOnMessageExpiration boolean

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

defaultMessageTtl string

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.

duplicateDetectionHistoryTimeWindow string

The ISO 8601 timespan duration during which duplicates can be detected. Default value is 10 minutes. (PT10M)

enableExpress boolean

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.

enablePartitioning boolean

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. For Premium, it MUST be set to true.

lockDuration string

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 1 minute. (PT1M)

maxDeliveryCount number

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

maxSizeInMegabytes number

Integer value which controls the size of memory allocated for the queue. For supported values see the “Queue/topic size” section of this document.

name string

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

requiresDuplicateDetection boolean

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

requiresSession boolean

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.

namespace_name str

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

resource_group_name str

The name of the resource group in which to create the namespace. Changing this forces a new resource to be created.

auto_delete_on_idle str

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

dead_lettering_on_message_expiration bool

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

default_message_ttl str

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.

duplicate_detection_history_time_window str

The ISO 8601 timespan duration during which duplicates can be detected. Default value is 10 minutes. (PT10M)

enable_express bool

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.

enable_partitioning bool

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. For Premium, it MUST be set to true.

lock_duration str

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 1 minute. (PT1M)

max_delivery_count float

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

max_size_in_megabytes float

Integer value which controls the size of memory allocated for the queue. For supported values see the “Queue/topic size” section of this document.

name str

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

requires_duplicate_detection bool

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

requires_session bool

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.

Outputs

All input properties are implicitly available as output properties. Additionally, the Queue resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing Queue Resource

Get an existing Queue 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?: QueueState, opts?: CustomResourceOptions): Queue
static get(resource_name, id, opts=None, auto_delete_on_idle=None, dead_lettering_on_message_expiration=None, default_message_ttl=None, duplicate_detection_history_time_window=None, enable_express=None, enable_partitioning=None, lock_duration=None, max_delivery_count=None, max_size_in_megabytes=None, name=None, namespace_name=None, requires_duplicate_detection=None, requires_session=None, resource_group_name=None, __props__=None);
func GetQueue(ctx *Context, name string, id IDInput, state *QueueState, opts ...ResourceOption) (*Queue, error)
public static Queue Get(string name, Input<string> id, QueueState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

AutoDeleteOnIdle string

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

DeadLetteringOnMessageExpiration bool

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

DefaultMessageTtl string

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.

DuplicateDetectionHistoryTimeWindow string

The ISO 8601 timespan duration during which duplicates can be detected. Default value is 10 minutes. (PT10M)

EnableExpress bool

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.

EnablePartitioning bool

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. For Premium, it MUST be set to true.

LockDuration string

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 1 minute. (PT1M)

MaxDeliveryCount int

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

MaxSizeInMegabytes int

Integer value which controls the size of memory allocated for the queue. For supported values see the “Queue/topic size” section of this document.

Name string

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

NamespaceName string

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

RequiresDuplicateDetection bool

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

RequiresSession bool

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.

ResourceGroupName string

The name of the resource group in which to create the namespace. Changing this forces a new resource to be created.

AutoDeleteOnIdle string

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

DeadLetteringOnMessageExpiration bool

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

DefaultMessageTtl string

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.

DuplicateDetectionHistoryTimeWindow string

The ISO 8601 timespan duration during which duplicates can be detected. Default value is 10 minutes. (PT10M)

EnableExpress bool

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.

EnablePartitioning bool

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. For Premium, it MUST be set to true.

LockDuration string

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 1 minute. (PT1M)

MaxDeliveryCount int

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

MaxSizeInMegabytes int

Integer value which controls the size of memory allocated for the queue. For supported values see the “Queue/topic size” section of this document.

Name string

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

NamespaceName string

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

RequiresDuplicateDetection bool

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

RequiresSession bool

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.

ResourceGroupName string

The name of the resource group in which to create the namespace. Changing this forces a new resource to be created.

autoDeleteOnIdle string

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

deadLetteringOnMessageExpiration boolean

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

defaultMessageTtl string

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.

duplicateDetectionHistoryTimeWindow string

The ISO 8601 timespan duration during which duplicates can be detected. Default value is 10 minutes. (PT10M)

enableExpress boolean

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.

enablePartitioning boolean

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. For Premium, it MUST be set to true.

lockDuration string

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 1 minute. (PT1M)

maxDeliveryCount number

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

maxSizeInMegabytes number

Integer value which controls the size of memory allocated for the queue. For supported values see the “Queue/topic size” section of this document.

name string

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

namespaceName string

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

requiresDuplicateDetection boolean

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

requiresSession boolean

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.

resourceGroupName string

The name of the resource group in which to create the namespace. Changing this forces a new resource to be created.

auto_delete_on_idle str

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

dead_lettering_on_message_expiration bool

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

default_message_ttl str

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.

duplicate_detection_history_time_window str

The ISO 8601 timespan duration during which duplicates can be detected. Default value is 10 minutes. (PT10M)

enable_express bool

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.

enable_partitioning bool

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. For Premium, it MUST be set to true.

lock_duration str

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 1 minute. (PT1M)

max_delivery_count float

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

max_size_in_megabytes float

Integer value which controls the size of memory allocated for the queue. For supported values see the “Queue/topic size” section of this document.

name str

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

namespace_name str

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

requires_duplicate_detection bool

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

requires_session bool

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.

resource_group_name str

The name of the resource group in which to create the namespace. Changing this forces a new resource to be created.

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.