EventSourceArgs

data class EventSourceArgs(val description: Output<String>? = null, val eventBusName: Output<String>? = null, val eventSourceName: Output<String>? = null, val externalSourceConfig: Output<Map<String, Any>>? = null, val externalSourceType: Output<String>? = null, val linkedExternalSource: Output<Boolean>? = null) : ConvertibleToJava<EventSourceArgs>

Provides a Event Bridge Event Source resource. For information about Event Bridge Event Source and how to use it, see What is Event Source.

NOTE: Available since v1.130.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.eventbridge.EventBus;
import com.pulumi.alicloud.eventbridge.EventBusArgs;
import com.pulumi.alicloud.mns.Queue;
import com.pulumi.alicloud.eventbridge.EventSource;
import com.pulumi.alicloud.eventbridge.EventSourceArgs;
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) {
final var config = ctx.config();
final var name = config.get("name").orElse("tf-example");
var exampleEventBus = new EventBus("exampleEventBus", EventBusArgs.builder()
.eventBusName(name)
.build());
var exampleQueue = new Queue("exampleQueue");
var exampleEventSource = new EventSource("exampleEventSource", EventSourceArgs.builder()
.eventBusName(exampleEventBus.eventBusName())
.eventSourceName(name)
.description(name)
.linkedExternalSource(true)
.externalSourceType("MNS")
.externalSourceConfig(Map.of("QueueName", exampleQueue.name()))
.build());
}
}

Import

Event Bridge Event Source can be imported using the id, e.g.

$ pulumi import alicloud:eventbridge/eventSource:EventSource example <event_source_name>

Constructors

Link copied to clipboard
fun EventSourceArgs(description: Output<String>? = null, eventBusName: Output<String>? = null, eventSourceName: Output<String>? = null, externalSourceConfig: Output<Map<String, Any>>? = null, externalSourceType: Output<String>? = null, linkedExternalSource: Output<Boolean>? = null)

Functions

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

Properties

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

The detail describe of event source.

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

The name of event bus.

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

The code name of event source.

Link copied to clipboard
val externalSourceConfig: Output<Map<String, Any>>? = null

The config of external source. When external_source_type is RabbitMQ, The following attributes are supported: RegionId - The region ID of RabbitMQ. InstanceId - The instance ID of RabbitMQ. VirtualHostName - The virtual host name of RabbitMQ. QueueName - The queue name of RabbitMQ. When external_source_type is RabbitMQ, The following attributes are supported: RegionId - The region ID of RabbitMQ. InstanceId - The instance ID of RabbitMQ. Topic - The topic of RabbitMQ. Offset - The offset of RabbitMQ, valid values: CONSUME_FROM_FIRST_OFFSET, CONSUME_FROM_LAST_OFFSET and CONSUME_FROM_TIMESTAMP. GroupID - The group ID of consumer. When external_source_type is MNS, The following attributes are supported: QueueName - The queue name of MNS.

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

The type of external data source. Valid value : RabbitMQ, RocketMQ and MNS. NOTE: Only When linked_external_source is true, This field is valid.

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

Whether to connect to an external data source. Default value: false