1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. amqp
  5. Exchange
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

alicloud.amqp.Exchange

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 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

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const _default = new alicloud.amqp.Instance("default", {
        instanceType: "professional",
        maxTps: "1000",
        queueCapacity: "50",
        supportEip: true,
        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,
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    default = alicloud.amqp.Instance("default",
        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("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)
    
    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("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, "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
    		}
    		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 = "professional",
            MaxTps = "1000",
            QueueCapacity = "50",
            SupportEip = true,
            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,
        });
    
    });
    
    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 default_ = new Instance("default", 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(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());
    
        }
    }
    
    resources:
      default:
        type: alicloud:amqp:Instance
        properties:
          instanceType: professional
          maxTps: 1000
          queueCapacity: 50
          supportEip: true
          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}
    

    Create Exchange Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Exchange(name: string, args: ExchangeArgs, opts?: CustomResourceOptions);
    @overload
    def Exchange(resource_name: str,
                 args: ExchangeArgs,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def Exchange(resource_name: str,
                 opts: Optional[ResourceOptions] = 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,
                 alternate_exchange: Optional[str] = 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.
    
    

    Parameters

    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.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var exchangeResource = new AliCloud.Amqp.Exchange("exchangeResource", new()
    {
        AutoDeleteState = false,
        ExchangeName = "string",
        ExchangeType = "string",
        InstanceId = "string",
        Internal = false,
        VirtualHostName = "string",
        AlternateExchange = "string",
    });
    
    example, err := amqp.NewExchange(ctx, "exchangeResource", &amqp.ExchangeArgs{
    	AutoDeleteState:   pulumi.Bool(false),
    	ExchangeName:      pulumi.String("string"),
    	ExchangeType:      pulumi.String("string"),
    	InstanceId:        pulumi.String("string"),
    	Internal:          pulumi.Bool(false),
    	VirtualHostName:   pulumi.String("string"),
    	AlternateExchange: pulumi.String("string"),
    })
    
    var exchangeResource = new Exchange("exchangeResource", ExchangeArgs.builder()
        .autoDeleteState(false)
        .exchangeName("string")
        .exchangeType("string")
        .instanceId("string")
        .internal(false)
        .virtualHostName("string")
        .alternateExchange("string")
        .build());
    
    exchange_resource = alicloud.amqp.Exchange("exchangeResource",
        auto_delete_state=False,
        exchange_name="string",
        exchange_type="string",
        instance_id="string",
        internal=False,
        virtual_host_name="string",
        alternate_exchange="string")
    
    const exchangeResource = new alicloud.amqp.Exchange("exchangeResource", {
        autoDeleteState: false,
        exchangeName: "string",
        exchangeType: "string",
        instanceId: "string",
        internal: false,
        virtualHostName: "string",
        alternateExchange: "string",
    });
    
    type: alicloud:amqp:Exchange
    properties:
        alternateExchange: string
        autoDeleteState: false
        exchangeName: string
        exchangeType: string
        instanceId: string
        internal: false
        virtualHostName: string
    

    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

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    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>
    

    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.66.0 published on Friday, Nov 15, 2024 by Pulumi