Show / Hide Table of Contents

Class Queue

The rabbitmq..Queue resource creates and manages a queue.

Example Usage

Basic Example

using Pulumi;
using RabbitMQ = Pulumi.RabbitMQ;

class MyStack : Stack
{
public MyStack()
{
    var testVHost = new RabbitMQ.VHost("testVHost", new RabbitMQ.VHostArgs
    {
    });
    var guest = new RabbitMQ.Permissions("guest", new RabbitMQ.PermissionsArgs
    {
        Permissions = new RabbitMQ.Inputs.PermissionsPermissionsArgs
        {
            Configure = ".*",
            Read = ".*",
            Write = ".*",
        },
        User = "guest",
        Vhost = testVHost.Name,
    });
    var testQueue = new RabbitMQ.Queue("testQueue", new RabbitMQ.QueueArgs
    {
        Settings = new RabbitMQ.Inputs.QueueSettingsArgs
        {
            AutoDelete = true,
            Durable = false,
        },
        Vhost = guest.Vhost,
    });
}

}

Example With JSON Arguments

using Pulumi;
using RabbitMQ = Pulumi.RabbitMQ;

class MyStack : Stack
{
public MyStack()
{
    var config = new Config();
    var arguments = config.Get("arguments") ?? @"{
""x-message-ttl"": 5000
}

";
    var testVHost = new RabbitMQ.VHost("testVHost", new RabbitMQ.VHostArgs
    {
    });
    var guest = new RabbitMQ.Permissions("guest", new RabbitMQ.PermissionsArgs
    {
        Permissions = new RabbitMQ.Inputs.PermissionsPermissionsArgs
        {
            Configure = ".*",
            Read = ".*",
            Write = ".*",
        },
        User = "guest",
        Vhost = testVHost.Name,
    });
    var testQueue = new RabbitMQ.Queue("testQueue", new RabbitMQ.QueueArgs
    {
        Settings = new RabbitMQ.Inputs.QueueSettingsArgs
        {
            ArgumentsJson = arguments,
            AutoDelete = true,
            Durable = false,
        },
        Vhost = guest.Vhost,
    });
}

}
Inheritance
System.Object
Resource
CustomResource
Queue
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.RabbitMQ
Assembly: Pulumi.RabbitMQ.dll
Syntax
public class Queue : CustomResource

Constructors

View Source

Queue(String, QueueArgs, CustomResourceOptions)

Create a Queue resource with the given unique name, arguments, and options.

Declaration
public Queue(string name, QueueArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

QueueArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

Name

The name of the queue.

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>
View Source

Settings

The settings of the queue. The structure is described below.

Declaration
public Output<QueueSettings> Settings { get; }
Property Value
Type Description
Output<QueueSettings>
View Source

Vhost

The vhost to create the resource in.

Declaration
public Output<string> Vhost { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, QueueState, CustomResourceOptions)

Get an existing Queue resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static Queue Get(string name, Input<string> id, QueueState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

QueueState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
Queue
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.