We recommend using Azure Native.
azure.storage.getQueue
Use this data source to access information about an existing Storage Queue.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.storage.getQueue({
name: "example-queue-name",
storageAccountName: "example-storage-account-name",
});
import pulumi
import pulumi_azure as azure
example = azure.storage.get_queue(name="example-queue-name",
storage_account_name="example-storage-account-name")
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := storage.LookupQueue(ctx, &storage.LookupQueueArgs{
Name: "example-queue-name",
StorageAccountName: pulumi.StringRef("example-storage-account-name"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = Azure.Storage.GetQueue.Invoke(new()
{
Name = "example-queue-name",
StorageAccountName = "example-storage-account-name",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.storage.StorageFunctions;
import com.pulumi.azure.storage.inputs.GetQueueArgs;
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) {
final var example = StorageFunctions.getQueue(GetQueueArgs.builder()
.name("example-queue-name")
.storageAccountName("example-storage-account-name")
.build());
}
}
variables:
example:
fn::invoke:
function: azure:storage:getQueue
arguments:
name: example-queue-name
storageAccountName: example-storage-account-name
API Providers
This data source uses the following Azure API Providers:
Microsoft.Storage- 2023-05-01
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(metadata: Optional[Mapping[str, str]] = None,
name: Optional[str] = None,
storage_account_id: Optional[str] = None,
storage_account_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetQueueResult
def get_queue_output(metadata: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
name: Optional[pulumi.Input[str]] = None,
storage_account_id: Optional[pulumi.Input[str]] = None,
storage_account_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)
public static Output<GetQueueResult> getQueue(GetQueueArgs args, InvokeOptions options)
fn::invoke:
function: azure:storage/getQueue:getQueue
arguments:
# arguments dictionaryThe following arguments are supported:
- Name string
- The name of the Queue.
- Metadata Dictionary<string, string>
- A mapping of MetaData for this Queue.
- Storage
Account stringId The name of the Storage Account where the Queue exists. This property will become Required in version 5.0 of the Provider.
Note: One of
storage_account_nameorstorage_account_idmust be specified. When specifyingstorage_account_idthe resource will use the Resource Manager API, rather than the Data Plane API.- Storage
Account stringName - The name of the Storage Account where the Queue exists. This property is deprecated in favour of
storage_account_id.
- Name string
- The name of the Queue.
- Metadata map[string]string
- A mapping of MetaData for this Queue.
- Storage
Account stringId The name of the Storage Account where the Queue exists. This property will become Required in version 5.0 of the Provider.
Note: One of
storage_account_nameorstorage_account_idmust be specified. When specifyingstorage_account_idthe resource will use the Resource Manager API, rather than the Data Plane API.- Storage
Account stringName - The name of the Storage Account where the Queue exists. This property is deprecated in favour of
storage_account_id.
- name String
- The name of the Queue.
- metadata Map<String,String>
- A mapping of MetaData for this Queue.
- storage
Account StringId The name of the Storage Account where the Queue exists. This property will become Required in version 5.0 of the Provider.
Note: One of
storage_account_nameorstorage_account_idmust be specified. When specifyingstorage_account_idthe resource will use the Resource Manager API, rather than the Data Plane API.- storage
Account StringName - The name of the Storage Account where the Queue exists. This property is deprecated in favour of
storage_account_id.
- name string
- The name of the Queue.
- metadata {[key: string]: string}
- A mapping of MetaData for this Queue.
- storage
Account stringId The name of the Storage Account where the Queue exists. This property will become Required in version 5.0 of the Provider.
Note: One of
storage_account_nameorstorage_account_idmust be specified. When specifyingstorage_account_idthe resource will use the Resource Manager API, rather than the Data Plane API.- storage
Account stringName - The name of the Storage Account where the Queue exists. This property is deprecated in favour of
storage_account_id.
- name str
- The name of the Queue.
- metadata Mapping[str, str]
- A mapping of MetaData for this Queue.
- storage_
account_ strid The name of the Storage Account where the Queue exists. This property will become Required in version 5.0 of the Provider.
Note: One of
storage_account_nameorstorage_account_idmust be specified. When specifyingstorage_account_idthe resource will use the Resource Manager API, rather than the Data Plane API.- storage_
account_ strname - The name of the Storage Account where the Queue exists. This property is deprecated in favour of
storage_account_id.
- name String
- The name of the Queue.
- metadata Map<String>
- A mapping of MetaData for this Queue.
- storage
Account StringId The name of the Storage Account where the Queue exists. This property will become Required in version 5.0 of the Provider.
Note: One of
storage_account_nameorstorage_account_idmust be specified. When specifyingstorage_account_idthe resource will use the Resource Manager API, rather than the Data Plane API.- storage
Account StringName - The name of the Storage Account where the Queue exists. This property is deprecated in favour of
storage_account_id.
getQueue Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Metadata Dictionary<string, string>
- A mapping of MetaData for this Queue.
- Name string
- Resource
Manager stringId - The Resource Manager ID of this Storage Queue.
- Url string
- The data plane URL of the Storage Queue in the format of
<storage queue endpoint>/<queue name>. E.g.https://example.queue.core.windows.net/queue1. - Storage
Account stringId - Storage
Account stringName
- Id string
- The provider-assigned unique ID for this managed resource.
- Metadata map[string]string
- A mapping of MetaData for this Queue.
- Name string
- Resource
Manager stringId - The Resource Manager ID of this Storage Queue.
- Url string
- The data plane URL of the Storage Queue in the format of
<storage queue endpoint>/<queue name>. E.g.https://example.queue.core.windows.net/queue1. - Storage
Account stringId - Storage
Account stringName
- id String
- The provider-assigned unique ID for this managed resource.
- metadata Map<String,String>
- A mapping of MetaData for this Queue.
- name String
- resource
Manager StringId - The Resource Manager ID of this Storage Queue.
- url String
- The data plane URL of the Storage Queue in the format of
<storage queue endpoint>/<queue name>. E.g.https://example.queue.core.windows.net/queue1. - storage
Account StringId - storage
Account StringName
- id string
- The provider-assigned unique ID for this managed resource.
- metadata {[key: string]: string}
- A mapping of MetaData for this Queue.
- name string
- resource
Manager stringId - The Resource Manager ID of this Storage Queue.
- url string
- The data plane URL of the Storage Queue in the format of
<storage queue endpoint>/<queue name>. E.g.https://example.queue.core.windows.net/queue1. - storage
Account stringId - storage
Account stringName
- id str
- The provider-assigned unique ID for this managed resource.
- metadata Mapping[str, str]
- A mapping of MetaData for this Queue.
- name str
- resource_
manager_ strid - The Resource Manager ID of this Storage Queue.
- url str
- The data plane URL of the Storage Queue in the format of
<storage queue endpoint>/<queue name>. E.g.https://example.queue.core.windows.net/queue1. - storage_
account_ strid - storage_
account_ strname
- id String
- The provider-assigned unique ID for this managed resource.
- metadata Map<String>
- A mapping of MetaData for this Queue.
- name String
- resource
Manager StringId - The Resource Manager ID of this Storage Queue.
- url String
- The data plane URL of the Storage Queue in the format of
<storage queue endpoint>/<queue name>. E.g.https://example.queue.core.windows.net/queue1. - storage
Account StringId - storage
Account StringName
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.
