Queue

class Queue : KotlinCustomResource

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}

Properties

Link copied to clipboard

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.

Link copied to clipboard
val azureApiVersion: Output<String>

The Azure API version of the resource.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val metadata: Output<Map<String, String>>?

A name-value pair that represents queue metadata.

Link copied to clipboard
val name: Output<String>

The name of the resource

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val type: Output<String>

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Link copied to clipboard
val urn: Output<String>