1. Packages
  2. Azure Classic
  3. API Docs
  4. storage
  5. getQueue

We recommend using Azure Native.

Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi

azure.storage.getQueue

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi

    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/v5/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.
    StorageAccountName string
    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.
    StorageAccountName string
    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.
    storageAccountName String
    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.
    storageAccountName string
    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_name str
    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.
    storageAccountName String
    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
    ResourceManagerId string
    The Resource Manager ID of this Storage Queue.
    StorageAccountName string
    Id string
    The provider-assigned unique ID for this managed resource.
    Metadata map[string]string
    A mapping of MetaData for this Queue.
    Name string
    ResourceManagerId string
    The Resource Manager ID of this Storage Queue.
    StorageAccountName string
    id String
    The provider-assigned unique ID for this managed resource.
    metadata Map<String,String>
    A mapping of MetaData for this Queue.
    name String
    resourceManagerId String
    The Resource Manager ID of this Storage Queue.
    storageAccountName String
    id string
    The provider-assigned unique ID for this managed resource.
    metadata {[key: string]: string}
    A mapping of MetaData for this Queue.
    name string
    resourceManagerId string
    The Resource Manager ID of this Storage Queue.
    storageAccountName string
    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_id str
    The Resource Manager ID of this Storage Queue.
    storage_account_name str
    id String
    The provider-assigned unique ID for this managed resource.
    metadata Map<String>
    A mapping of MetaData for this Queue.
    name String
    resourceManagerId String
    The Resource Manager ID of this Storage Queue.
    storageAccountName String

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi