1. Packages
  2. Alicloud Provider
  3. API Docs
  4. amqp
  5. Queue
Alibaba Cloud v3.63.0 published on Monday, Sep 30, 2024 by Pulumi

alicloud.amqp.Queue

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.63.0 published on Monday, Sep 30, 2024 by Pulumi

    Provides a RabbitMQ (AMQP) Queue resource.

    For information about RabbitMQ (AMQP) Queue and how to use it, see What is Queue.

    NOTE: Available since v1.127.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const _default = new alicloud.amqp.Instance("default", {
        instanceType: "enterprise",
        maxTps: "3000",
        queueCapacity: "200",
        storageSize: "700",
        supportEip: false,
        maxEipTps: "128",
        paymentType: "Subscription",
        period: 1,
    });
    const defaultVirtualHost = new alicloud.amqp.VirtualHost("default", {
        instanceId: _default.id,
        virtualHostName: "tf-example",
    });
    const defaultExchange = new alicloud.amqp.Exchange("default", {
        autoDeleteState: false,
        exchangeName: "tf-example",
        exchangeType: "DIRECT",
        instanceId: _default.id,
        internal: false,
        virtualHostName: defaultVirtualHost.virtualHostName,
    });
    const example = new alicloud.amqp.Queue("example", {
        instanceId: _default.id,
        queueName: "tf-example",
        virtualHostName: defaultVirtualHost.virtualHostName,
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    default = alicloud.amqp.Instance("default",
        instance_type="enterprise",
        max_tps="3000",
        queue_capacity="200",
        storage_size="700",
        support_eip=False,
        max_eip_tps="128",
        payment_type="Subscription",
        period=1)
    default_virtual_host = alicloud.amqp.VirtualHost("default",
        instance_id=default.id,
        virtual_host_name="tf-example")
    default_exchange = alicloud.amqp.Exchange("default",
        auto_delete_state=False,
        exchange_name="tf-example",
        exchange_type="DIRECT",
        instance_id=default.id,
        internal=False,
        virtual_host_name=default_virtual_host.virtual_host_name)
    example = alicloud.amqp.Queue("example",
        instance_id=default.id,
        queue_name="tf-example",
        virtual_host_name=default_virtual_host.virtual_host_name)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/amqp"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := amqp.NewInstance(ctx, "default", &amqp.InstanceArgs{
    			InstanceType:  pulumi.String("enterprise"),
    			MaxTps:        pulumi.String("3000"),
    			QueueCapacity: pulumi.String("200"),
    			StorageSize:   pulumi.String("700"),
    			SupportEip:    pulumi.Bool(false),
    			MaxEipTps:     pulumi.String("128"),
    			PaymentType:   pulumi.String("Subscription"),
    			Period:        pulumi.Int(1),
    		})
    		if err != nil {
    			return err
    		}
    		defaultVirtualHost, err := amqp.NewVirtualHost(ctx, "default", &amqp.VirtualHostArgs{
    			InstanceId:      _default.ID(),
    			VirtualHostName: pulumi.String("tf-example"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = amqp.NewExchange(ctx, "default", &amqp.ExchangeArgs{
    			AutoDeleteState: pulumi.Bool(false),
    			ExchangeName:    pulumi.String("tf-example"),
    			ExchangeType:    pulumi.String("DIRECT"),
    			InstanceId:      _default.ID(),
    			Internal:        pulumi.Bool(false),
    			VirtualHostName: defaultVirtualHost.VirtualHostName,
    		})
    		if err != nil {
    			return err
    		}
    		_, err = amqp.NewQueue(ctx, "example", &amqp.QueueArgs{
    			InstanceId:      _default.ID(),
    			QueueName:       pulumi.String("tf-example"),
    			VirtualHostName: defaultVirtualHost.VirtualHostName,
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = new AliCloud.Amqp.Instance("default", new()
        {
            InstanceType = "enterprise",
            MaxTps = "3000",
            QueueCapacity = "200",
            StorageSize = "700",
            SupportEip = false,
            MaxEipTps = "128",
            PaymentType = "Subscription",
            Period = 1,
        });
    
        var defaultVirtualHost = new AliCloud.Amqp.VirtualHost("default", new()
        {
            InstanceId = @default.Id,
            VirtualHostName = "tf-example",
        });
    
        var defaultExchange = new AliCloud.Amqp.Exchange("default", new()
        {
            AutoDeleteState = false,
            ExchangeName = "tf-example",
            ExchangeType = "DIRECT",
            InstanceId = @default.Id,
            Internal = false,
            VirtualHostName = defaultVirtualHost.VirtualHostName,
        });
    
        var example = new AliCloud.Amqp.Queue("example", new()
        {
            InstanceId = @default.Id,
            QueueName = "tf-example",
            VirtualHostName = defaultVirtualHost.VirtualHostName,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.amqp.Instance;
    import com.pulumi.alicloud.amqp.InstanceArgs;
    import com.pulumi.alicloud.amqp.VirtualHost;
    import com.pulumi.alicloud.amqp.VirtualHostArgs;
    import com.pulumi.alicloud.amqp.Exchange;
    import com.pulumi.alicloud.amqp.ExchangeArgs;
    import com.pulumi.alicloud.amqp.Queue;
    import com.pulumi.alicloud.amqp.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 default_ = new Instance("default", InstanceArgs.builder()
                .instanceType("enterprise")
                .maxTps(3000)
                .queueCapacity(200)
                .storageSize(700)
                .supportEip(false)
                .maxEipTps(128)
                .paymentType("Subscription")
                .period(1)
                .build());
    
            var defaultVirtualHost = new VirtualHost("defaultVirtualHost", VirtualHostArgs.builder()
                .instanceId(default_.id())
                .virtualHostName("tf-example")
                .build());
    
            var defaultExchange = new Exchange("defaultExchange", ExchangeArgs.builder()
                .autoDeleteState(false)
                .exchangeName("tf-example")
                .exchangeType("DIRECT")
                .instanceId(default_.id())
                .internal(false)
                .virtualHostName(defaultVirtualHost.virtualHostName())
                .build());
    
            var example = new Queue("example", QueueArgs.builder()
                .instanceId(default_.id())
                .queueName("tf-example")
                .virtualHostName(defaultVirtualHost.virtualHostName())
                .build());
    
        }
    }
    
    resources:
      default:
        type: alicloud:amqp:Instance
        properties:
          instanceType: enterprise
          maxTps: 3000
          queueCapacity: 200
          storageSize: 700
          supportEip: false
          maxEipTps: 128
          paymentType: Subscription
          period: 1
      defaultVirtualHost:
        type: alicloud:amqp:VirtualHost
        name: default
        properties:
          instanceId: ${default.id}
          virtualHostName: tf-example
      defaultExchange:
        type: alicloud:amqp:Exchange
        name: default
        properties:
          autoDeleteState: false
          exchangeName: tf-example
          exchangeType: DIRECT
          instanceId: ${default.id}
          internal: false
          virtualHostName: ${defaultVirtualHost.virtualHostName}
      example:
        type: alicloud:amqp:Queue
        properties:
          instanceId: ${default.id}
          queueName: tf-example
          virtualHostName: ${defaultVirtualHost.virtualHostName}
    

    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,
              instance_id: Optional[str] = None,
              queue_name: Optional[str] = None,
              virtual_host_name: Optional[str] = None,
              auto_delete_state: Optional[bool] = None,
              auto_expire_state: Optional[str] = None,
              dead_letter_exchange: Optional[str] = None,
              dead_letter_routing_key: Optional[str] = None,
              exclusive_state: Optional[bool] = None,
              max_length: Optional[str] = None,
              maximum_priority: Optional[int] = None,
              message_ttl: 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: alicloud:amqp: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 queueResource = new AliCloud.Amqp.Queue("queueResource", new()
    {
        InstanceId = "string",
        QueueName = "string",
        VirtualHostName = "string",
        AutoDeleteState = false,
        AutoExpireState = "string",
        DeadLetterExchange = "string",
        DeadLetterRoutingKey = "string",
        ExclusiveState = false,
        MaxLength = "string",
        MaximumPriority = 0,
        MessageTtl = "string",
    });
    
    example, err := amqp.NewQueue(ctx, "queueResource", &amqp.QueueArgs{
    	InstanceId:           pulumi.String("string"),
    	QueueName:            pulumi.String("string"),
    	VirtualHostName:      pulumi.String("string"),
    	AutoDeleteState:      pulumi.Bool(false),
    	AutoExpireState:      pulumi.String("string"),
    	DeadLetterExchange:   pulumi.String("string"),
    	DeadLetterRoutingKey: pulumi.String("string"),
    	ExclusiveState:       pulumi.Bool(false),
    	MaxLength:            pulumi.String("string"),
    	MaximumPriority:      pulumi.Int(0),
    	MessageTtl:           pulumi.String("string"),
    })
    
    var queueResource = new Queue("queueResource", QueueArgs.builder()
        .instanceId("string")
        .queueName("string")
        .virtualHostName("string")
        .autoDeleteState(false)
        .autoExpireState("string")
        .deadLetterExchange("string")
        .deadLetterRoutingKey("string")
        .exclusiveState(false)
        .maxLength("string")
        .maximumPriority(0)
        .messageTtl("string")
        .build());
    
    queue_resource = alicloud.amqp.Queue("queueResource",
        instance_id="string",
        queue_name="string",
        virtual_host_name="string",
        auto_delete_state=False,
        auto_expire_state="string",
        dead_letter_exchange="string",
        dead_letter_routing_key="string",
        exclusive_state=False,
        max_length="string",
        maximum_priority=0,
        message_ttl="string")
    
    const queueResource = new alicloud.amqp.Queue("queueResource", {
        instanceId: "string",
        queueName: "string",
        virtualHostName: "string",
        autoDeleteState: false,
        autoExpireState: "string",
        deadLetterExchange: "string",
        deadLetterRoutingKey: "string",
        exclusiveState: false,
        maxLength: "string",
        maximumPriority: 0,
        messageTtl: "string",
    });
    
    type: alicloud:amqp:Queue
    properties:
        autoDeleteState: false
        autoExpireState: string
        deadLetterExchange: string
        deadLetterRoutingKey: string
        exclusiveState: false
        instanceId: string
        maxLength: string
        maximumPriority: 0
        messageTtl: string
        queueName: string
        virtualHostName: 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:

    InstanceId string
    The ID of the instance.
    QueueName string
    The name of the queue. The queue name must be 1 to 255 characters in length, and can contain only letters, digits, hyphens (-), underscores (_), periods (.), and at signs (@).
    VirtualHostName string
    The name of the virtual host.
    AutoDeleteState bool
    Specifies whether the Auto Delete attribute is configured. Valid values:

    • true: The Auto Delete attribute is configured. The queue is automatically deleted after the last subscription from consumers to this queue is canceled.
    • false: The Auto Delete attribute is not configured.
    AutoExpireState string
    The validity period after which the queue is automatically deleted. If the queue is not accessed within a specified period of time, it is automatically deleted.
    DeadLetterExchange string
    The dead-letter exchange. A dead-letter exchange is used to receive rejected messages. If a consumer rejects a message that cannot be retried, this message is routed to a specified dead-letter exchange. Then, the dead-letter exchange routes the message to the queue that is bound to the dead-letter exchange.
    DeadLetterRoutingKey string
    The dead letter routing key.
    ExclusiveState bool
    Specifies whether the queue is an exclusive queue. Valid values:

    • true: The queue is an exclusive queue. It can be used only for the connection that declares the exclusive queue. After the connection is closed, the exclusive queue is automatically deleted.
    • false: The queue is not an exclusive queue.
    MaxLength string
    The maximum number of messages that can be stored in the queue. If this threshold is exceeded, the earliest messages that are routed to the queue are discarded.
    MaximumPriority int
    The highest priority supported by the queue. This parameter is set to a positive integer. Valid values: 0 to 255. Recommended values: 1 to 10
    MessageTtl string
    The message TTL of the queue. If the retention period of a message in the queue exceeds the message TTL of the queue, the message expires. Message TTL must be set to a non-negative integer, in milliseconds. For example, if the message TTL of the queue is 1000, messages survive for at most 1 second in the queue.
    InstanceId string
    The ID of the instance.
    QueueName string
    The name of the queue. The queue name must be 1 to 255 characters in length, and can contain only letters, digits, hyphens (-), underscores (_), periods (.), and at signs (@).
    VirtualHostName string
    The name of the virtual host.
    AutoDeleteState bool
    Specifies whether the Auto Delete attribute is configured. Valid values:

    • true: The Auto Delete attribute is configured. The queue is automatically deleted after the last subscription from consumers to this queue is canceled.
    • false: The Auto Delete attribute is not configured.
    AutoExpireState string
    The validity period after which the queue is automatically deleted. If the queue is not accessed within a specified period of time, it is automatically deleted.
    DeadLetterExchange string
    The dead-letter exchange. A dead-letter exchange is used to receive rejected messages. If a consumer rejects a message that cannot be retried, this message is routed to a specified dead-letter exchange. Then, the dead-letter exchange routes the message to the queue that is bound to the dead-letter exchange.
    DeadLetterRoutingKey string
    The dead letter routing key.
    ExclusiveState bool
    Specifies whether the queue is an exclusive queue. Valid values:

    • true: The queue is an exclusive queue. It can be used only for the connection that declares the exclusive queue. After the connection is closed, the exclusive queue is automatically deleted.
    • false: The queue is not an exclusive queue.
    MaxLength string
    The maximum number of messages that can be stored in the queue. If this threshold is exceeded, the earliest messages that are routed to the queue are discarded.
    MaximumPriority int
    The highest priority supported by the queue. This parameter is set to a positive integer. Valid values: 0 to 255. Recommended values: 1 to 10
    MessageTtl string
    The message TTL of the queue. If the retention period of a message in the queue exceeds the message TTL of the queue, the message expires. Message TTL must be set to a non-negative integer, in milliseconds. For example, if the message TTL of the queue is 1000, messages survive for at most 1 second in the queue.
    instanceId String
    The ID of the instance.
    queueName String
    The name of the queue. The queue name must be 1 to 255 characters in length, and can contain only letters, digits, hyphens (-), underscores (_), periods (.), and at signs (@).
    virtualHostName String
    The name of the virtual host.
    autoDeleteState Boolean
    Specifies whether the Auto Delete attribute is configured. Valid values:

    • true: The Auto Delete attribute is configured. The queue is automatically deleted after the last subscription from consumers to this queue is canceled.
    • false: The Auto Delete attribute is not configured.
    autoExpireState String
    The validity period after which the queue is automatically deleted. If the queue is not accessed within a specified period of time, it is automatically deleted.
    deadLetterExchange String
    The dead-letter exchange. A dead-letter exchange is used to receive rejected messages. If a consumer rejects a message that cannot be retried, this message is routed to a specified dead-letter exchange. Then, the dead-letter exchange routes the message to the queue that is bound to the dead-letter exchange.
    deadLetterRoutingKey String
    The dead letter routing key.
    exclusiveState Boolean
    Specifies whether the queue is an exclusive queue. Valid values:

    • true: The queue is an exclusive queue. It can be used only for the connection that declares the exclusive queue. After the connection is closed, the exclusive queue is automatically deleted.
    • false: The queue is not an exclusive queue.
    maxLength String
    The maximum number of messages that can be stored in the queue. If this threshold is exceeded, the earliest messages that are routed to the queue are discarded.
    maximumPriority Integer
    The highest priority supported by the queue. This parameter is set to a positive integer. Valid values: 0 to 255. Recommended values: 1 to 10
    messageTtl String
    The message TTL of the queue. If the retention period of a message in the queue exceeds the message TTL of the queue, the message expires. Message TTL must be set to a non-negative integer, in milliseconds. For example, if the message TTL of the queue is 1000, messages survive for at most 1 second in the queue.
    instanceId string
    The ID of the instance.
    queueName string
    The name of the queue. The queue name must be 1 to 255 characters in length, and can contain only letters, digits, hyphens (-), underscores (_), periods (.), and at signs (@).
    virtualHostName string
    The name of the virtual host.
    autoDeleteState boolean
    Specifies whether the Auto Delete attribute is configured. Valid values:

    • true: The Auto Delete attribute is configured. The queue is automatically deleted after the last subscription from consumers to this queue is canceled.
    • false: The Auto Delete attribute is not configured.
    autoExpireState string
    The validity period after which the queue is automatically deleted. If the queue is not accessed within a specified period of time, it is automatically deleted.
    deadLetterExchange string
    The dead-letter exchange. A dead-letter exchange is used to receive rejected messages. If a consumer rejects a message that cannot be retried, this message is routed to a specified dead-letter exchange. Then, the dead-letter exchange routes the message to the queue that is bound to the dead-letter exchange.
    deadLetterRoutingKey string
    The dead letter routing key.
    exclusiveState boolean
    Specifies whether the queue is an exclusive queue. Valid values:

    • true: The queue is an exclusive queue. It can be used only for the connection that declares the exclusive queue. After the connection is closed, the exclusive queue is automatically deleted.
    • false: The queue is not an exclusive queue.
    maxLength string
    The maximum number of messages that can be stored in the queue. If this threshold is exceeded, the earliest messages that are routed to the queue are discarded.
    maximumPriority number
    The highest priority supported by the queue. This parameter is set to a positive integer. Valid values: 0 to 255. Recommended values: 1 to 10
    messageTtl string
    The message TTL of the queue. If the retention period of a message in the queue exceeds the message TTL of the queue, the message expires. Message TTL must be set to a non-negative integer, in milliseconds. For example, if the message TTL of the queue is 1000, messages survive for at most 1 second in the queue.
    instance_id str
    The ID of the instance.
    queue_name str
    The name of the queue. The queue name must be 1 to 255 characters in length, and can contain only letters, digits, hyphens (-), underscores (_), periods (.), and at signs (@).
    virtual_host_name str
    The name of the virtual host.
    auto_delete_state bool
    Specifies whether the Auto Delete attribute is configured. Valid values:

    • true: The Auto Delete attribute is configured. The queue is automatically deleted after the last subscription from consumers to this queue is canceled.
    • false: The Auto Delete attribute is not configured.
    auto_expire_state str
    The validity period after which the queue is automatically deleted. If the queue is not accessed within a specified period of time, it is automatically deleted.
    dead_letter_exchange str
    The dead-letter exchange. A dead-letter exchange is used to receive rejected messages. If a consumer rejects a message that cannot be retried, this message is routed to a specified dead-letter exchange. Then, the dead-letter exchange routes the message to the queue that is bound to the dead-letter exchange.
    dead_letter_routing_key str
    The dead letter routing key.
    exclusive_state bool
    Specifies whether the queue is an exclusive queue. Valid values:

    • true: The queue is an exclusive queue. It can be used only for the connection that declares the exclusive queue. After the connection is closed, the exclusive queue is automatically deleted.
    • false: The queue is not an exclusive queue.
    max_length str
    The maximum number of messages that can be stored in the queue. If this threshold is exceeded, the earliest messages that are routed to the queue are discarded.
    maximum_priority int
    The highest priority supported by the queue. This parameter is set to a positive integer. Valid values: 0 to 255. Recommended values: 1 to 10
    message_ttl str
    The message TTL of the queue. If the retention period of a message in the queue exceeds the message TTL of the queue, the message expires. Message TTL must be set to a non-negative integer, in milliseconds. For example, if the message TTL of the queue is 1000, messages survive for at most 1 second in the queue.
    instanceId String
    The ID of the instance.
    queueName String
    The name of the queue. The queue name must be 1 to 255 characters in length, and can contain only letters, digits, hyphens (-), underscores (_), periods (.), and at signs (@).
    virtualHostName String
    The name of the virtual host.
    autoDeleteState Boolean
    Specifies whether the Auto Delete attribute is configured. Valid values:

    • true: The Auto Delete attribute is configured. The queue is automatically deleted after the last subscription from consumers to this queue is canceled.
    • false: The Auto Delete attribute is not configured.
    autoExpireState String
    The validity period after which the queue is automatically deleted. If the queue is not accessed within a specified period of time, it is automatically deleted.
    deadLetterExchange String
    The dead-letter exchange. A dead-letter exchange is used to receive rejected messages. If a consumer rejects a message that cannot be retried, this message is routed to a specified dead-letter exchange. Then, the dead-letter exchange routes the message to the queue that is bound to the dead-letter exchange.
    deadLetterRoutingKey String
    The dead letter routing key.
    exclusiveState Boolean
    Specifies whether the queue is an exclusive queue. Valid values:

    • true: The queue is an exclusive queue. It can be used only for the connection that declares the exclusive queue. After the connection is closed, the exclusive queue is automatically deleted.
    • false: The queue is not an exclusive queue.
    maxLength String
    The maximum number of messages that can be stored in the queue. If this threshold is exceeded, the earliest messages that are routed to the queue are discarded.
    maximumPriority Number
    The highest priority supported by the queue. This parameter is set to a positive integer. Valid values: 0 to 255. Recommended values: 1 to 10
    messageTtl String
    The message TTL of the queue. If the retention period of a message in the queue exceeds the message TTL of the queue, the message expires. Message TTL must be set to a non-negative integer, in milliseconds. For example, if the message TTL of the queue is 1000, messages survive for at most 1 second in the queue.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Queue Resource

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

    public static get(name: string, id: Input<ID>, state?: QueueState, opts?: CustomResourceOptions): Queue
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            auto_delete_state: Optional[bool] = None,
            auto_expire_state: Optional[str] = None,
            dead_letter_exchange: Optional[str] = None,
            dead_letter_routing_key: Optional[str] = None,
            exclusive_state: Optional[bool] = None,
            instance_id: Optional[str] = None,
            max_length: Optional[str] = None,
            maximum_priority: Optional[int] = None,
            message_ttl: Optional[str] = None,
            queue_name: Optional[str] = None,
            virtual_host_name: Optional[str] = None) -> Queue
    func GetQueue(ctx *Context, name string, id IDInput, state *QueueState, opts ...ResourceOption) (*Queue, error)
    public static Queue Get(string name, Input<string> id, QueueState? state, CustomResourceOptions? opts = null)
    public static Queue get(String name, Output<String> id, QueueState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AutoDeleteState bool
    Specifies whether the Auto Delete attribute is configured. Valid values:

    • true: The Auto Delete attribute is configured. The queue is automatically deleted after the last subscription from consumers to this queue is canceled.
    • false: The Auto Delete attribute is not configured.
    AutoExpireState string
    The validity period after which the queue is automatically deleted. If the queue is not accessed within a specified period of time, it is automatically deleted.
    DeadLetterExchange string
    The dead-letter exchange. A dead-letter exchange is used to receive rejected messages. If a consumer rejects a message that cannot be retried, this message is routed to a specified dead-letter exchange. Then, the dead-letter exchange routes the message to the queue that is bound to the dead-letter exchange.
    DeadLetterRoutingKey string
    The dead letter routing key.
    ExclusiveState bool
    Specifies whether the queue is an exclusive queue. Valid values:

    • true: The queue is an exclusive queue. It can be used only for the connection that declares the exclusive queue. After the connection is closed, the exclusive queue is automatically deleted.
    • false: The queue is not an exclusive queue.
    InstanceId string
    The ID of the instance.
    MaxLength string
    The maximum number of messages that can be stored in the queue. If this threshold is exceeded, the earliest messages that are routed to the queue are discarded.
    MaximumPriority int
    The highest priority supported by the queue. This parameter is set to a positive integer. Valid values: 0 to 255. Recommended values: 1 to 10
    MessageTtl string
    The message TTL of the queue. If the retention period of a message in the queue exceeds the message TTL of the queue, the message expires. Message TTL must be set to a non-negative integer, in milliseconds. For example, if the message TTL of the queue is 1000, messages survive for at most 1 second in the queue.
    QueueName string
    The name of the queue. The queue name must be 1 to 255 characters in length, and can contain only letters, digits, hyphens (-), underscores (_), periods (.), and at signs (@).
    VirtualHostName string
    The name of the virtual host.
    AutoDeleteState bool
    Specifies whether the Auto Delete attribute is configured. Valid values:

    • true: The Auto Delete attribute is configured. The queue is automatically deleted after the last subscription from consumers to this queue is canceled.
    • false: The Auto Delete attribute is not configured.
    AutoExpireState string
    The validity period after which the queue is automatically deleted. If the queue is not accessed within a specified period of time, it is automatically deleted.
    DeadLetterExchange string
    The dead-letter exchange. A dead-letter exchange is used to receive rejected messages. If a consumer rejects a message that cannot be retried, this message is routed to a specified dead-letter exchange. Then, the dead-letter exchange routes the message to the queue that is bound to the dead-letter exchange.
    DeadLetterRoutingKey string
    The dead letter routing key.
    ExclusiveState bool
    Specifies whether the queue is an exclusive queue. Valid values:

    • true: The queue is an exclusive queue. It can be used only for the connection that declares the exclusive queue. After the connection is closed, the exclusive queue is automatically deleted.
    • false: The queue is not an exclusive queue.
    InstanceId string
    The ID of the instance.
    MaxLength string
    The maximum number of messages that can be stored in the queue. If this threshold is exceeded, the earliest messages that are routed to the queue are discarded.
    MaximumPriority int
    The highest priority supported by the queue. This parameter is set to a positive integer. Valid values: 0 to 255. Recommended values: 1 to 10
    MessageTtl string
    The message TTL of the queue. If the retention period of a message in the queue exceeds the message TTL of the queue, the message expires. Message TTL must be set to a non-negative integer, in milliseconds. For example, if the message TTL of the queue is 1000, messages survive for at most 1 second in the queue.
    QueueName string
    The name of the queue. The queue name must be 1 to 255 characters in length, and can contain only letters, digits, hyphens (-), underscores (_), periods (.), and at signs (@).
    VirtualHostName string
    The name of the virtual host.
    autoDeleteState Boolean
    Specifies whether the Auto Delete attribute is configured. Valid values:

    • true: The Auto Delete attribute is configured. The queue is automatically deleted after the last subscription from consumers to this queue is canceled.
    • false: The Auto Delete attribute is not configured.
    autoExpireState String
    The validity period after which the queue is automatically deleted. If the queue is not accessed within a specified period of time, it is automatically deleted.
    deadLetterExchange String
    The dead-letter exchange. A dead-letter exchange is used to receive rejected messages. If a consumer rejects a message that cannot be retried, this message is routed to a specified dead-letter exchange. Then, the dead-letter exchange routes the message to the queue that is bound to the dead-letter exchange.
    deadLetterRoutingKey String
    The dead letter routing key.
    exclusiveState Boolean
    Specifies whether the queue is an exclusive queue. Valid values:

    • true: The queue is an exclusive queue. It can be used only for the connection that declares the exclusive queue. After the connection is closed, the exclusive queue is automatically deleted.
    • false: The queue is not an exclusive queue.
    instanceId String
    The ID of the instance.
    maxLength String
    The maximum number of messages that can be stored in the queue. If this threshold is exceeded, the earliest messages that are routed to the queue are discarded.
    maximumPriority Integer
    The highest priority supported by the queue. This parameter is set to a positive integer. Valid values: 0 to 255. Recommended values: 1 to 10
    messageTtl String
    The message TTL of the queue. If the retention period of a message in the queue exceeds the message TTL of the queue, the message expires. Message TTL must be set to a non-negative integer, in milliseconds. For example, if the message TTL of the queue is 1000, messages survive for at most 1 second in the queue.
    queueName String
    The name of the queue. The queue name must be 1 to 255 characters in length, and can contain only letters, digits, hyphens (-), underscores (_), periods (.), and at signs (@).
    virtualHostName String
    The name of the virtual host.
    autoDeleteState boolean
    Specifies whether the Auto Delete attribute is configured. Valid values:

    • true: The Auto Delete attribute is configured. The queue is automatically deleted after the last subscription from consumers to this queue is canceled.
    • false: The Auto Delete attribute is not configured.
    autoExpireState string
    The validity period after which the queue is automatically deleted. If the queue is not accessed within a specified period of time, it is automatically deleted.
    deadLetterExchange string
    The dead-letter exchange. A dead-letter exchange is used to receive rejected messages. If a consumer rejects a message that cannot be retried, this message is routed to a specified dead-letter exchange. Then, the dead-letter exchange routes the message to the queue that is bound to the dead-letter exchange.
    deadLetterRoutingKey string
    The dead letter routing key.
    exclusiveState boolean
    Specifies whether the queue is an exclusive queue. Valid values:

    • true: The queue is an exclusive queue. It can be used only for the connection that declares the exclusive queue. After the connection is closed, the exclusive queue is automatically deleted.
    • false: The queue is not an exclusive queue.
    instanceId string
    The ID of the instance.
    maxLength string
    The maximum number of messages that can be stored in the queue. If this threshold is exceeded, the earliest messages that are routed to the queue are discarded.
    maximumPriority number
    The highest priority supported by the queue. This parameter is set to a positive integer. Valid values: 0 to 255. Recommended values: 1 to 10
    messageTtl string
    The message TTL of the queue. If the retention period of a message in the queue exceeds the message TTL of the queue, the message expires. Message TTL must be set to a non-negative integer, in milliseconds. For example, if the message TTL of the queue is 1000, messages survive for at most 1 second in the queue.
    queueName string
    The name of the queue. The queue name must be 1 to 255 characters in length, and can contain only letters, digits, hyphens (-), underscores (_), periods (.), and at signs (@).
    virtualHostName string
    The name of the virtual host.
    auto_delete_state bool
    Specifies whether the Auto Delete attribute is configured. Valid values:

    • true: The Auto Delete attribute is configured. The queue is automatically deleted after the last subscription from consumers to this queue is canceled.
    • false: The Auto Delete attribute is not configured.
    auto_expire_state str
    The validity period after which the queue is automatically deleted. If the queue is not accessed within a specified period of time, it is automatically deleted.
    dead_letter_exchange str
    The dead-letter exchange. A dead-letter exchange is used to receive rejected messages. If a consumer rejects a message that cannot be retried, this message is routed to a specified dead-letter exchange. Then, the dead-letter exchange routes the message to the queue that is bound to the dead-letter exchange.
    dead_letter_routing_key str
    The dead letter routing key.
    exclusive_state bool
    Specifies whether the queue is an exclusive queue. Valid values:

    • true: The queue is an exclusive queue. It can be used only for the connection that declares the exclusive queue. After the connection is closed, the exclusive queue is automatically deleted.
    • false: The queue is not an exclusive queue.
    instance_id str
    The ID of the instance.
    max_length str
    The maximum number of messages that can be stored in the queue. If this threshold is exceeded, the earliest messages that are routed to the queue are discarded.
    maximum_priority int
    The highest priority supported by the queue. This parameter is set to a positive integer. Valid values: 0 to 255. Recommended values: 1 to 10
    message_ttl str
    The message TTL of the queue. If the retention period of a message in the queue exceeds the message TTL of the queue, the message expires. Message TTL must be set to a non-negative integer, in milliseconds. For example, if the message TTL of the queue is 1000, messages survive for at most 1 second in the queue.
    queue_name str
    The name of the queue. The queue name must be 1 to 255 characters in length, and can contain only letters, digits, hyphens (-), underscores (_), periods (.), and at signs (@).
    virtual_host_name str
    The name of the virtual host.
    autoDeleteState Boolean
    Specifies whether the Auto Delete attribute is configured. Valid values:

    • true: The Auto Delete attribute is configured. The queue is automatically deleted after the last subscription from consumers to this queue is canceled.
    • false: The Auto Delete attribute is not configured.
    autoExpireState String
    The validity period after which the queue is automatically deleted. If the queue is not accessed within a specified period of time, it is automatically deleted.
    deadLetterExchange String
    The dead-letter exchange. A dead-letter exchange is used to receive rejected messages. If a consumer rejects a message that cannot be retried, this message is routed to a specified dead-letter exchange. Then, the dead-letter exchange routes the message to the queue that is bound to the dead-letter exchange.
    deadLetterRoutingKey String
    The dead letter routing key.
    exclusiveState Boolean
    Specifies whether the queue is an exclusive queue. Valid values:

    • true: The queue is an exclusive queue. It can be used only for the connection that declares the exclusive queue. After the connection is closed, the exclusive queue is automatically deleted.
    • false: The queue is not an exclusive queue.
    instanceId String
    The ID of the instance.
    maxLength String
    The maximum number of messages that can be stored in the queue. If this threshold is exceeded, the earliest messages that are routed to the queue are discarded.
    maximumPriority Number
    The highest priority supported by the queue. This parameter is set to a positive integer. Valid values: 0 to 255. Recommended values: 1 to 10
    messageTtl String
    The message TTL of the queue. If the retention period of a message in the queue exceeds the message TTL of the queue, the message expires. Message TTL must be set to a non-negative integer, in milliseconds. For example, if the message TTL of the queue is 1000, messages survive for at most 1 second in the queue.
    queueName String
    The name of the queue. The queue name must be 1 to 255 characters in length, and can contain only letters, digits, hyphens (-), underscores (_), periods (.), and at signs (@).
    virtualHostName String
    The name of the virtual host.

    Import

    RabbitMQ (AMQP) Queue can be imported using the id, e.g.

    $ pulumi import alicloud:amqp/queue:Queue example <instance_id>:<virtual_host_name>:<queue_name>
    

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

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.63.0 published on Monday, Sep 30, 2024 by Pulumi