ExchangeArgs

data class ExchangeArgs(val alternateExchange: Output<String>? = null, val autoDeleteState: Output<Boolean>? = null, val exchangeName: Output<String>? = null, val exchangeType: Output<String>? = null, val instanceId: Output<String>? = null, val internal: Output<Boolean>? = null, val virtualHostName: Output<String>? = null) : ConvertibleToJava<ExchangeArgs>

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

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

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>

Constructors

Link copied to clipboard
fun ExchangeArgs(alternateExchange: Output<String>? = null, autoDeleteState: Output<Boolean>? = null, exchangeName: Output<String>? = null, exchangeType: Output<String>? = null, instanceId: Output<String>? = null, internal: Output<Boolean>? = null, virtualHostName: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): ExchangeArgs

Properties

Link copied to clipboard
val alternateExchange: Output<String>? = null

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.

Link copied to clipboard
val autoDeleteState: Output<Boolean>? = null

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

Link copied to clipboard
val exchangeName: Output<String>? = null

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 (@).

Link copied to clipboard
val exchangeType: Output<String>? = null

The type of the exchange. Valid values:

Link copied to clipboard
val instanceId: Output<String>? = null

The ID of the instance.

Link copied to clipboard
val internal: Output<Boolean>? = null

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

Link copied to clipboard
val virtualHostName: Output<String>? = null

The name of virtual host where an exchange resides.