Exchange

class Exchange : KotlinCustomResource

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>

Properties

Link copied to clipboard

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

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

Link copied to clipboard
val exchangeName: Output<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 (@).

Link copied to clipboard
val exchangeType: Output<String>

The type of the exchange. Valid values:

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val instanceId: Output<String>

The ID of the instance.

Link copied to clipboard
val internal: Output<Boolean>

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

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val virtualHostName: Output<String>

The name of virtual host where an exchange resides.