All Products
Search
Document Center

EventBridge:ListUserDefinedEventSources

Last Updated:Jan 30, 2024

Queries all custom event sources.

Operation description

You can call this API operation to query custom event sources.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
NamePrefixstringNo

The name of the event source.

testName
EventBusNamestringNo

The name of the event bus.

testBus
LimitintegerNo

The maximum number of entries to be returned in a call. You can use this parameter and NextToken to implement paging. Note: Up to 100 entries can be returned in a call.

50
NextTokenstringNo

If you configure Limit and excess return values exist, this parameter is returned.

100

Response parameters

ParameterTypeDescriptionExample
object
Messagestring

The returned error message.

InvalidArgument
RequestIdstring

The request ID.

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

The returned data.

EventSourceListobject []

The event sources.

Namestring

The name of the queried event source.

rocketmq.source
Arnstring

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

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

The status of the queried event source. The returned value Activated indicates that the event source is activated.

Activated
Typestring

The type of the queried event source. The returned value UserDefined indicates that the event source is a custom event source.

UserDefined
Ctimefloat

The timestamp that indicates when the event source was created.

1607071602000
ExternalSourceTypestring

The type of the event source.

RabbitMQ
EventBusNamestring

The name of the event bus.

test-custom-bus
SourceMNSParametersobject

The parameters that are returned if Message Service (MNS) is specified as the event source.

RegionIdstring

The ID of the region where the MNS queue resides.

cn-hangzhou
QueueNamestring

The name of the MNS queue.

queue.openapi-sign-callback
IsBase64Decodeboolean

Indicates whether Base64 decoding is enabled. By default, Base64 decoding is enabled.

true
SourceRocketMQParametersobject

The parameters that are returned if Message Queue for Apache RocketMQ is specified as the event source.

RegionIdstring

The ID of the region where the Message Queue for Apache RocketMQ instance resides.

cn-shenzhen
InstanceIdstring

The ID of the Message Queue for Apache RocketMQ instance. For more information, see Limits .

bastionhost-cn-7mz293s9d1p
Topicstring

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

migration_instance
Tagstring

The tag that is used to filter messages.

dataact
Offsetstring

The offset from which messages are consumed. Valid values:

  • CONSUME_FROM_LAST_OFFSET: Messages are consumed from the latest offset.
  • CONSUME_FROM_FIRST_OFFSET: Messages are consumed from the earliest offset.
  • CONSUME_FROM_TIMESTAMP: Messages are consumed from the offset at the specified point in time.

Default value: CONSUME_FROM_LAST_OFFSET.

CONSUMEFROMLASTOFFSET
Timestampfloat

The timestamp that indicates the time from which messages are consumed. This parameter is valid only if Offset is set to CONSUME_FROM_TIMESTAMP.

1664591760
GroupIdstring

The ID of the consumer group on the Message Queue for Apache RocketMQ instance.

GID-test
InstanceTypestring

The instance type. Valid values: CLOUD_4, CLOUD_5, and SELF_BUILT. The value CLOUD_4 indicates that the instance is a Message Queue for Apache RocketMQ 4.0 instance. The value CLOUD_5 indicates that the instance is a Message Queue for Apache RocketMQ 5.0 instance. The value SELF_BUILT indicates that the instance is a self-managed RocketMQ instance.

CLOUD_5
InstanceNetworkstring

The type of network over which the Message Queue for Apache RocketMQ instance is accessed.

PublicNetwork
InstanceVpcIdstring

The ID of the virtual private cloud (VPC) in which the Message Queue for Apache RocketMQ instance is deployed.

vpc-***
InstanceVSwitchIdsstring

The ID of the vSwitch with which the Message Queue for Apache RocketMQ instance is associated.

vsw-bp1iu***
InstanceSecurityGroupIdstring

The ID of the security group to which the Message Queue for Apache RocketMQ instance belongs.

eb-167adad548***
AuthTypestring

The authentication type. This parameter can be set to ACL or left empty.

ACL
InstanceEndpointstring

The endpoint that is used to access the Message Queue for Apache RocketMQ instance.

registry-vpc.cn-hangzhou.aliyuncs.com
InstanceUsernamestring

The username that is used to access the Message Queue for Apache RocketMQ instance.

root
InstancePasswordstring

The password that is used to access the Message Queue for Apache RocketMQ instance.

***
SourceRabbitMQParametersobject

The parameters that are returned if Message Queue for RabbitMQ is specified as the event source.

RegionIdstring

The ID of the region where the Message Queue for RabbitMQ instance resides.

cn-hangzhou
InstanceIdstring

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

bastionhost-cn-0ju2x28fj07
VirtualHostNamestring

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

eb-connect
QueueNamestring

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

file-upload-queue
SourceSLSParametersobject

