EventSource

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 in v1.130.0+.

Example Usage

Basic Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new AliCloud.EventBridge.EventSource("example", new AliCloud.EventBridge.EventSourceArgs
        {
            Description = "tf-test",
            EventBusName = "bus_name",
            EventSourceName = "tftest",
            ExternalSourceConfig = 
            {
                { "QueueName", "mns_queuqe_name" },
            },
            ExternalSourceType = "MNS",
            LinkedExternalSource = true,
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/eventbridge"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := eventbridge.NewEventSource(ctx, "example", &eventbridge.EventSourceArgs{
			Description:     pulumi.String("tf-test"),
			EventBusName:    pulumi.String("bus_name"),
			EventSourceName: pulumi.String("tftest"),
			ExternalSourceConfig: pulumi.AnyMap{
				"QueueName": pulumi.Any("mns_queuqe_name"),
			},
			ExternalSourceType:   pulumi.String("MNS"),
			LinkedExternalSource: pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
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) {
        var example = new EventSource("example", EventSourceArgs.builder()        
            .description("tf-test")
            .eventBusName("bus_name")
            .eventSourceName("tftest")
            .externalSourceConfig(Map.of("QueueName", "mns_queuqe_name"))
            .externalSourceType("MNS")
            .linkedExternalSource(true)
            .build());

    }
}
import pulumi
import pulumi_alicloud as alicloud

example = alicloud.eventbridge.EventSource("example",
    description="tf-test",
    event_bus_name="bus_name",
    event_source_name="tftest",
    external_source_config={
        "QueueName": "mns_queuqe_name",
    },
    external_source_type="MNS",
    linked_external_source=True)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const example = new alicloud.eventbridge.EventSource("example", {
    description: "tf-test",
    eventBusName: "bus_name",
    eventSourceName: "tftest",
    externalSourceConfig: {
        QueueName: "mns_queuqe_name",
    },
    externalSourceType: "MNS",
    linkedExternalSource: true,
});
resources:
  example:
    type: alicloud:eventbridge:EventSource
    properties:
      description: tf-test
      eventBusName: bus_name
      eventSourceName: tftest
      externalSourceConfig:
        QueueName: mns_queuqe_name
      externalSourceType: MNS
      linkedExternalSource: true

Create EventSource Resource

new EventSource(name: string, args: EventSourceArgs, opts?: CustomResourceOptions);
@overload
def EventSource(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                description: Optional[str] = None,
                event_bus_name: Optional[str] = None,
                event_source_name: Optional[str] = None,
                external_source_config: Optional[Mapping[str, Any]] = None,
                external_source_type: Optional[str] = None,
                linked_external_source: Optional[bool] = None)
@overload
def EventSource(resource_name: str,
                args: EventSourceArgs,
                opts: Optional[ResourceOptions] = None)
func NewEventSource(ctx *Context, name string, args EventSourceArgs, opts ...ResourceOption) (*EventSource, error)
public EventSource(string name, EventSourceArgs args, CustomResourceOptions? opts = null)
public EventSource(String name, EventSourceArgs args)
public EventSource(String name, EventSourceArgs args, CustomResourceOptions options)
type: alicloud:eventbridge:EventSource
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args EventSourceArgs
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 EventSourceArgs
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 EventSourceArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args EventSourceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args EventSourceArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

EventSource Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The EventSource resource accepts the following input properties:

EventBusName string

The name of event bus.

EventSourceName string

The code name of event source.

Description string

The detail describe of event source.

ExternalSourceConfig Dictionary<string, object>

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.

ExternalSourceType string

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

LinkedExternalSource bool

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

EventBusName string

The name of event bus.

EventSourceName string

The code name of event source.

Description string

The detail describe of event source.

ExternalSourceConfig map[string]interface{}

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.

ExternalSourceType string

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

LinkedExternalSource bool

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

eventBusName String

The name of event bus.

eventSourceName String

The code name of event source.

description String

The detail describe of event source.

externalSourceConfig Map<String,Object>

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.

externalSourceType String

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

linkedExternalSource Boolean

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

eventBusName string

The name of event bus.

eventSourceName string

The code name of event source.

description string

The detail describe of event source.

externalSourceConfig {[key: string]: any}

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.

externalSourceType string

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

linkedExternalSource boolean

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

event_bus_name str

The name of event bus.

event_source_name str

The code name of event source.

description str

The detail describe of event source.

external_source_config Mapping[str, Any]

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.

external_source_type str

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

linked_external_source bool

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

eventBusName String

The name of event bus.

eventSourceName String

The code name of event source.

description String

The detail describe of event source.

externalSourceConfig Map<Any>

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.

externalSourceType String

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

linkedExternalSource Boolean

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

Outputs

All input properties are implicitly available as output properties. Additionally, the EventSource 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 EventSource Resource

Get an existing EventSource 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?: EventSourceState, opts?: CustomResourceOptions): EventSource
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        description: Optional[str] = None,
        event_bus_name: Optional[str] = None,
        event_source_name: Optional[str] = None,
        external_source_config: Optional[Mapping[str, Any]] = None,
        external_source_type: Optional[str] = None,
        linked_external_source: Optional[bool] = None) -> EventSource
func GetEventSource(ctx *Context, name string, id IDInput, state *EventSourceState, opts ...ResourceOption) (*EventSource, error)
public static EventSource Get(string name, Input<string> id, EventSourceState? state, CustomResourceOptions? opts = null)
public static EventSource get(String name, Output<String> id, EventSourceState 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:
Description string

The detail describe of event source.

EventBusName string

The name of event bus.

EventSourceName string

The code name of event source.

ExternalSourceConfig Dictionary<string, object>

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.

ExternalSourceType string

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

LinkedExternalSource bool

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

Description string

The detail describe of event source.

EventBusName string

The name of event bus.

EventSourceName string

The code name of event source.

ExternalSourceConfig map[string]interface{}

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.

ExternalSourceType string

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

LinkedExternalSource bool

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

description String

The detail describe of event source.

eventBusName String

The name of event bus.

eventSourceName String

The code name of event source.

externalSourceConfig Map<String,Object>

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.

externalSourceType String

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

linkedExternalSource Boolean

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

description string

The detail describe of event source.

eventBusName string

The name of event bus.

eventSourceName string

The code name of event source.

externalSourceConfig {[key: string]: any}

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.

externalSourceType string

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

linkedExternalSource boolean

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

description str

The detail describe of event source.

event_bus_name str

The name of event bus.

event_source_name str

The code name of event source.

external_source_config Mapping[str, Any]

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.

external_source_type str

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

linked_external_source bool

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

description String

The detail describe of event source.

eventBusName String

The name of event bus.

eventSourceName String

The code name of event source.

externalSourceConfig Map<Any>

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.

externalSourceType String

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

linkedExternalSource Boolean

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

Import

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

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

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.