Queue Args
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/#accessing-any-api-version-via-local-packages 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",
});
});
package main
import (
storage "github.com/pulumi/pulumi-azure-native-sdk/storage/v3"
"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());
}
}
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/v3"
"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
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}
Constructors
Properties
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.
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.
The name of the resource group within the user's subscription. The name is case insensitive.