azure-native.storage.Queue
Explore with Pulumi AI
Azure REST API version: 2022-09-01. Prior API version in Azure Native 1.x: 2021-02-01.
Other available API versions: 2023-01-01, 2023-04-01, 2023-05-01.
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",
});
});
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
})
}
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());
}
}
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")
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",
});
resources:
queue:
type: azure-native:storage:Queue
properties:
accountName: sto328
queueName: queue6185
resourceGroupName: res3376
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",
});
});
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
})
}
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());
}
}
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")
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",
});
resources:
queue:
type: azure-native:storage:Queue
properties:
accountName: sto328
metadata:
sample1: meta1
sample2: meta2
queueName: queue6185
resourceGroupName: res3376
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)
type: azure-native:storage:Queue
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args QueueArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args 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 string
- The unique name of the resource.
- args QueueArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args QueueArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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",
});
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"),
})
var azure_nativeQueueResource = new Queue("azure-nativeQueueResource", QueueArgs.builder()
.accountName("string")
.resourceGroupName("string")
.metadata(Map.of("string", "string"))
.queueName("string")
.build());
azure_native_queue_resource = azure_native.storage.Queue("azure-nativeQueueResource",
account_name="string",
resource_group_name="string",
metadata={
"string": "string",
},
queue_name="string")
const azure_nativeQueueResource = new azure_native.storage.Queue("azure-nativeQueueResource", {
accountName: "string",
resourceGroupName: "string",
metadata: {
string: "string",
},
queueName: "string",
});
type: azure-native:storage:Queue
properties:
accountName: string
metadata:
string: string
queueName: string
resourceGroupName: string
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
The Queue resource accepts the following input properties:
- Account
Name 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.
- Resource
Group stringName - 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.
- Queue
Name 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 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.
- Resource
Group stringName - 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.
- Queue
Name 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 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.
- resource
Group StringName - 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.
- queue
Name 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 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.
- resource
Group stringName - 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.
- queue
Name 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 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_ strname - 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 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.
- account
Name 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.
- resource
Group StringName - 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.
- queue
Name 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:
- Approximate
Message intCount - 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.
- 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 intCount - 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.
- 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 IntegerCount - 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.
- 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 numberCount - 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.
- 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_ intcount - 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.
- 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"
- approximate
Message NumberCount - 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.
- 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}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0