We recommend using Azure Native.
Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi
azure.storage.getQueue
Explore with Pulumi AI
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: "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
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_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_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:storage/getQueue:getQueue
arguments:
# arguments dictionary
The following arguments are supported:
- Name string
- The name of the Queue.
- Storage
Account stringName - The name of the Storage Account where the Queue exists.
- Metadata Dictionary<string, string>
- A mapping of MetaData for this Queue.
- Name string
- The name of the Queue.
- Storage
Account stringName - The name of the Storage Account where the Queue exists.
- Metadata map[string]string
- A mapping of MetaData for this Queue.
- name String
- The name of the Queue.
- storage
Account StringName - The name of the Storage Account where the Queue exists.
- metadata Map<String,String>
- A mapping of MetaData for this Queue.
- name string
- The name of the Queue.
- storage
Account stringName - The name of the Storage Account where the Queue exists.
- metadata {[key: string]: string}
- A mapping of MetaData for this Queue.
- name str
- The name of the Queue.
- storage_
account_ strname - The name of the Storage Account where the Queue exists.
- metadata Mapping[str, str]
- A mapping of MetaData for this Queue.
- name String
- The name of the Queue.
- storage
Account StringName - The name of the Storage Account where the Queue exists.
- metadata Map<String>
- A mapping of MetaData for this Queue.
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.
- 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.
- 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.
- 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.
- 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.
- 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.
- storage
Account StringName
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurerm
Terraform Provider.