Azure Classic

Pulumi Official
Package maintained by Pulumi
v5.5.0 published on Wednesday, May 4, 2022 by Pulumi

getQueue

Use this data source to access information about an existing Service Bus Queue.

Example Usage

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Azure.ServiceBus.GetQueue.InvokeAsync(new Azure.ServiceBus.GetQueueArgs
        {
            Name = "existing",
            ResourceGroupName = "existing",
            NamespaceName = "existing",
        }));
        this.Id = example.Apply(example => example.Id);
    }

    [Output("id")]
    public Output<string> Id { get; set; }
}
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := servicebus.LookupQueue(ctx, &servicebus.LookupQueueArgs{
			Name:              "existing",
			ResourceGroupName: pulumi.StringRef("existing"),
			NamespaceName:     pulumi.StringRef("existing"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("id", example.Id)
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var example = Output.of(ServicebusFunctions.getQueue(GetQueueArgs.builder()
            .name("existing")
            .resourceGroupName("existing")
            .namespaceName("existing")
            .build()));

        ctx.export("id", example.apply(getQueueResult -> getQueueResult.getId()));
        }
}
import pulumi
import pulumi_azure as azure

example = azure.servicebus.get_queue(name="existing",
    resource_group_name="existing",
    namespace_name="existing")
pulumi.export("id", example.id)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = azure.servicebus.getQueue({
    name: "existing",
    resourceGroupName: "existing",
    namespaceName: "existing",
});
export const id = example.then(example => example.id);
variables:
  example:
    Fn::Invoke:
      Function: azure:servicebus:getQueue
      Arguments:
        name: existing
        resourceGroupName: existing
        namespaceName: existing
outputs:
  id: ${example.id}

Using getQueue

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getQueue(args: GetQueueArgs, opts?: InvokeOptions): Promise<GetQueueResult>
function getQueueOutput(args: GetQueueOutputArgs, opts?: InvokeOptions): Output<GetQueueResult>
def get_queue(name: Optional[str] = None,
              namespace_id: Optional[str] = None,
              namespace_name: Optional[str] = None,
              resource_group_name: Optional[str] = None,
              opts: Optional[InvokeOptions] = None) -> GetQueueResult
def get_queue_output(name: Optional[pulumi.Input[str]] = None,
              namespace_id: Optional[pulumi.Input[str]] = None,
              namespace_name: Optional[pulumi.Input[str]] = None,
              resource_group_name: Optional[pulumi.Input[str]] = None,
              opts: Optional[InvokeOptions] = None) -> Output[GetQueueResult]
func LookupQueue(ctx *Context, args *LookupQueueArgs, opts ...InvokeOption) (*LookupQueueResult, error)
func LookupQueueOutput(ctx *Context, args *LookupQueueOutputArgs, opts ...InvokeOption) LookupQueueResultOutput

> Note: This function is named LookupQueue in the Go SDK.

public static class GetQueue 
{
    public static Task<GetQueueResult> InvokeAsync(GetQueueArgs args, InvokeOptions? opts = null)
    public static Output<GetQueueResult> Invoke(GetQueueInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetQueueResult> getQueue(GetQueueArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: azure:servicebus/getQueue:getQueue
  Arguments:
    # Arguments dictionary

The following arguments are supported:

Name string

The name of this Service Bus Queue.

NamespaceId string
NamespaceName string

The name of the ServiceBus Namespace.

ResourceGroupName string

The name of the Resource Group where the Service Bus Queue exists.

Name string

The name of this Service Bus Queue.

NamespaceId string
NamespaceName string

The name of the ServiceBus Namespace.

ResourceGroupName string

The name of the Resource Group where the Service Bus Queue exists.

name String

The name of this Service Bus Queue.

namespaceId String
namespaceName String

The name of the ServiceBus Namespace.

resourceGroupName String

The name of the Resource Group where the Service Bus Queue exists.

name string

The name of this Service Bus Queue.

namespaceId string
namespaceName string

The name of the ServiceBus Namespace.

resourceGroupName string

The name of the Resource Group where the Service Bus Queue exists.

name str

The name of this Service Bus Queue.

namespace_id str
namespace_name str

The name of the ServiceBus Namespace.

resource_group_name str

The name of the Resource Group where the Service Bus Queue exists.

name String

The name of this Service Bus Queue.

namespaceId String
namespaceName String

The name of the ServiceBus Namespace.

resourceGroupName String

The name of the Resource Group where the Service Bus Queue exists.

getQueue Result

The following output properties are available:

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.

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 a message itself.

DuplicateDetectionHistoryTimeWindow string

The ISO 8601 timespan duration during which duplicates can be detected.

EnableBatchedOperations bool

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

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.

EnablePartitioning bool

Boolean flag which controls whether to enable the queue to be partitioned across multiple message brokers.

ForwardDeadLetteredMessagesTo string

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

ForwardTo string

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

Id string

The provider-assigned unique ID for this managed resource.

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.

MaxDeliveryCount int

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

MaxSizeInMegabytes int

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.

Name string
RequiresDuplicateDetection bool

Boolean flag which controls whether the Queue requires duplicate detection.

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.

Status string

The status of the Queue. Possible values are Active, Creating, Deleting, Disabled, ReceiveDisabled, Renaming, SendDisabled, Unknown.

NamespaceId string
NamespaceName string
ResourceGroupName string
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.

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 a message itself.

DuplicateDetectionHistoryTimeWindow string

The ISO 8601 timespan duration during which duplicates can be detected.

EnableBatchedOperations bool

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

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.

EnablePartitioning bool

Boolean flag which controls whether to enable the queue to be partitioned across multiple message brokers.

ForwardDeadLetteredMessagesTo string

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

ForwardTo string

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

Id string

The provider-assigned unique ID for this managed resource.

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.

MaxDeliveryCount int

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

MaxSizeInMegabytes int

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.

Name string
RequiresDuplicateDetection bool

Boolean flag which controls whether the Queue requires duplicate detection.

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.

Status string

The status of the Queue. Possible values are Active, Creating, Deleting, Disabled, ReceiveDisabled, Renaming, SendDisabled, Unknown.

NamespaceId string
NamespaceName string
ResourceGroupName string
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.

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 a message itself.

duplicateDetectionHistoryTimeWindow String

The ISO 8601 timespan duration during which duplicates can be detected.

enableBatchedOperations Boolean

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

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.

enablePartitioning Boolean

Boolean flag which controls whether to enable the queue to be partitioned across multiple message brokers.

forwardDeadLetteredMessagesTo String

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

forwardTo String

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

id String

The provider-assigned unique ID for this managed resource.

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.

maxDeliveryCount Integer

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

maxSizeInMegabytes Integer

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.

name String
requiresDuplicateDetection Boolean

Boolean flag which controls whether the Queue requires duplicate detection.

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.

status String

The status of the Queue. Possible values are Active, Creating, Deleting, Disabled, ReceiveDisabled, Renaming, SendDisabled, Unknown.

namespaceId String
namespaceName String
resourceGroupName String
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.

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 a message itself.

duplicateDetectionHistoryTimeWindow string

The ISO 8601 timespan duration during which duplicates can be detected.

enableBatchedOperations boolean

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

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.

enablePartitioning boolean

Boolean flag which controls whether to enable the queue to be partitioned across multiple message brokers.

forwardDeadLetteredMessagesTo string

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

forwardTo string

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

id string

The provider-assigned unique ID for this managed resource.

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.

maxDeliveryCount number

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

maxSizeInMegabytes number

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.

name string
requiresDuplicateDetection boolean

Boolean flag which controls whether the Queue requires duplicate detection.

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.

status string

The status of the Queue. Possible values are Active, Creating, Deleting, Disabled, ReceiveDisabled, Renaming, SendDisabled, Unknown.

namespaceId string
namespaceName string
resourceGroupName string
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.

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 a message itself.

duplicate_detection_history_time_window str

The ISO 8601 timespan duration during which duplicates can be detected.

enable_batched_operations bool

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

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.

enable_partitioning bool

Boolean flag which controls whether to enable the queue to be partitioned across multiple message brokers.

forward_dead_lettered_messages_to str

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

forward_to str

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

id str

The provider-assigned unique ID for this managed resource.

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.

max_delivery_count int

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

max_size_in_megabytes int

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.

name str
requires_duplicate_detection bool

Boolean flag which controls whether the Queue requires duplicate detection.

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.

status str

The status of the Queue. Possible values are Active, Creating, Deleting, Disabled, ReceiveDisabled, Renaming, SendDisabled, Unknown.

namespace_id str
namespace_name str
resource_group_name str
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.

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 a message itself.

duplicateDetectionHistoryTimeWindow String

The ISO 8601 timespan duration during which duplicates can be detected.

enableBatchedOperations Boolean

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

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.

enablePartitioning Boolean

Boolean flag which controls whether to enable the queue to be partitioned across multiple message brokers.

forwardDeadLetteredMessagesTo String

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

forwardTo String

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

id String

The provider-assigned unique ID for this managed resource.

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.

maxDeliveryCount Number

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

maxSizeInMegabytes Number

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.

name String
requiresDuplicateDetection Boolean

Boolean flag which controls whether the Queue requires duplicate detection.

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.

status String

The status of the Queue. Possible values are Active, Creating, Deleting, Disabled, ReceiveDisabled, Renaming, SendDisabled, Unknown.

namespaceId String
namespaceName String
resourceGroupName String

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes

This Pulumi package is based on the azurerm Terraform Provider.