All Products
Search
Document Center

EventBridge:ListUserDefinedEventSources

Last Updated:Dec 29, 2025

This operation queries all custom event sources.

Operation description

This operation queries all custom event sources.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

NamePrefix

string

No

The name of the event source.

testName

EventBusName

string

No

The name of the event bus.

testBus

Limit

integer

No

The maximum number of entries to return for a single request. You can use this parameter with NextToken for pagination. Note: The maximum number of entries to return for a single request is 100.

50

NextToken

string

No

The token that is used to retrieve the next page of results. If more results exist, this parameter is returned.

100

Response elements

Element

Type

Description

Example

object

Message

string

The error message.

InvalidArgument

RequestId

string

The unique identifier that Alibaba Cloud generates for the request.

5169654A-7059-57E3-BFD9-33C7E012EA1B

Data

object

The returned data.

NextToken

string

The token that is used to retrieve the next page of results. If more results exist, this parameter is returned.

100

Total

integer

The total number of entries.

18

EventSourceList

array<object>

The list of event sources.

array<object>

The data structure of the event source.

Name

string

The name of the queried event source.

rocketmq.source

Arn

string

The Alibaba Cloud Resource Name (ARN) of the queried event source.

acs:eventbridge:cn-hangzhou:164901546557****:eventbus/my-event-bus/eventsource/myRocketMQ.source

Status

string

The status of the queried event source. Valid value: Activated.

Activated

Type

string

The type of the queried event source. Valid value: UserDefined, which indicates a custom event source.

UserDefined

Ctime

number

The timestamp of when the event source was created.

1607071602000

ExternalSourceType

string

The type of the event source.

RabbitMQ

EventBusName

string

The name of the event bus.

test-custom-bus

SourceMNSParameters

object

The parameters for the Simple Message Queue (formerly MNS) event source.

RegionId

string

The region where the MNS queue is located.

cn-hangzhou

QueueName

string

The name of the MNS queue.

queue.openapi-sign-callback

IsBase64Decode

boolean

Indicates whether Base64 decoding is enabled. Default value: true.

true

SourceRocketMQParameters

object

The `SourceRocketMQParameters` request parameters.

RegionId

string

The region where the ApsaraMQ for RocketMQ instance is located.

cn-shenzhen

InstanceId

string

The ID of the ApsaraMQ for RocketMQ instance. For more information, see Limits.

bastionhost-cn-7mz293s9d1p

Topic

string

The name of the topic on the ApsaraMQ for RocketMQ instance. For more information, see Limits.

migration_instance

Tag

string

The tag that is used to filter messages.

dataact

Offset

string

The consumer offset. Valid values:

  • CONSUME_FROM_LAST_OFFSET: Start consumption from the latest offset.

  • CONSUME_FROM_FIRST_OFFSET: Start consumption from the earliest offset.

  • CONSUME_FROM_TIMESTAMP: Start consumption from a specified timestamp.

Default value: CONSUME_FROM_LAST_OFFSET.

CONSUMEFROMLASTOFFSET

Timestamp

number

The timestamp. This parameter is valid only when `Offset` is set to `CONSUME_FROM_TIMESTAMP`.

1664591760

GroupId

string

The group ID of the ApsaraMQ for RocketMQ instance.

GID-test

InstanceType

string

The instance type. Valid values: CLOUD_4 (Cloud 4.0 instance), CLOUD_5 (Cloud 5.0 instance), and SELF_BUILT (self-managed MQ).

CLOUD_5

InstanceNetwork

string

The instance network.

PublicNetwork

InstanceVpcId

string

The ID of the VPC.

vpc-***

InstanceVSwitchIds

string

The vSwitch ID.

vsw-bp1iu***

InstanceSecurityGroupId

string

The security group ID.

eb-167adad548***

AuthType

string

The authentication type. Valid value: ACL. You can also leave this parameter empty.

ACL

InstanceEndpoint

string

The instance endpoint.

registry-vpc.cn-hangzhou.aliyuncs.com

InstanceUsername

string

The instance username.

root

InstancePassword

string

The instance password.

***

SourceRabbitMQParameters

object

The `SourceRabbitMQParameters` request parameters.

RegionId

string

The region where the ApsaraMQ for RabbitMQ instance is located.

cn-hangzhou

InstanceId

string

The ID of the ApsaraMQ for RabbitMQ instance. For more information, see Limits.

bastionhost-cn-0ju2x28fj07

VirtualHostName

string

The name of the vhost of the ApsaraMQ for RabbitMQ instance. For more information, see Limits.

eb-connect

QueueName

string

The name of the queue on the ApsaraMQ for RabbitMQ instance. For more information, see Limits.

