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,
});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);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:
- Namespace
Name string The name of the ServiceBus Namespace to create this queue in. Changing this forces a new resource to be created.
- Resource
Group stringName The name of the resource group in which to create the namespace. 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 Queue is automatically deleted, minimum of 5 minutes.
- Dead
Lettering boolOn Message Expiration Boolean flag which controls whether the Queue has dead letter support when a message expires. Defaults to
false.- Default
Message stringTtl 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 stringHistory Time Window 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
falsefor Basic and Standard. For Premium, it MUST be set tofalse.- 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
falsefor Basic and Standard. For Premium, it MUST be set totrue.- Lock
Duration 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)- Max
Delivery intCount Integer value which controls when a message is automatically deadlettered. Defaults to
10.- Max
Size intIn Megabytes 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.
- Requires
Duplicate boolDetection 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.
- Namespace
Name string The name of the ServiceBus Namespace to create this queue in. Changing this forces a new resource to be created.
- Resource
Group stringName The name of the resource group in which to create the namespace. 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 Queue is automatically deleted, minimum of 5 minutes.
- Dead
Lettering boolOn Message Expiration Boolean flag which controls whether the Queue has dead letter support when a message expires. Defaults to
false.- Default
Message stringTtl 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 stringHistory Time Window 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
falsefor Basic and Standard. For Premium, it MUST be set tofalse.- 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
falsefor Basic and Standard. For Premium, it MUST be set totrue.- Lock
Duration 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)- Max
Delivery intCount Integer value which controls when a message is automatically deadlettered. Defaults to
10.- Max
Size intIn Megabytes 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.
- Requires
Duplicate boolDetection 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.
- namespace
Name string The name of the ServiceBus Namespace to create this queue in. Changing this forces a new resource to be created.
- resource
Group stringName The name of the resource group in which to create the namespace. 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 Queue is automatically deleted, minimum of 5 minutes.
- dead
Lettering booleanOn Message Expiration Boolean flag which controls whether the Queue has dead letter support when a message expires. Defaults to
false.- default
Message stringTtl 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 stringHistory Time Window The ISO 8601 timespan duration during which duplicates can be detected. Default value is 10 minutes. (
PT10M)- enable
Express 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
falsefor Basic and Standard. For Premium, it MUST be set tofalse.- enable
Partitioning 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
falsefor Basic and Standard. For Premium, it MUST be set totrue.- lock
Duration 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)- max
Delivery numberCount Integer value which controls when a message is automatically deadlettered. Defaults to
10.- max
Size numberIn Megabytes 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.
- requires
Duplicate booleanDetection Boolean flag which controls whether the Queue requires duplicate detection. Changing this forces a new resource to be created. Defaults to
false.- requires
Session 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_ strname The name of the resource group in which to create the namespace. 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 Queue is automatically deleted, minimum of 5 minutes.
- dead_
lettering_ boolon_ message_ expiration Boolean flag which controls whether the Queue has dead letter support when a message expires. Defaults to
false.- default_
message_ strttl 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_ strhistory_ time_ window 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
falsefor Basic and Standard. For Premium, it MUST be set tofalse.- 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
falsefor Basic and Standard. For Premium, it MUST be set totrue.- 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_ floatcount Integer value which controls when a message is automatically deadlettered. Defaults to
10.- max_
size_ floatin_ megabytes 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_ booldetection 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:
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): Queuestatic 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:
- Auto
Delete stringOn Idle The ISO 8601 timespan duration of the idle interval after which the Queue is automatically deleted, minimum of 5 minutes.
- Dead
Lettering boolOn Message Expiration Boolean flag which controls whether the Queue has dead letter support when a message expires. Defaults to
false.- Default
Message stringTtl 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 stringHistory Time Window 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
falsefor Basic and Standard. For Premium, it MUST be set tofalse.- 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
falsefor Basic and Standard. For Premium, it MUST be set totrue.- Lock
Duration 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)- Max
Delivery intCount Integer value which controls when a message is automatically deadlettered. Defaults to
10.- Max
Size intIn Megabytes 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.
- Namespace
Name string The name of the ServiceBus Namespace to create this queue in. Changing this forces a new resource to be created.
- Requires
Duplicate boolDetection 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 stringName The name of the resource group in which to create the namespace. 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 Queue is automatically deleted, minimum of 5 minutes.
- Dead
Lettering boolOn Message Expiration Boolean flag which controls whether the Queue has dead letter support when a message expires. Defaults to
false.- Default
Message stringTtl 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 stringHistory Time Window 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
falsefor Basic and Standard. For Premium, it MUST be set tofalse.- 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
falsefor Basic and Standard. For Premium, it MUST be set totrue.- Lock
Duration 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)- Max
Delivery intCount Integer value which controls when a message is automatically deadlettered. Defaults to
10.- Max
Size intIn Megabytes 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.
- Namespace
Name string The name of the ServiceBus Namespace to create this queue in. Changing this forces a new resource to be created.
- Requires
Duplicate boolDetection 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 stringName The name of the resource group in which to create the namespace. 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 Queue is automatically deleted, minimum of 5 minutes.
- dead
Lettering booleanOn Message Expiration Boolean flag which controls whether the Queue has dead letter support when a message expires. Defaults to
false.- default
Message stringTtl 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 stringHistory Time Window The ISO 8601 timespan duration during which duplicates can be detected. Default value is 10 minutes. (
PT10M)- enable
Express 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
falsefor Basic and Standard. For Premium, it MUST be set tofalse.- enable
Partitioning 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
falsefor Basic and Standard. For Premium, it MUST be set totrue.- lock
Duration 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)- max
Delivery numberCount Integer value which controls when a message is automatically deadlettered. Defaults to
10.- max
Size numberIn Megabytes 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.
- namespace
Name string The name of the ServiceBus Namespace to create this queue in. Changing this forces a new resource to be created.
- requires
Duplicate booleanDetection Boolean flag which controls whether the Queue requires duplicate detection. Changing this forces a new resource to be created. Defaults to
false.- requires
Session 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.- resource
Group stringName The name of the resource group in which to create the namespace. 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 Queue is automatically deleted, minimum of 5 minutes.
- dead_
lettering_ boolon_ message_ expiration Boolean flag which controls whether the Queue has dead letter support when a message expires. Defaults to
false.- default_
message_ strttl 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_ strhistory_ time_ window 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
falsefor Basic and Standard. For Premium, it MUST be set tofalse.- 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
falsefor Basic and Standard. For Premium, it MUST be set totrue.- 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_ floatcount Integer value which controls when a message is automatically deadlettered. Defaults to
10.- max_
size_ floatin_ megabytes 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_ booldetection 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_ strname 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
azurermTerraform Provider.