All Products
Search
Document Center

EventBridge:DiscoverEventSource

Last Updated:Dec 19, 2025

Discovers the schema and simple data of an event source, such as MySQL.

Operation description

Discovers information about an event source.

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

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

SourceMySQLParameters

object

No

The MySQL source parameters.

RegionId

string

No

The region ID.

cn-hangzhou

HostName

string

No

The database endpoint.

rm-xxx.mysql.rds.aliyuncs.com

Port

integer

No

The connection port of the database.

80

DatabaseName

string

No

The database name.

database1

TableName

string

No

The name of the database table. The database name must be added as a prefix in the ${DatabaseName}.${TableName} format.

database1.table1

User

string

No

The database username.

user1

Password

string

No

The database password.

1234xxx

NetworkType

string

No

The network type.

Valid values:

  • PrivateNetwork :

    PrivateNetwork

  • PublicNetwork :

    PublicNetwork

PrivateNetwork

VpcId

string

No

The ID of the Virtual Private Cloud (VPC).

vpc-uf6hwiei8u5uil3bfahc1

VSwitchIds

string

No

The vSwitch ID.

vsw-gw824tpaptxtlo256lqub

SecurityGroupId

string

No

The security group ID.

sg-bp1ic0vsbwyv176e9inx

Offset

string

No

The offset for paging the query results.

30

Limit

string

No

The maximum number of entries to return on each page.

20

Response elements

Element

Type

Description

Example

object

Code

string

The return code.

A value of 200 indicates success.

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

Success

Data

object

The returned data.

SourceMySQLDiscovery

object

The discovery results for the MySQL source.

DatabaseNames

array

The database names, in JSON array format.

string

The database name.

database1

TableNames

array

The database table names.

string

The database table name.

ai_festival_gift_ranking

TableSchema

object

The table properties.

TableName

string

The table name.

map

Columns

array<object>

The column information.

object

A column.

Field

string

The column name.

id

IsNull

string

Indicates whether the column can be empty. The return values are as follows:

  • YES: The column can be empty.

  • NO: The column cannot be empty.

NO

Extra

string

An auxiliary parameter.

auto_increment

Type

string

The property type.

int

Key

string

The primary key type.

PRI

SimpleData

string

Sample table content.

[{\"is_active\":\"1\",\"name\":\"0c0c5d1a-e844-44a8-902d-4f62cbcb0479\",\"id\":\"21\"},{\"is_active\":\"1\",\"name\":\"18ef033e-70bb-4795-8222-6cfb54f38f26\",\"id\":\"22\"}]

ExpireLogsDays

integer

The number of days before binary logs (binlogs) expire. Unit: days.

WaitTimeout

integer

The maximum idle time for a non-interactive connection. Unit: seconds.

EstimatedRows

integer

The estimated number of rows. Unit: rows.

Message

string

The error message.

success

RequestId

string

The unique ID generated by Alibaba Cloud for the request.

C7043799-F4DA-5290-9249-97C35987****

Success

boolean

Indicates whether the operation was successful. A `true` value means the operation succeeded.

true

Examples

Success response

JSON format

{
  "Code": "Success",
  "Data": {
    "SourceMySQLDiscovery": {
      "DatabaseNames": [
        "database1"
      ],
      "TableNames": [
        "ai_festival_gift_ranking"
      ],
      "TableSchema": {
        "TableName": "map",
        "Columns": [
          {
            "Field": "id",
            "IsNull": "NO",
            "Extra": "auto_increment",
            "Type": "int",
            "Key": "PRI"
          }
        ]
      },
      "SimpleData": "[{\\\"is_active\\\":\\\"1\\\",\\\"name\\\":\\\"0c0c5d1a-e844-44a8-902d-4f62cbcb0479\\\",\\\"id\\\":\\\"21\\\"},{\\\"is_active\\\":\\\"1\\\",\\\"name\\\":\\\"18ef033e-70bb-4795-8222-6cfb54f38f26\\\",\\\"id\\\":\\\"22\\\"}]",
      "ExpireLogsDays": 0,
      "WaitTimeout": 0,
      "EstimatedRows": 0
    }
  },
  "Message": "success",
  "RequestId": "C7043799-F4DA-5290-9249-97C35987****",
  "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.