EventSource

class EventSource : KotlinCustomResource

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>

Properties

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

The detail describe of event source.

Link copied to clipboard
val eventBusName: Output<String>

The name of event bus.

Link copied to clipboard
val eventSourceName: Output<String>

The code name of event source.

Link copied to clipboard

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

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 id: Output<String>
Link copied to clipboard

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

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