Queries all external event sources.
Operation description
Queries all external event sources.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
eventbridge:ListUserDefinedEventSources |
get |
*EventSource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| NamePrefix |
string |
No |
The prefix of the event source name. |
testName |
| EventBusName |
string |
No |
The name of the event bus. |
testBus |
| Limit |
integer |
No |
The maximum number of entries to return per request. You can use this parameter with NextToken to paginate results. The maximum value is 100. |
50 |
| NextToken |
string |
No |
The token returned when Limit is specified and additional results are available. |
100 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Message |
string |
The error message. |
InvalidArgument |
| RequestId |
string |
The unique identifier generated by Alibaba Cloud for the request. |
5169654A-7059-57E3-BFD9-33C7E012**** |
| Data |
object |
The returned data. |
|
| NextToken |
string |
The next token returned when the Limit parameter is specified and more results are available. |
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 values:
|
Activated |
| Type |
string |
The type of the queried event source. Valid values:
|
UserDefined |
| Ctime |
number |
The creation timestamp. |
1607071602000 |
| ExternalSourceType |
string |
The type of the external event source. |
RabbitMQ |
| EventBusName |
string |
The name of the event bus. |
test-custom-bus |
| SourceMNSParameters |
object |
The Simple Message Queue (formerly MNS) event source parameters. |
|
| RegionId |
string |
The region where the queue of Simple Message Queue (formerly MNS) resides. |
cn-hangzhou |
| QueueName |
string |
The name of the queue in Simple Message Queue (formerly MNS). |
queue.openapi-sign-callback |
| IsBase64Decode |
boolean |
Specifies whether to enable Base64 decoding. Default value: true. |
true |
| SourceRocketMQParameters |
object |
The request parameter SourceRocketMQParameters. |
|
| RegionId |
string |
The region where the ApsaraMQ for RocketMQ instance resides. |
cn-shenzhen |
| InstanceId |
string |
The instance ID of the ApsaraMQ for RocketMQ instance. For more information, see Limits. |
bastionhost-cn-7mz293s9d1p |
| Topic |
string |
The topic name of the ApsaraMQ for RocketMQ instance. For more information, see Limits. |
migration_instance |
| Tag |
string |
The filter tag of the message. |
dataact |
| Offset |
string |
The consumption offset of the message. Valid values:
|
CONSUMEFROMLASTOFFSET |
| Timestamp |
number |
The timestamp. This parameter is valid only when the Offset parameter is set to CONSUME_FROM_TIMESTAMP. |
1664591760 |
| GroupId |
string |
The group ID of ApsaraMQ for RocketMQ. |
GID-test |
| InstanceType |
string |
The instance type. Valid values: CLOUD_4 (cloud-based 4.0 instance), CLOUD_5 (cloud-based 5.0 instance), and SELF_BUILT (self-managed MQ). |
CLOUD_5 |
| InstanceNetwork |
string |
The network type of the instance. |
PublicNetwork |
| InstanceVpcId |
string |
The ID of the virtual private cloud (VPC). |
vpc-*** |
| InstanceVSwitchIds |
string |
The vSwitch ID. |
vsw-bp1iu*** |
| InstanceSecurityGroupId |
string |
The security group ID. |
eb-167adad548*** |
| AuthType |
string |
The authentication type. You can set this parameter to ACL or leave it empty. |
ACL |
| InstanceEndpoint |
string |
The endpoint of the instance. |
registry-vpc.cn-hangzhou.aliyuncs.com |
| InstanceUsername |
string |
The username of the instance. |
root |
| InstancePassword |
string |
The password of the instance. |
yourPassword |
| SourceRabbitMQParameters |
object |
The request parameter SourceRabbitMQParameters. |
|
| RegionId |
string |
The region where the ApsaraMQ for RabbitMQ instance resides. |
cn-hangzhou |
| InstanceId |
string |
The instance ID of the ApsaraMQ for RabbitMQ instance. For more information, see Limits. |
bastionhost-cn-0ju2x28fj07 |
| VirtualHostName |
string |
The vhost name of the ApsaraMQ for RabbitMQ instance. For more information, see Limits. |
eb-connect |
| QueueName |
string |
The queue name of the ApsaraMQ for RabbitMQ instance. For more information, see Limits. |
file-upload-queue |
| SourceSLSParameters |
object |
The request parameter SourceSLSParameters. |
|
| Project |
string |
The Simple Log Service project. |
VideoTestProject |
| LogStore |
string |
The Simple Log Service Logstore. |
cloudfirewall-logstore |
| ConsumePosition |
string |
The starting consumption offset. You can select the earliest or latest offset, which corresponds to "begin" or "end". You can also start consumption from a specified point in time in seconds. |
end |
| RoleName |
string |
The role name. To grant authorization for the event bus EventBridge to use this role to read Simple Log Service logs, the following conditions must be met: When creating the role for the service in the Resource Access Management (RAM) console, you must select Alibaba Cloud Service and set the trusted service to the event bus. For the access policy of this role, refer to Custom event source: Simple Log Service. |
testRole |
| SourceHttpEventParameters |
object |
The request parameter SourceHttpEventParameters. |
|
| Type |
string |
The protocol type supported by the generated webhook. Valid values:
|
HTTPS |
| Method |
array |
The HTTP request methods supported by the generated webhook. You can select multiple values. Valid values:
|
|
|
string |
The HTTP request methods supported by the generated webhook. You can select multiple values. Valid values:
|
GET |
|
| SecurityConfig |
string |
The type of the security configuration. Valid values:
|
none |
| Ip |
array |
The CIDR block security configuration. This parameter is required only when the SecurityConfig parameter is set to ip. You can enter a CIDR block or an IP address. |
|
|
string |
The CIDR block security configuration. This parameter is required only when the SecurityConfig parameter is set to ip. You can enter a CIDR block or an IP address. |
8.212.139.16/32 |
|
| Referer |
array |
The secure domain name configuration. This parameter is required only when the SecurityConfig parameter is set to referer. You can enter a domain name. |
|
|
string |
The secure domain name configuration. This parameter is required only when the SecurityConfig parameter is set to referer. You can enter a domain name. |
aliyundoc.com |
|
| PublicWebHookUrl |
array |
The public network request URL. |
|
|
string |
The public network 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 ApsaraMQ for Kafka event source parameters. |
|
| InstanceId |
string |
The instance ID. |
i-2ze6kiwzkebf04s5h8ds |
| ConsumerGroup |
string |
The group ID of the consumer that subscribes to the topic. |
test-gid |
| Topic |
string |
The topic name. |
topic_api_1674441611897 |
| OffsetReset |
string |
The consumption offset. |
earliest |
| RegionId |
string |
The region ID. |
cn-hangzhou |
| MaximumTasks |
integer |
The concurrency 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 scheduled event source parameters. |
|
| 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 |
The OSS event source parameters. |
|
| EventTypes |
array |
The list of event types. |
|
|
string |
The event type. |
ObjectCreated:PutObject |
|
| StsRoleArn |
string |
The ARN of the STS role. |
acs:eventbridge:cn-hangzhou:** |
| MatchRules |
any |
The matching rules. |
Event rules (if any) |
| Code |
string |
The return code of the API operation.
|
Success |
| Success |
boolean |
Returns true if the operation is successful. |
true |
Sample response: `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-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": "yourPassword"
},
"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": [
"ObjectCreated:PutObject 等"
],
"StsRoleArn": "acs:eventbridge:cn-hangzhou:**",
"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.