file-upload-queue

SourceSLSParameters

object

The `SourceSLSParameters` request parameters.

Project

string

The Simple Log Service (SLS) project.

VideoTestProject

LogStore

string

The SLS Logstore.

cloudfirewall-logstore

ConsumePosition

string

The starting consumer offset. You can specify the earliest offset (`begin`), the latest offset (`end`), or a specific time to start consumption (in seconds).

end

RoleName

string

The RAM role that EventBridge assumes to read logs from SLS. When you create this role in the RAM console, select **Alibaba Cloud Service** for the trusted entity and **EventBridge** for the trusted service. For more information about the access policy for this role, see "Custom event source for Simple Log Service".

testRole

SourceHttpEventParameters

object

The `SourceHttpEventParameters` request parameters.

Type

string

The protocol type supported by the generated webhook. Valid values:

  • HTTP

  • HTTPS

  • HTTP&HTTPS

HTTPS

Method

array

The HTTP request methods supported by the generated webhook. You can select multiple methods. Valid values:

  • GET

  • POST

  • PUT

  • PATCH

  • DELETE

  • HEAD

  • OPTIONS

  • TRACE

  • CONNECT

string

The HTTP request method supported by the generated webhook. You can select multiple methods. Valid values:

  • GET

  • POST

  • PUT

  • PATCH

  • DELETE

  • HEAD

  • OPTIONS

  • TRACE

  • CONNECT

GET

SecurityConfig

string

The type of security configuration. Valid values:

  • none: No configuration is required.

  • ip: IP address range.

  • referer: Security domain.

none

Ip

array

The IP address range for security configuration. This parameter is required only when `SecurityConfig` is set to `ip`. You can specify a CIDR block or an IP address.

string

The IP address range for security configuration. This parameter is required only when `SecurityConfig` is set to `ip`. You can specify a CIDR block or an IP address.

8.212.139.16/32

Referer

array

The security domain configuration. This parameter is required only when `SecurityConfig` is set to `referer`. You can specify a domain name.

string

The security domain configuration. This parameter is required only when `SecurityConfig` is set to `referer`. You can specify a domain name.

aliyundoc.com

PublicWebHookUrl

array

The public request URL.

string

The public request URL.

http://***.eventbridge.cn-hangzhou.aliyuncs.com/webhook/putEvents?token=***

VpcWebHookUrl

array

The internal network request URL.

string

The internal network request URL.

http://***.eventbridge.cn-hangzhou-vpc.aliyuncs.com/webhook/putEvents?token=0f6705c9253540e1a53e06db011a25b52068562ca50d4818828fffd61c5af***

SourceKafkaParameters

object

The parameters for the Kafka event source.

InstanceId

string

The instance ID.

i-2ze6kiwzkebf04s5h8ds

ConsumerGroup

string

The ID of the consumer group that subscribes to the topic.

test-gid

Topic

string

The topic name.

topic_api_1674441611897

OffsetReset

string

The consumer offset.

earliest

RegionId

string

The region ID.

cn-hangzhou

MaximumTasks

integer

The concurrent quota (number of consumers).

2

Network

string

The network configuration. Valid values: Default (default network) and PublicNetwork (self-managed network).

Default

SecurityGroupId

string

The security group ID.

sg-f8zatts5g97x0j***

VpcId

string

The VPC ID.

vpc-bp1kz3ohhzgrau2***

VSwitchIds

string

The vSwitch ID.

vsw-bp1hcrxq3mkcik***e

SourceScheduledEventParameters

object

The parameters for the scheduled event source.

Schedule

string

The cron expression.

0 1 * * * *

TimeZone

string

The time zone for cron execution.

GMT+0:00

UserData

string

The JSON string.

{"a": "b"}

SourceOSSEventParameters

object

EventTypes

array

string

StsRoleArn

string

MatchRules

any

Code

string

The API return code.

  • A value of `Success` indicates that the call is successful.

  • Other values indicate an error. For more information about error codes, see Error codes.

Success

Success

boolean

A value of `true` is returned if the operation is successful.

true

