1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. amqp
  5. Exchange
Alibaba Cloud v3.45.1 published on Thursday, Dec 7, 2023 by Pulumi

alicloud.amqp.Exchange

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.45.1 published on Thursday, Dec 7, 2023 by Pulumi

    Provides a RabbitMQ (AMQP) Exchange resource.

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

    NOTE: Available since v1.128.0.

    Example Usage

    Basic Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var defaultInstance = new AliCloud.Amqp.Instance("defaultInstance", new()
        {
            InstanceType = "professional",
            MaxTps = "1000",
            QueueCapacity = "50",
            SupportEip = true,
            MaxEipTps = "128",
            PaymentType = "Subscription",
            Period = 1,
        });
    
        var defaultVirtualHost = new AliCloud.Amqp.VirtualHost("defaultVirtualHost", new()
        {
            InstanceId = defaultInstance.Id,
            VirtualHostName = "tf-example",
        });
    
        var defaultExchange = new AliCloud.Amqp.Exchange("defaultExchange", new()
        {
            AutoDeleteState = false,
            ExchangeName = "tf-example",
            ExchangeType = "DIRECT",
            InstanceId = defaultInstance.Id,
            Internal = false,
            VirtualHostName = defaultVirtualHost.VirtualHostName,
        });
    
    });
    
    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 {
    		defaultInstance, err := amqp.NewInstance(ctx, "defaultInstance", &amqp.InstanceArgs{
    			InstanceType:  pulumi.String("professional"),
    			MaxTps:        pulumi.String("1000"),
    			QueueCapacity: pulumi.String("50"),
    			SupportEip:    pulumi.Bool(true),
    			MaxEipTps:     pulumi.String("128"),
    			PaymentType:   pulumi.String("Subscription"),
    			Period:        pulumi.Int(1),
    		})
    		if err != nil {
    			return err
    		}
    		defaultVirtualHost, err := amqp.NewVirtualHost(ctx, "defaultVirtualHost", &amqp.VirtualHostArgs{
    			InstanceId:      defaultInstance.ID(),
    			VirtualHostName: pulumi.String("tf-example"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = amqp.NewExchange(ctx, "defaultExchange", &amqp.ExchangeArgs{
    			AutoDeleteState: pulumi.Bool(false),
    			ExchangeName:    pulumi.String("tf-example"),
    			ExchangeType:    pulumi.String("DIRECT"),
    			InstanceId:      defaultInstance.ID(),
    			Internal:        pulumi.Bool(false),
    			VirtualHostName: defaultVirtualHost.VirtualHostName,
    		})
    		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.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 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 defaultInstance = new Instance("defaultInstance", InstanceArgs.builder()        
                .instanceType("professional")
                .maxTps(1000)
                .queueCapacity(50)
                .supportEip(true)
                .maxEipTps(128)
                .paymentType("Subscription")
                .period(1)
                .build());
    
            var defaultVirtualHost = new VirtualHost("defaultVirtualHost", VirtualHostArgs.builder()        
                .instanceId(defaultInstance.id())
                .virtualHostName("tf-example")
                .build());
    
            var defaultExchange = new Exchange("defaultExchange", ExchangeArgs.builder()        
                .autoDeleteState(false)
                .exchangeName("tf-example")
                .exchangeType("DIRECT")
                .instanceId(defaultInstance.id())
                .internal(false)
                .virtualHostName(defaultVirtualHost.virtualHostName())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    default_instance = alicloud.amqp.Instance("defaultInstance",
        instance_type="professional",
        max_tps="1000",
        queue_capacity="50",
        support_eip=True,
        max_eip_tps="128",
        payment_type="Subscription",
        period=1)
    default_virtual_host = alicloud.amqp.VirtualHost("defaultVirtualHost",
        instance_id=default_instance.id,
        virtual_host_name="tf-example")
    default_exchange = alicloud.amqp.Exchange("defaultExchange",
        auto_delete_state=False,
        exchange_name="tf-example",
        exchange_type="DIRECT",
        instance_id=default_instance.id,
        internal=False,
        virtual_host_name=default_virtual_host.virtual_host_name)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const defaultInstance = new alicloud.amqp.Instance("defaultInstance", {
        instanceType: "professional",
        maxTps: "1000",
        queueCapacity: "50",
        supportEip: true,
        maxEipTps: "128",
        paymentType: "Subscription",
        period: 1,
    });
    const defaultVirtualHost = new alicloud.amqp.VirtualHost("defaultVirtualHost", {
        instanceId: defaultInstance.id,
        virtualHostName: "tf-example",
    });
    const defaultExchange = new alicloud.amqp.Exchange("defaultExchange", {
        autoDeleteState: false,
        exchangeName: "tf-example",
        exchangeType: "DIRECT",
        instanceId: defaultInstance.id,
        internal: false,
        virtualHostName: defaultVirtualHost.virtualHostName,
    });
    
    resources:
      defaultInstance:
        type: alicloud:amqp:Instance
        properties:
          instanceType: professional
          maxTps: 1000
          queueCapacity: 50
          supportEip: true
          maxEipTps: 128
          paymentType: Subscription
          period: 1
      defaultVirtualHost:
        type: alicloud:amqp:VirtualHost
        properties:
          instanceId: ${defaultInstance.id}
          virtualHostName: tf-example
      defaultExchange:
        type: alicloud:amqp:Exchange
        properties:
          autoDeleteState: false
          exchangeName: tf-example
          exchangeType: DIRECT
          instanceId: ${defaultInstance.id}
          internal: false
          virtualHostName: ${defaultVirtualHost.virtualHostName}
    

    Create Exchange Resource

    new Exchange(name: string, args: ExchangeArgs, opts?: CustomResourceOptions);
    @overload
    def Exchange(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 alternate_exchange: Optional[str] = None,
                 auto_delete_state: Optional[bool] = None,
                 exchange_name: Optional[str] = None,
                 exchange_type: Optional[str] = None,
                 instance_id: Optional[str] = None,
                 internal: Optional[bool] = None,
                 virtual_host_name: Optional[str] = None)
    @overload
    def Exchange(resource_name: str,
                 args: ExchangeArgs,
                 opts: Optional[ResourceOptions] = None)
    func NewExchange(ctx *Context, name string, args ExchangeArgs, opts ...ResourceOption) (*Exchange, error)
    public Exchange(string name, ExchangeArgs args, CustomResourceOptions? opts = null)
    public Exchange(String name, ExchangeArgs args)
    public Exchange(String name, ExchangeArgs args, CustomResourceOptions options)
    
    type: alicloud:amqp:Exchange
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args ExchangeArgs
    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 ExchangeArgs
    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 ExchangeArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ExchangeArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ExchangeArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Exchange 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 Exchange resource accepts the following input properties:

    AutoDeleteState bool

    Specifies whether the Auto Delete attribute is configured. Valid values:

    • true: The Auto Delete attribute is configured. If the last queue that is bound to an exchange is unbound, the exchange is automatically deleted.
    • false: The Auto Delete attribute is not configured. If the last queue that is bound to an exchange is unbound, the exchange is not automatically deleted.
    ExchangeName string

    The name of the exchange. It must be 1 to 255 characters in length, and can contain only letters, digits, hyphens (-), underscores (_), periods (.), and at signs (@).

    ExchangeType string

    The type of the exchange. Valid values:

    • FANOUT: An exchange of this type routes all the received messages to all the queues bound to this exchange. You can use a fanout exchange to broadcast messages.
    • DIRECT: An exchange of this type routes a message to the queue whose binding key is exactly the same as the routing key of the message.
    • TOPIC: This type is similar to the direct exchange type. An exchange of this type routes a message to one or more queues based on the fuzzy match or multi-condition match result between the routing key of the message and the binding keys of the current exchange.
    • HEADERS: Headers Exchange uses the Headers property instead of Routing Key for routing matching. When binding Headers Exchange and Queue, set the key-value pair of the binding property; when sending a message to the Headers Exchange, set the message's Headers property key-value pair and use the message Headers The message is routed to the bound Queue by comparing the attribute key-value pair and the bound attribute key-value pair.
    InstanceId string

    The ID of the instance.

    Internal bool

    Specifies whether an exchange is an internal exchange. Valid values:

    • false: The exchange is not an internal exchange.
    • true: The exchange is an internal exchange.
    VirtualHostName string

    The name of virtual host where an exchange resides.

    AlternateExchange string

    The alternate exchange. An alternate exchange is configured for an existing exchange. It is used to receive messages that fail to be routed to queues from the existing exchange.

    AutoDeleteState bool

    Specifies whether the Auto Delete attribute is configured. Valid values:

    • true: The Auto Delete attribute is configured. If the last queue that is bound to an exchange is unbound, the exchange is automatically deleted.
    • false: The Auto Delete attribute is not configured. If the last queue that is bound to an exchange is unbound, the exchange is not automatically deleted.
    ExchangeName string

    The name of the exchange. It must be 1 to 255 characters in length, and can contain only letters, digits, hyphens (-), underscores (_), periods (.), and at signs (@).

    ExchangeType string

    The type of the exchange. Valid values:

    • FANOUT: An exchange of this type routes all the received messages to all the queues bound to this exchange. You can use a fanout exchange to broadcast messages.
    • DIRECT: An exchange of this type routes a message to the queue whose binding key is exactly the same as the routing key of the message.
    • TOPIC: This type is similar to the direct exchange type. An exchange of this type routes a message to one or more queues based on the fuzzy match or multi-condition match result between the routing key of the message and the binding keys of the current exchange.
    • HEADERS: Headers Exchange uses the Headers property instead of Routing Key for routing matching. When binding Headers Exchange and Queue, set the key-value pair of the binding property; when sending a message to the Headers Exchange, set the message's Headers property key-value pair and use the message Headers The message is routed to the bound Queue by comparing the attribute key-value pair and the bound attribute key-value pair.
    InstanceId string

    The ID of the instance.

    Internal bool

    Specifies whether an exchange is an internal exchange. Valid values:

    • false: The exchange is not an internal exchange.
    • true: The exchange is an internal exchange.
    VirtualHostName string

    The name of virtual host where an exchange resides.

    AlternateExchange string

    The alternate exchange. An alternate exchange is configured for an existing exchange. It is used to receive messages that fail to be routed to queues from the existing exchange.

    autoDeleteState Boolean

    Specifies whether the Auto Delete attribute is configured. Valid values:

    • true: The Auto Delete attribute is configured. If the last queue that is bound to an exchange is unbound, the exchange is automatically deleted.
    • false: The Auto Delete attribute is not configured. If the last queue that is bound to an exchange is unbound, the exchange is not automatically deleted.
    exchangeName String

    The name of the exchange. It must be 1 to 255 characters in length, and can contain only letters, digits, hyphens (-), underscores (_), periods (.), and at signs (@).

    exchangeType String

    The type of the exchange. Valid values:

    • FANOUT: An exchange of this type routes all the received messages to all the queues bound to this exchange. You can use a fanout exchange to broadcast messages.
    • DIRECT: An exchange of this type routes a message to the queue whose binding key is exactly the same as the routing key of the message.
    • TOPIC: This type is similar to the direct exchange type. An exchange of this type routes a message to one or more queues based on the fuzzy match or multi-condition match result between the routing key of the message and the binding keys of the current exchange.
    • HEADERS: Headers Exchange uses the Headers property instead of Routing Key for routing matching. When binding Headers Exchange and Queue, set the key-value pair of the binding property; when sending a message to the Headers Exchange, set the message's Headers property key-value pair and use the message Headers The message is routed to the bound Queue by comparing the attribute key-value pair and the bound attribute key-value pair.
    instanceId String

    The ID of the instance.

    internal Boolean

    Specifies whether an exchange is an internal exchange. Valid values:

    • false: The exchange is not an internal exchange.
    • true: The exchange is an internal exchange.
    virtualHostName String

    The name of virtual host where an exchange resides.

    alternateExchange String

    The alternate exchange. An alternate exchange is configured for an existing exchange. It is used to receive messages that fail to be routed to queues from the existing exchange.

    autoDeleteState boolean

    Specifies whether the Auto Delete attribute is configured. Valid values:

    • true: The Auto Delete attribute is configured. If the last queue that is bound to an exchange is unbound, the exchange is automatically deleted.
    • false: The Auto Delete attribute is not configured. If the last queue that is bound to an exchange is unbound, the exchange is not automatically deleted.
    exchangeName string

    The name of the exchange. It must be 1 to 255 characters in length, and can contain only letters, digits, hyphens (-), underscores (_), periods (.), and at signs (@).

    exchangeType string

    The type of the exchange. Valid values:

    • FANOUT: An exchange of this type routes all the received messages to all the queues bound to this exchange. You can use a fanout exchange to broadcast messages.
    • DIRECT: An exchange of this type routes a message to the queue whose binding key is exactly the same as the routing key of the message.
    • TOPIC: This type is similar to the direct exchange type. An exchange of this type routes a message to one or more queues based on the fuzzy match or multi-condition match result between the routing key of the message and the binding keys of the current exchange.
    • HEADERS: Headers Exchange uses the Headers property instead of Routing Key for routing matching. When binding Headers Exchange and Queue, set the key-value pair of the binding property; when sending a message to the Headers Exchange, set the message's Headers property key-value pair and use the message Headers The message is routed to the bound Queue by comparing the attribute key-value pair and the bound attribute key-value pair.
    instanceId string

    The ID of the instance.

    internal boolean

    Specifies whether an exchange is an internal exchange. Valid values:

    • false: The exchange is not an internal exchange.
    • true: The exchange is an internal exchange.
    virtualHostName string

    The name of virtual host where an exchange resides.

    alternateExchange string

    The alternate exchange. An alternate exchange is configured for an existing exchange. It is used to receive messages that fail to be routed to queues from the existing exchange.

    auto_delete_state bool

    Specifies whether the Auto Delete attribute is configured. Valid values:

    • true: The Auto Delete attribute is configured. If the last queue that is bound to an exchange is unbound, the exchange is automatically deleted.
    • false: The Auto Delete attribute is not configured. If the last queue that is bound to an exchange is unbound, the exchange is not automatically deleted.
    exchange_name str

    The name of the exchange. It must be 1 to 255 characters in length, and can contain only letters, digits, hyphens (-), underscores (_), periods (.), and at signs (@).

    exchange_type str

    The type of the exchange. Valid values:

    • FANOUT: An exchange of this type routes all the received messages to all the queues bound to this exchange. You can use a fanout exchange to broadcast messages.
    • DIRECT: An exchange of this type routes a message to the queue whose binding key is exactly the same as the routing key of the message.
    • TOPIC: This type is similar to the direct exchange type. An exchange of this type routes a message to one or more queues based on the fuzzy match or multi-condition match result between the routing key of the message and the binding keys of the current exchange.
    • HEADERS: Headers Exchange uses the Headers property instead of Routing Key for routing matching. When binding Headers Exchange and Queue, set the key-value pair of the binding property; when sending a message to the Headers Exchange, set the message's Headers property key-value pair and use the message Headers The message is routed to the bound Queue by comparing the attribute key-value pair and the bound attribute key-value pair.
    instance_id str

    The ID of the instance.

    internal bool

    Specifies whether an exchange is an internal exchange. Valid values:

    • false: The exchange is not an internal exchange.
    • true: The exchange is an internal exchange.
    virtual_host_name str

    The name of virtual host where an exchange resides.

    alternate_exchange str

    The alternate exchange. An alternate exchange is configured for an existing exchange. It is used to receive messages that fail to be routed to queues from the existing exchange.

    autoDeleteState Boolean

    Specifies whether the Auto Delete attribute is configured. Valid values:

    • true: The Auto Delete attribute is configured. If the last queue that is bound to an exchange is unbound, the exchange is automatically deleted.
    • false: The Auto Delete attribute is not configured. If the last queue that is bound to an exchange is unbound, the exchange is not automatically deleted.
    exchangeName String

    The name of the exchange. It must be 1 to 255 characters in length, and can contain only letters, digits, hyphens (-), underscores (_), periods (.), and at signs (@).

    exchangeType String

    The type of the exchange. Valid values:

    • FANOUT: An exchange of this type routes all the received messages to all the queues bound to this exchange. You can use a fanout exchange to broadcast messages.
    • DIRECT: An exchange of this type routes a message to the queue whose binding key is exactly the same as the routing key of the message.
    • TOPIC: This type is similar to the direct exchange type. An exchange of this type routes a message to one or more queues based on the fuzzy match or multi-condition match result between the routing key of the message and the binding keys of the current exchange.
    • HEADERS: Headers Exchange uses the Headers property instead of Routing Key for routing matching. When binding Headers Exchange and Queue, set the key-value pair of the binding property; when sending a message to the Headers Exchange, set the message's Headers property key-value pair and use the message Headers The message is routed to the bound Queue by comparing the attribute key-value pair and the bound attribute key-value pair.
    instanceId String

    The ID of the instance.

    internal Boolean

    Specifies whether an exchange is an internal exchange. Valid values:

    • false: The exchange is not an internal exchange.
    • true: The exchange is an internal exchange.
    virtualHostName String

    The name of virtual host where an exchange resides.

    alternateExchange String

    The alternate exchange. An alternate exchange is configured for an existing exchange. It is used to receive messages that fail to be routed to queues from the existing exchange.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Exchange 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 Exchange Resource

    Get an existing Exchange 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?: ExchangeState, opts?: CustomResourceOptions): Exchange
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            alternate_exchange: Optional[str] = None,
            auto_delete_state: Optional[bool] = None,
            exchange_name: Optional[str] = None,
            exchange_type: Optional[str] = None,
            instance_id: Optional[str] = None,
            internal: Optional[bool] = None,
            virtual_host_name: Optional[str] = None) -> Exchange
    func GetExchange(ctx *Context, name string, id IDInput, state *ExchangeState, opts ...ResourceOption) (*Exchange, error)
    public static Exchange Get(string name, Input<string> id, ExchangeState? state, CustomResourceOptions? opts = null)
    public static Exchange get(String name, Output<String> id, ExchangeState 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:
    AlternateExchange string

    The alternate exchange. An alternate exchange is configured for an existing exchange. It is used to receive messages that fail to be routed to queues from the existing exchange.

    AutoDeleteState bool

    Specifies whether the Auto Delete attribute is configured. Valid values:

    • true: The Auto Delete attribute is configured. If the last queue that is bound to an exchange is unbound, the exchange is automatically deleted.
    • false: The Auto Delete attribute is not configured. If the last queue that is bound to an exchange is unbound, the exchange is not automatically deleted.
    ExchangeName string

    The name of the exchange. It must be 1 to 255 characters in length, and can contain only letters, digits, hyphens (-), underscores (_), periods (.), and at signs (@).

    ExchangeType string

    The type of the exchange. Valid values:

    • FANOUT: An exchange of this type routes all the received messages to all the queues bound to this exchange. You can use a fanout exchange to broadcast messages.
    • DIRECT: An exchange of this type routes a message to the queue whose binding key is exactly the same as the routing key of the message.
    • TOPIC: This type is similar to the direct exchange type. An exchange of this type routes a message to one or more queues based on the fuzzy match or multi-condition match result between the routing key of the message and the binding keys of the current exchange.
    • HEADERS: Headers Exchange uses the Headers property instead of Routing Key for routing matching. When binding Headers Exchange and Queue, set the key-value pair of the binding property; when sending a message to the Headers Exchange, set the message's Headers property key-value pair and use the message Headers The message is routed to the bound Queue by comparing the attribute key-value pair and the bound attribute key-value pair.
    InstanceId string

    The ID of the instance.

    Internal bool

    Specifies whether an exchange is an internal exchange. Valid values:

    • false: The exchange is not an internal exchange.
    • true: The exchange is an internal exchange.
    VirtualHostName string

    The name of virtual host where an exchange resides.

    AlternateExchange string

    The alternate exchange. An alternate exchange is configured for an existing exchange. It is used to receive messages that fail to be routed to queues from the existing exchange.

    AutoDeleteState bool

    Specifies whether the Auto Delete attribute is configured. Valid values:

    • true: The Auto Delete attribute is configured. If the last queue that is bound to an exchange is unbound, the exchange is automatically deleted.
    • false: The Auto Delete attribute is not configured. If the last queue that is bound to an exchange is unbound, the exchange is not automatically deleted.
    ExchangeName string

    The name of the exchange. It must be 1 to 255 characters in length, and can contain only letters, digits, hyphens (-), underscores (_), periods (.), and at signs (@).

    ExchangeType string

    The type of the exchange. Valid values:

    • FANOUT: An exchange of this type routes all the received messages to all the queues bound to this exchange. You can use a fanout exchange to broadcast messages.
    • DIRECT: An exchange of this type routes a message to the queue whose binding key is exactly the same as the routing key of the message.
    • TOPIC: This type is similar to the direct exchange type. An exchange of this type routes a message to one or more queues based on the fuzzy match or multi-condition match result between the routing key of the message and the binding keys of the current exchange.
    • HEADERS: Headers Exchange uses the Headers property instead of Routing Key for routing matching. When binding Headers Exchange and Queue, set the key-value pair of the binding property; when sending a message to the Headers Exchange, set the message's Headers property key-value pair and use the message Headers The message is routed to the bound Queue by comparing the attribute key-value pair and the bound attribute key-value pair.
    InstanceId string

    The ID of the instance.

    Internal bool

    Specifies whether an exchange is an internal exchange. Valid values:

    • false: The exchange is not an internal exchange.
    • true: The exchange is an internal exchange.
    VirtualHostName string

    The name of virtual host where an exchange resides.

    alternateExchange String

    The alternate exchange. An alternate exchange is configured for an existing exchange. It is used to receive messages that fail to be routed to queues from the existing exchange.

    autoDeleteState Boolean

    Specifies whether the Auto Delete attribute is configured. Valid values:

    • true: The Auto Delete attribute is configured. If the last queue that is bound to an exchange is unbound, the exchange is automatically deleted.
    • false: The Auto Delete attribute is not configured. If the last queue that is bound to an exchange is unbound, the exchange is not automatically deleted.
    exchangeName String

    The name of the exchange. It must be 1 to 255 characters in length, and can contain only letters, digits, hyphens (-), underscores (_), periods (.), and at signs (@).

    exchangeType String

    The type of the exchange. Valid values:

    • FANOUT: An exchange of this type routes all the received messages to all the queues bound to this exchange. You can use a fanout exchange to broadcast messages.
    • DIRECT: An exchange of this type routes a message to the queue whose binding key is exactly the same as the routing key of the message.
    • TOPIC: This type is similar to the direct exchange type. An exchange of this type routes a message to one or more queues based on the fuzzy match or multi-condition match result between the routing key of the message and the binding keys of the current exchange.
    • HEADERS: Headers Exchange uses the Headers property instead of Routing Key for routing matching. When binding Headers Exchange and Queue, set the key-value pair of the binding property; when sending a message to the Headers Exchange, set the message's Headers property key-value pair and use the message Headers The message is routed to the bound Queue by comparing the attribute key-value pair and the bound attribute key-value pair.
    instanceId String

    The ID of the instance.

    internal Boolean

    Specifies whether an exchange is an internal exchange. Valid values:

    • false: The exchange is not an internal exchange.
    • true: The exchange is an internal exchange.
    virtualHostName String

    The name of virtual host where an exchange resides.

    alternateExchange string

    The alternate exchange. An alternate exchange is configured for an existing exchange. It is used to receive messages that fail to be routed to queues from the existing exchange.

    autoDeleteState boolean

    Specifies whether the Auto Delete attribute is configured. Valid values:

    • true: The Auto Delete attribute is configured. If the last queue that is bound to an exchange is unbound, the exchange is automatically deleted.
    • false: The Auto Delete attribute is not configured. If the last queue that is bound to an exchange is unbound, the exchange is not automatically deleted.
    exchangeName string

    The name of the exchange. It must be 1 to 255 characters in length, and can contain only letters, digits, hyphens (-), underscores (_), periods (.), and at signs (@).

    exchangeType string

    The type of the exchange. Valid values:

    • FANOUT: An exchange of this type routes all the received messages to all the queues bound to this exchange. You can use a fanout exchange to broadcast messages.
    • DIRECT: An exchange of this type routes a message to the queue whose binding key is exactly the same as the routing key of the message.
    • TOPIC: This type is similar to the direct exchange type. An exchange of this type routes a message to one or more queues based on the fuzzy match or multi-condition match result between the routing key of the message and the binding keys of the current exchange.
    • HEADERS: Headers Exchange uses the Headers property instead of Routing Key for routing matching. When binding Headers Exchange and Queue, set the key-value pair of the binding property; when sending a message to the Headers Exchange, set the message's Headers property key-value pair and use the message Headers The message is routed to the bound Queue by comparing the attribute key-value pair and the bound attribute key-value pair.
    instanceId string

    The ID of the instance.

    internal boolean

    Specifies whether an exchange is an internal exchange. Valid values:

    • false: The exchange is not an internal exchange.
    • true: The exchange is an internal exchange.
    virtualHostName string

    The name of virtual host where an exchange resides.

    alternate_exchange str

    The alternate exchange. An alternate exchange is configured for an existing exchange. It is used to receive messages that fail to be routed to queues from the existing exchange.

    auto_delete_state bool

    Specifies whether the Auto Delete attribute is configured. Valid values:

    • true: The Auto Delete attribute is configured. If the last queue that is bound to an exchange is unbound, the exchange is automatically deleted.
    • false: The Auto Delete attribute is not configured. If the last queue that is bound to an exchange is unbound, the exchange is not automatically deleted.
    exchange_name str

    The name of the exchange. It must be 1 to 255 characters in length, and can contain only letters, digits, hyphens (-), underscores (_), periods (.), and at signs (@).

    exchange_type str

    The type of the exchange. Valid values:

    • FANOUT: An exchange of this type routes all the received messages to all the queues bound to this exchange. You can use a fanout exchange to broadcast messages.
    • DIRECT: An exchange of this type routes a message to the queue whose binding key is exactly the same as the routing key of the message.
    • TOPIC: This type is similar to the direct exchange type. An exchange of this type routes a message to one or more queues based on the fuzzy match or multi-condition match result between the routing key of the message and the binding keys of the current exchange.
    • HEADERS: Headers Exchange uses the Headers property instead of Routing Key for routing matching. When binding Headers Exchange and Queue, set the key-value pair of the binding property; when sending a message to the Headers Exchange, set the message's Headers property key-value pair and use the message Headers The message is routed to the bound Queue by comparing the attribute key-value pair and the bound attribute key-value pair.
    instance_id str

    The ID of the instance.

    internal bool

    Specifies whether an exchange is an internal exchange. Valid values:

    • false: The exchange is not an internal exchange.
    • true: The exchange is an internal exchange.
    virtual_host_name str

    The name of virtual host where an exchange resides.

    alternateExchange String

    The alternate exchange. An alternate exchange is configured for an existing exchange. It is used to receive messages that fail to be routed to queues from the existing exchange.

    autoDeleteState Boolean

    Specifies whether the Auto Delete attribute is configured. Valid values:

    • true: The Auto Delete attribute is configured. If the last queue that is bound to an exchange is unbound, the exchange is automatically deleted.
    • false: The Auto Delete attribute is not configured. If the last queue that is bound to an exchange is unbound, the exchange is not automatically deleted.
    exchangeName String

    The name of the exchange. It must be 1 to 255 characters in length, and can contain only letters, digits, hyphens (-), underscores (_), periods (.), and at signs (@).

    exchangeType String

    The type of the exchange. Valid values:

    • FANOUT: An exchange of this type routes all the received messages to all the queues bound to this exchange. You can use a fanout exchange to broadcast messages.
    • DIRECT: An exchange of this type routes a message to the queue whose binding key is exactly the same as the routing key of the message.
    • TOPIC: This type is similar to the direct exchange type. An exchange of this type routes a message to one or more queues based on the fuzzy match or multi-condition match result between the routing key of the message and the binding keys of the current exchange.
    • HEADERS: Headers Exchange uses the Headers property instead of Routing Key for routing matching. When binding Headers Exchange and Queue, set the key-value pair of the binding property; when sending a message to the Headers Exchange, set the message's Headers property key-value pair and use the message Headers The message is routed to the bound Queue by comparing the attribute key-value pair and the bound attribute key-value pair.
    instanceId String

    The ID of the instance.

    internal Boolean

    Specifies whether an exchange is an internal exchange. Valid values:

    • false: The exchange is not an internal exchange.
    • true: The exchange is an internal exchange.
    virtualHostName String

    The name of virtual host where an exchange resides.

    Import

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

     $ pulumi import alicloud:amqp/exchange:Exchange example <instance_id>:<virtual_host_name>:<exchange_name>
    

    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.45.1 published on Thursday, Dec 7, 2023 by Pulumi