ListUserDefinedEventSources
This operation queries all custom event sources.
Operation description
Queries all custom 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 for pagination. The maximum value is 100. |
50 |
| NextToken |
string |
No |
The token used to retrieve the next page of results. Set this parameter to the NextToken value returned from a previous call. |
100 |
Response elements
|
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 event source. |
rocketmq.source |
| Arn |
string |
The Alibaba Cloud Resource Name (ARN) of the event source. |
acs:eventbridge:cn-hangzhou:164901546557****:eventbus/my-event-bus/eventsource/myRocketMQ.source |
| Status |
string |
The status of the event source. Valid value: |
Activated |
| Type |
string |
The type of the event source. The value |
UserDefined |
| Ctime |
number |
The time when the event source was created. |
1607071602000 |
| ExternalSourceType |
string |
The type of the event provider. |
RabbitMQ |
| EventBusName |
string |
The name of the event bus. |
test-custom-bus |
| SourceMNSParameters |
object |
The parameters for the Message Service (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 |
Specifies whether to enable Base64 decoding. The default value is |
true |
| SourceRocketMQParameters |
object |
The parameters for the ApsaraMQ for RocketMQ event source. |
|
| 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 used to filter messages. |
dataact |
| Offset |
string |
The consumer offset. Valid values:
The default value is |
CONSUMEFROMLASTOFFSET |
| Timestamp |
number |
The timestamp, in seconds. This parameter is required only when the |
1664591760 |
| GroupId |
string |
The group ID of the ApsaraMQ for RocketMQ instance. |
GID-test |
| InstanceType |
string |
The instance type. You can set this parameter only to |
CLOUD_5 |
| InstanceNetwork |
string |
The instance network. |
PublicNetwork |
| InstanceVpcId |
string |
The ID of the Virtual Private Cloud (VPC). |
vpc-*** |
| InstanceVSwitchIds |
string |
The vSwitch IDs. |
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 instance endpoint. |
registry-vpc.cn-hangzhou.aliyuncs.com |
| InstanceUsername |
string |
The instance username. |
root |
| InstancePassword |
string |
The instance password. |
*** |
| SourceRabbitMQParameters |
object |
The parameters for the ApsaraMQ for RabbitMQ event source. |
|
| 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 virtual host 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 parameters for the Log Service (SLS) event source. |
|
| Project |
string |
The Log Service (SLS) Project. |
VideoTestProject |
| LogStore |
string |
The Log Service (SLS) Logstore. |
cloudfirewall-logstore |
| ConsumePosition |
string |
The starting consumer offset. You can specify |
end |
| RoleName |
string |
The name of the RAM role that EventBridge assumes to read logs from Log Service (SLS). When you create this role in the RAM console, select Alibaba Cloud Service as the trusted entity and EventBridge as the trusted service. For more information about the access policy for this role, see Custom event source for Log Service (SLS). |
testRole |
| SourceHttpEventParameters |
object |
The parameters for the webhook event source. |
|
| Type |
string |
The protocol type supported by the webhook. Valid values:
|
HTTPS |
| Method |
array |
The HTTP request methods supported by the webhook. You can select one or more methods. Valid values:
|
|
|
string |
An HTTP request method.
|
GET |
|
| SecurityConfig |
string |
The type of security configuration. Valid values:
|
none |
| Ip |
array |
The IP address range for security configuration. This parameter is required only when |
|
|
string |
A CIDR block or an IP address. This parameter is required only when |
8.212.139.16/32 |
|
| Referer |
array |
The security domain settings. This parameter is required only when |
|
|
string |
A security domain. This parameter is required only when |
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 ID of the Kafka instance. |
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 position from which to start consumption if no offset is stored. For example, |
earliest |
| RegionId |
string |
The region ID. |
cn-hangzhou |
| MaximumTasks |
integer |
The concurrent quota (number of consumers). |
2 |
| Network |
string |
The network type. Valid values: |
Default |
| SecurityGroupId |
string |
The security group ID. |
sg-f8zatts5g97x0j*** |
| VpcId |
string |
The VPC ID. |
vpc-bp1kz3ohhzgrau2*** |
| VSwitchIds |
string |
The vSwitch IDs. |
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 the cron expression. |
GMT+0:00 |
| UserData |
string |
A JSON string. |
{"a": "b"} |
| SourceOSSEventParameters |
object |
The parameters for the Object Storage Service (OSS) event source. |
|
| EventTypes |
array |
The list of event types. |
|
|
string |
The event type. |
||
| StsRoleArn |
string |
The ARN of the Security Token Service (STS) role. |
|
| MatchRules |
any |
The matching rules. |
|
| Code |
string |
The response code:
|
Success |
| Success |
boolean |
Indicates whether the request was successful. A value of |
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": "***"
},
"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.