All Products
Search
Document Center

EventBridge:ListUserDefinedEventSources

Last Updated:Jun 11, 2026

Mengkueri semua sumber event kustom.

Deskripsi operasi

Queries all custom event sources.

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tabel berikut menjelaskan otorisasi yang diperlukan untuk memanggil API ini. Anda dapat menentukannya dalam kebijakan Resource Access Management (RAM). Kolom pada tabel dijelaskan sebagai berikut:

  • Action: Aksi yang dapat digunakan dalam elemen Action pada pernyataan kebijakan izin RAM untuk memberikan izin guna melakukan operasi tersebut.

  • API: API yang dapat Anda panggil untuk melakukan aksi tersebut.

  • Access level: Tingkat akses yang telah ditentukan untuk setiap API. Nilai yang valid: create, list, get, update, dan delete.

  • Resource type: Jenis resource yang mendukung otorisasi untuk melakukan aksi tersebut. Ini menunjukkan apakah aksi tersebut mendukung izin tingkat resource. Resource yang ditentukan harus kompatibel dengan aksi tersebut. Jika tidak, kebijakan tersebut tidak akan berlaku.

    • Untuk API dengan izin tingkat resource, jenis resource yang diperlukan ditandai dengan tanda bintang (*). Tentukan Nama Sumber Daya Alibaba Cloud (ARN) yang sesuai dalam elemen Resource pada kebijakan.

    • Untuk API tanpa izin tingkat resource, ditampilkan sebagai All Resources. Gunakan tanda bintang (*) dalam elemen Resource pada kebijakan.

  • Condition key: Kunci kondisi yang didefinisikan oleh layanan. Kunci ini memungkinkan kontrol granular, berlaku baik hanya untuk aksi maupun untuk aksi yang terkait dengan resource tertentu. Selain kunci kondisi spesifik layanan, Alibaba Cloud menyediakan serangkaian common condition keys yang berlaku di semua layanan yang didukung RAM.

  • Dependent action: Aksi dependen yang diperlukan untuk menjalankan aksi tersebut. Untuk menyelesaikan aksi tersebut, pengguna RAM atau role RAM harus memiliki izin untuk melakukan semua aksi dependen.

Action

Access level

Resource type

Condition key

Dependent action

eventbridge:ListUserDefinedEventSources

get

*EventSource

acs:eventbridge:{#regionId}:{#accountId}:eventbus/{#EventBusName}/eventsource/*

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

NamePrefix

string

No

Awalan nama sumber event.

testName

EventBusName

string

No

Nama EventBridge.

testBus

Limit

integer

No

Jumlah maksimum entri yang dikembalikan per permintaan. Anda dapat menggunakan parameter ini dengan NextToken untuk paginasi. Nilai maksimum adalah 100.

50

NextToken

string

No

Token yang digunakan untuk mengambil halaman hasil berikutnya. Atur parameter ini ke nilai NextToken yang dikembalikan dari panggilan sebelumnya.

100

Elemen respons

Element

Type

Description

Example

object

Message

string

The error message.

InvalidArgument

RequestId

string

The unique ID of the request, generated by Alibaba Cloud.

5169654A-7059-57E3-BFD9-33C7E012****

Data

object

The returned data.

NextToken

string

The token to retrieve the next page of results. This parameter is returned only when the results are truncated.

100

Total

integer

The total number of entries.

18

EventSourceList

array<object>

The list of event sources.

array<object>

The details of an 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 response code:

  • Success: The call was successful.

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

Success

Success

boolean

Indicates whether the request was successful. A value of true indicates success.

true

Contoh tanggapan: 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 }

Contoh

Respons sukses

JSONformat

{
  "Message": "InvalidArgument",
  "RequestId": "5169654A-7059-57E3-BFD9-33C7E012****",
  "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
}

Kode kesalahan

HTTP status code

Error code

Error message

Description

403 ServiceNotEnable Service not enable

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.