ListUserDefinedEventSources

Updated at:
Copy as MD

This operation queries all custom event sources.

Operation description

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

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

eventbridge:ListUserDefinedEventSources

get

*EventSource

acs:eventbridge:{#regionId}:{#accountId}:eventbus/{#EventBusName}/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.

Activated

Type

string

The type of the event source. The value UserDefined indicates a custom event source.

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.

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:

  • 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.

The default value is CONSUME_FROM_LAST_OFFSET.

CONSUMEFROMLASTOFFSET

Timestamp

number

The timestamp, in seconds. This parameter is required only when the Offset parameter 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. You can set this parameter only to CLOUD_4 (ApsaraMQ for RocketMQ 4.0 instance), CLOUD_5 (ApsaraMQ for RocketMQ 5.0 instance), or SELF_BUILT (self-managed MQ instance).

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 begin for the earliest offset, end for the latest offset, or a specific timestamp in seconds to start consumption.

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:

  • HTTP

  • HTTPS

  • HTTP&HTTPS

HTTPS

Method

array

The HTTP request methods supported by the webhook. You can select one or more methods. Valid values:

  • GET

  • POST

  • PUT

  • PATCH

  • DELETE

  • HEAD

  • OPTIONS

  • TRACE

  • CONNECT

string

An HTTP request method.

  • 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

A CIDR block or an IP address. This parameter is required only when SecurityConfig is set to ip.

8.212.139.16/32

Referer

array

The security domain settings. This parameter is required only when SecurityConfig is set to referer. You can specify one or more domain names.

string

A security domain. This parameter is required only when SecurityConfig is set to referer.

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.

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 (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 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: 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

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.