The parameters that are returned if Simple Log Service is specified as the event source.

Projectstring

The Simple Log Service project.

VideoTestProject
LogStorestring

The Simple Log Service Logstore.

cloudfirewall-logstore
ConsumePositionstring

The consumer offset. The value begin indicates the earliest offset, and the value end indicates the latest offset. You can also specify a time in seconds to start consumption.

end
RoleNamestring

The role name. If you want to authorize EventBridge to use this role to read logs in Simple Log Service, you must select Alibaba Cloud Service for Selected Trusted Entity and EventBridge for Select Trusted Service when you create the role in the Resource Access Management (RAM) console. For information about the permission policy of this role, see Create a custom event source of the Log Service type.

testRole
SourceHttpEventParametersobject

The parameters that are returned if HTTP events are specified as the event source.

Typestring

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

  • HTTP
  • HTTPS
  • HTTP&HTTPS
HTTPS
Methodarray

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

  • GET
  • POST
  • PUT
  • PATCH
  • DELETE
  • HEAD
  • OPTIONS
  • TRACE
  • CONNECT
string

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

  • GET
  • POST
  • PUT
  • PATCH
  • DELETE
  • HEAD
  • OPTIONS
  • TRACE
  • CONNECT
GET
SecurityConfigstring

The type of security settings. Valid values:

  • none: No configuration is required.
  • ip: CIDR block.
  • referer: security domain name.
none
Iparray

The CIDR block that is used for security settings. This parameter is required only if SecurityConfig is set to ip. You can enter a CIDR block or an IP address.

string

The CIDR block that is used for security settings. This parameter is required only if SecurityConfig is set to ip. You can enter a CIDR block or an IP address.

8.212.139.16/32
Refererarray

The security domain name. This parameter is required only if SecurityConfig is set to referer. You can enter a domain name.

string

The security domain name. This parameter is required only if SecurityConfig is set to referer. You can enter a domain name.

aliyundoc.com
PublicWebHookUrlarray

The Internet request URL.

string

The Internet request URL.

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

The internal request URL.

string

The internal request URL.

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

The parameters that are returned if Message Queue for Apache Kafka is specified as the event source.

InstanceIdstring

The ID of the Message Queue for Apache Kafka instance.

i-2ze6kiwzkebf04s5h8ds
ConsumerGroupstring

The ID of the consumer group that subscribes to the topic on the Message Queue for Apache Kafka instance.

test-gid
Topicstring

The topic name.

topic_api_1674441611897
OffsetResetstring

The consumer offset.

earliest
RegionIdstring

The ID of the region where the Message Queue for Apache Kafka instance resides.

cn-hangzhou
MaximumTasksinteger

The maximum number of consumers.

2
Networkstring

The network type. Valid values: Default and PublicNetwork. Default value: Default. The value PublicNetwork indicates a self-managed network.

Default
SecurityGroupIdstring

The ID of the security group to which the Message Queue for Apache Kafka instance belongs.

sg-f8zatts5g97x0j***
VpcIdstring

The ID of the VPC in which the Message Queue for Apache Kafka instance is deployed.

vpc-bp1kz3ohhzgrau2***
VSwitchIdsstring

The ID of the vSwitch with which the Message Queue for Apache Kafka instance is associated.

vsw-bp1hcrxq3mkcik***e
SourceScheduledEventParametersobject

The parameters that are returned if scheduled events are specified as the event source.

Schedulestring

The cron expression.

0 1 * * * *
TimeZonestring

The time zone in which the cron expression is executed.

GMT+0:00
UserDatastring

The JSON string.

{"a": "b"}
Codestring

The returned response code. Valid values:

  • Success: The request is successful.
  • Other codes: The request failed. For more information about error codes, see Error codes.
Success
Successboolean

Indicates whether the operation is successful. The value true indicates that 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

Sample success responses

JSONformat

{
  "Message": "InvalidArgument",
  "RequestId": "5169654A-7059-57E3-BFD9-33C7E012EA1B",
  "Data": {
    "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\"}"
        }
      }
    ]
  },
  "Code": "Success",
  "Success": true
}

Error codes

HTTP status codeError codeError message
403ServiceNotEnableService not enable

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-10-19The Error code has changed. The response structure of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 403
Output ParametersThe response structure of the API has changed.
2023-08-01The Error code has changed. The response structure of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 403
Output ParametersThe response structure of the API has changed.
2023-08-01The Error code has changed. The response structure of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 403
Output ParametersThe response structure of the API has changed.
2023-07-04The Error code has changed. The request parameters of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 403
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: NamePrefix
    Added Input Parameters: EventBusName
    Added Input Parameters: Limit
    Added Input Parameters: NextToken
2023-04-21The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 403