1. Packages
  2. Azure Native
  3. API Docs
  4. storage
  5. Queue
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.0.1 published on Monday, Apr 7, 2025 by Pulumi

azure-native.storage.Queue

Explore with Pulumi AI

This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.0.1 published on Monday, Apr 7, 2025 by Pulumi

Uses Azure REST API version 2024-01-01. In version 2.x of the Azure Native provider, it used API version 2022-09-01.

Other available API versions: 2022-09-01, 2023-01-01, 2023-04-01, 2023-05-01. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native storage [ApiVersion]. See the version guide for details.

Example Usage

QueueOperationPut

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;

return await Deployment.RunAsync(() => 
{
    var queue = new AzureNative.Storage.Queue("queue", new()
    {
        AccountName = "sto328",
        QueueName = "queue6185",
        ResourceGroupName = "res3376",
    });

});
Copy
package main

import (
	storage "github.com/pulumi/pulumi-azure-native-sdk/storage/v2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := storage.NewQueue(ctx, "queue", &storage.QueueArgs{
			AccountName:       pulumi.String("sto328"),
			QueueName:         pulumi.String("queue6185"),
			ResourceGroupName: pulumi.String("res3376"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.storage.Queue;
import com.pulumi.azurenative.storage.QueueArgs;
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) {
        var queue = new Queue("queue", QueueArgs.builder()
            .accountName("sto328")
            .queueName("queue6185")
            .resourceGroupName("res3376")
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const queue = new azure_native.storage.Queue("queue", {
    accountName: "sto328",
    queueName: "queue6185",
    resourceGroupName: "res3376",
});
Copy
import pulumi
import pulumi_azure_native as azure_native

queue = azure_native.storage.Queue("queue",
    account_name="sto328",
    queue_name="queue6185",
    resource_group_name="res3376")
Copy
resources:
  queue:
    type: azure-native:storage:Queue
    properties:
      accountName: sto328
      queueName: queue6185
      resourceGroupName: res3376
Copy

QueueOperationPutWithMetadata

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;

return await Deployment.RunAsync(() => 
{
    var queue = new AzureNative.Storage.Queue("queue", new()
    {
        AccountName = "sto328",
        Metadata = 
        {
            { "sample1", "meta1" },
            { "sample2", "meta2" },
        },
        QueueName = "queue6185",
        ResourceGroupName = "res3376",
    });

});
Copy
package main

import (
	storage "github.com/pulumi/pulumi-azure-native-sdk/storage/v2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := storage.NewQueue(ctx, "queue", &storage.QueueArgs{
			AccountName: pulumi.String("sto328"),
			Metadata: pulumi.StringMap{
				"sample1": pulumi.String("meta1"),
				"sample2": pulumi.String("meta2"),
			},
			QueueName:         pulumi.String("queue6185"),
			ResourceGroupName: pulumi.String("res3376"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.storage.Queue;
import com.pulumi.azurenative.storage.QueueArgs;
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) {
        var queue = new Queue("queue", QueueArgs.builder()
            .accountName("sto328")
            .metadata(Map.ofEntries(
                Map.entry("sample1", "meta1"),
                Map.entry("sample2", "meta2")
            ))
            .queueName("queue6185")
            .resourceGroupName("res3376")
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const queue = new azure_native.storage.Queue("queue", {
    accountName: "sto328",
    metadata: {
        sample1: "meta1",
        sample2: "meta2",
    },
    queueName: "queue6185",
    resourceGroupName: "res3376",
});
Copy
import pulumi
import pulumi_azure_native as azure_native

queue = azure_native.storage.Queue("queue",
    account_name="sto328",
    metadata={
        "sample1": "meta1",
        "sample2": "meta2",
    },
    queue_name="queue6185",
    resource_group_name="res3376")
Copy
resources:
  queue:
    type: azure-native:storage:Queue
    properties:
      accountName: sto328
      metadata:
        sample1: meta1
        sample2: meta2
      queueName: queue6185
      resourceGroupName: res3376
Copy

Create Queue Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Queue(name: string, args: QueueArgs, opts?: CustomResourceOptions);
@overload
def Queue(resource_name: str,
          args: QueueArgs,
          opts: Optional[ResourceOptions] = None)

@overload
def Queue(resource_name: str,
          opts: Optional[ResourceOptions] = None,
          account_name: Optional[str] = None,
          resource_group_name: Optional[str] = None,
          metadata: Optional[Mapping[str, str]] = None,
          queue_name: Optional[str] = None)
func NewQueue(ctx *Context, name string, args QueueArgs, opts ...ResourceOption) (*Queue, error)
public Queue(string name, QueueArgs args, CustomResourceOptions? opts = null)
public Queue(String name, QueueArgs args)
public Queue(String name, QueueArgs args, CustomResourceOptions options)
type: azure-native:storage:Queue
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. QueueArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. QueueArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. QueueArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. QueueArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. QueueArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var azure_nativeQueueResource = new AzureNative.Storage.Queue("azure-nativeQueueResource", new()
{
    AccountName = "string",
    ResourceGroupName = "string",
    Metadata = 
    {
        { "string", "string" },
    },
    QueueName = "string",
});
Copy
example, err := storage.NewQueue(ctx, "azure-nativeQueueResource", &storage.QueueArgs{
	AccountName:       pulumi.String("string"),
	ResourceGroupName: pulumi.String("string"),
	Metadata: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	QueueName: pulumi.String("string"),
})
Copy
var azure_nativeQueueResource = new Queue("azure-nativeQueueResource", QueueArgs.builder()
    .accountName("string")
    .resourceGroupName("string")
    .metadata(Map.of("string", "string"))
    .queueName("string")
    .build());
Copy
azure_native_queue_resource = azure_native.storage.Queue("azure-nativeQueueResource",
    account_name="string",
    resource_group_name="string",
    metadata={
        "string": "string",
    },
    queue_name="string")
Copy
const azure_nativeQueueResource = new azure_native.storage.Queue("azure-nativeQueueResource", {
    accountName: "string",
    resourceGroupName: "string",
    metadata: {
        string: "string",
    },
    queueName: "string",
});
Copy
type: azure-native:storage:Queue
properties:
    accountName: string
    metadata:
        string: string
    queueName: string
    resourceGroupName: string
Copy

Queue Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Queue resource accepts the following input properties:

AccountName
This property is required.
Changes to this property will trigger replacement.
string
The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group within the user's subscription. The name is case insensitive.
Metadata Dictionary<string, string>
A name-value pair that represents queue metadata.
QueueName Changes to this property will trigger replacement. string
A queue name must be unique within a storage account and must be between 3 and 63 characters.The name must comprise of lowercase alphanumeric and dash(-) characters only, it should begin and end with an alphanumeric character and it cannot have two consecutive dash(-) characters.
AccountName
This property is required.
Changes to this property will trigger replacement.
string
The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group within the user's subscription. The name is case insensitive.
Metadata map[string]string
A name-value pair that represents queue metadata.
QueueName Changes to this property will trigger replacement. string
A queue name must be unique within a storage account and must be between 3 and 63 characters.The name must comprise of lowercase alphanumeric and dash(-) characters only, it should begin and end with an alphanumeric character and it cannot have two consecutive dash(-) characters.
accountName
This property is required.
Changes to this property will trigger replacement.
String
The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group within the user's subscription. The name is case insensitive.
metadata Map<String,String>
A name-value pair that represents queue metadata.
queueName Changes to this property will trigger replacement. String
A queue name must be unique within a storage account and must be between 3 and 63 characters.The name must comprise of lowercase alphanumeric and dash(-) characters only, it should begin and end with an alphanumeric character and it cannot have two consecutive dash(-) characters.
accountName
This property is required.
Changes to this property will trigger replacement.
string
The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group within the user's subscription. The name is case insensitive.
metadata {[key: string]: string}
A name-value pair that represents queue metadata.
queueName Changes to this property will trigger replacement. string
A queue name must be unique within a storage account and must be between 3 and 63 characters.The name must comprise of lowercase alphanumeric and dash(-) characters only, it should begin and end with an alphanumeric character and it cannot have two consecutive dash(-) characters.
account_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the resource group within the user's subscription. The name is case insensitive.
metadata Mapping[str, str]
A name-value pair that represents queue metadata.
queue_name Changes to this property will trigger replacement. str
A queue name must be unique within a storage account and must be between 3 and 63 characters.The name must comprise of lowercase alphanumeric and dash(-) characters only, it should begin and end with an alphanumeric character and it cannot have two consecutive dash(-) characters.
accountName
This property is required.
Changes to this property will trigger replacement.
String
The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group within the user's subscription. The name is case insensitive.
metadata Map<String>
A name-value pair that represents queue metadata.
queueName Changes to this property will trigger replacement. String
A queue name must be unique within a storage account and must be between 3 and 63 characters.The name must comprise of lowercase alphanumeric and dash(-) characters only, it should begin and end with an alphanumeric character and it cannot have two consecutive dash(-) characters.

Outputs

All input properties are implicitly available as output properties. Additionally, the Queue resource produces the following output properties:

ApproximateMessageCount int
Integer indicating an approximate number of messages in the queue. This number is not lower than the actual number of messages in the queue, but could be higher.
AzureApiVersion string
The Azure API version of the resource.
Id string
The provider-assigned unique ID for this managed resource.
Name string
The name of the resource
Type string
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
ApproximateMessageCount int
Integer indicating an approximate number of messages in the queue. This number is not lower than the actual number of messages in the queue, but could be higher.
AzureApiVersion string
The Azure API version of the resource.
Id string
The provider-assigned unique ID for this managed resource.
Name string
The name of the resource
Type string
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
approximateMessageCount Integer
Integer indicating an approximate number of messages in the queue. This number is not lower than the actual number of messages in the queue, but could be higher.
azureApiVersion String
The Azure API version of the resource.
id String
The provider-assigned unique ID for this managed resource.
name String
The name of the resource
type String
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
approximateMessageCount number
Integer indicating an approximate number of messages in the queue. This number is not lower than the actual number of messages in the queue, but could be higher.
azureApiVersion string
The Azure API version of the resource.
id string
The provider-assigned unique ID for this managed resource.
name string
The name of the resource
type string
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
approximate_message_count int
Integer indicating an approximate number of messages in the queue. This number is not lower than the actual number of messages in the queue, but could be higher.
azure_api_version str
The Azure API version of the resource.
id str
The provider-assigned unique ID for this managed resource.
name str
The name of the resource
type str
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
approximateMessageCount Number
Integer indicating an approximate number of messages in the queue. This number is not lower than the actual number of messages in the queue, but could be higher.
azureApiVersion String
The Azure API version of the resource.
id String
The provider-assigned unique ID for this managed resource.
name String
The name of the resource
type String
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:storage:Queue queue6185 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/queueServices/default/queues/{queueName} 
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Azure Native pulumi/pulumi-azure-native
License
Apache-2.0
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.0.1 published on Monday, Apr 7, 2025 by Pulumi