Sample responses: `HTTP/1.1 200 OK Server: AliyunEventBridge Connection: keep-alive Content-Type: application/json;charset=utf-8 Content-Length: 79 x-eventbridge-request-id: 608C6467-3195-42A3-97B5-C51FB976**** Date: Sat, 18 Apr 2020 05:30:41 GMT

{ "code":"200", "data":{ "RequestId":"608C6467-3195-42A3-97B5-C51FB976****", "Data":{ "eventSourceList":[ { "Status":"Activated", "Type":"UserDefined", "Ctime":1626360902642, "EventBusName": "demo-bus", "SourceRocketMQParameters":{ "InstanceId":"MQ_INST_164901546557_BXmr", "Tag":"", "RegionId":"cn-hangzhou", "Topic":"demo-topic", "GroupID":"GID_SOURCE", "Offset":"CONSUME_FROM_LAST_OFFSET" }, "ARN":"acs:eventbridge:cn-hangzhou:164901546557****:eventbus/my-event-bus/eventsource/myRocketMQ.source", "Name":"demo.source" } ] }, "Code":"Success", "Success":true }, "httpStatusCode":"200", "requestId":"608C6467-3195-42A3-97B5-C51FB976****", "successResponse":true }`

Examples

Success response

JSON format

{
  "Message": "InvalidArgument",
  "RequestId": "5169654A-7059-57E3-BFD9-33C7E012EA1B",
  "Data": {
    "NextToken": "100",
    "Total": 18,
    "EventSourceList": [
      {
        "Name": "rocketmq.source",
        "Arn": "acs:eventbridge:cn-hangzhou:164901546557****:eventbus/my-event-bus/eventsource/myRocketMQ.source",
        "Status": "Activated",
        "Type": "UserDefined",
        "Ctime": 1607071602000,
        "ExternalSourceType": "RabbitMQ",
        "EventBusName": "test-custom-bus",
        "SourceMNSParameters": {
          "RegionId": "cn-hangzhou",
          "QueueName": "queue.openapi-sign-callback",
          "IsBase64Decode": true
        },
        "SourceRocketMQParameters": {
          "RegionId": "cn-shenzhen",
          "InstanceId": "bastionhost-cn-7mz293s9d1p",
          "Topic": "migration_instance",
          "Tag": "dataact",
          "Offset": "CONSUMEFROMLASTOFFSET",
          "Timestamp": 1664591760,
          "GroupId": "GID-test",
          "InstanceType": "CLOUD_5",
          "InstanceNetwork": "PublicNetwork",
          "InstanceVpcId": "vpc-***",
          "InstanceVSwitchIds": "vsw-bp1iu***",
          "InstanceSecurityGroupId": "eb-167adad548***",
          "AuthType": "ACL",
          "InstanceEndpoint": "registry-vpc.cn-hangzhou.aliyuncs.com",
          "InstanceUsername": "root",
          "InstancePassword": "***"
        },
        "SourceRabbitMQParameters": {
          "RegionId": "cn-hangzhou",
          "InstanceId": "bastionhost-cn-0ju2x28fj07",
          "VirtualHostName": "eb-connect",
          "QueueName": "file-upload-queue"
        },
        "SourceSLSParameters": {
          "Project": "VideoTestProject",
          "LogStore": "cloudfirewall-logstore",
          "ConsumePosition": "end",
          "RoleName": "testRole"
        },
        "SourceHttpEventParameters": {
          "Type": "HTTPS",
          "Method": [
            "GET"
          ],
          "SecurityConfig": "none",
          "Ip": [
            "8.212.139.16/32"
          ],
          "Referer": [
            "aliyundoc.com\t"
          ],
          "PublicWebHookUrl": [
            "http://***.eventbridge.cn-hangzhou.aliyuncs.com/webhook/putEvents?token=***"
          ],
          "VpcWebHookUrl": [
            "http://***.eventbridge.cn-hangzhou-vpc.aliyuncs.com/webhook/putEvents?token=0f6705c9253540e1a53e06db011a25b52068562ca50d4818828fffd61c5af***"
          ]
        },
        "SourceKafkaParameters": {
          "InstanceId": "i-2ze6kiwzkebf04s5h8ds",
          "ConsumerGroup": "test-gid",
          "Topic": "topic_api_1674441611897",
          "OffsetReset": "earliest",
          "RegionId": "cn-hangzhou",
          "MaximumTasks": 2,
          "Network": "Default",
          "SecurityGroupId": "sg-f8zatts5g97x0j***",
          "VpcId": "vpc-bp1kz3ohhzgrau2***",
          "VSwitchIds": "vsw-bp1hcrxq3mkcik***e"
        },
        "SourceScheduledEventParameters": {
          "Schedule": "0 1 * * * *",
          "TimeZone": "GMT+0:00",
          "UserData": "{\"a\": \"b\"}"
        },
        "SourceOSSEventParameters": {
          "EventTypes": [
            ""
          ],
          "StsRoleArn": "",
          "MatchRules": ""
        }
      }
    ]
  },
  "Code": "Success",
  "Success": true
}

Error codes

HTTP status code

Error code

Error message

Description

403 ServiceNotEnable Service not enable

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.