全部產品
Search
文件中心

EventBridge:DiscoverEventSource - 探測事件來源

更新時間:Dec 18, 2025

發現EventSource(例如:Mysql)的Schema和SimpleData

介面說明

探測事件來源資訊。

調試

您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。

調試

授權資訊

當前API暫無授權資訊透出。

請求參數

名稱

類型

必填

描述

樣本值

SourceMySQLParameters

object

MySQL 源參數

RegionId

string

地區 id。

cn-hangzhou

HostName

string

資料庫連接地址

rm-xxx.mysql.rds.aliyuncs.com

Port

integer

資料庫的串連連接埠。

80

DatabaseName

string

資料庫名稱

database1

TableName

string

資料庫表名,需要添加資料庫名首碼。${DatabaseName}.${TableName}

database1.table1

User

string

資料庫使用者名稱

user1

Password

string

資料庫密碼

1234xxx

NetworkType

string

網路類型。

枚舉值:

  • PrivateNetwork :

    PrivateNetwork

  • PublicNetwork :

    PublicNetwork

PrivateNetwork

VpcId

string

Virtual Private Cloud 的 ID。

vpc-uf6hwiei8u5uil3bfahc1

VSwitchIds

string

交換器 ID。

vsw-gw824tpaptxtlo256lqub

SecurityGroupId

string

安全性群組 ID。

sg-bp1ic0vsbwyv176e9inx

Offset

string

查詢結果分頁幀的位移量。

30

Limit

string

限定每次返回的最大條數。

20

返回參數

名稱

類型

描述

樣本值

object

Code

string

介面返回碼:

200:表示成功。

其它:表示錯誤碼。錯誤碼詳情,請參見錯誤碼。

Success

Data

object

返回結果。

SourceMySQLDiscovery

object

MySQL 源探測結果

DatabaseNames

array

資料庫名稱,格式為 JSON 數組。

string

資料庫名稱

database1

TableNames

array

資料庫表名

string

資料庫表名

ai_festival_gift_ranking

TableSchema

object

表格屬性。

TableName

string

表名。

map

Columns

array<object>

列資訊。

object

列。

Field

string

列名。

id

IsNull

string

是否允許空值,傳回值如下:

  • YES:允許為空白。

  • NO:不允許為空白。

NO

Extra

string

備用參數。

auto_increment

Type

string

屬性類型

int

Key

string

主鍵類型。

PRI

SimpleData

string

表格內容樣本

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

ExpireLogsDays

integer

binlog 到期天數,單位:天

WaitTimeout

integer

非互動式串連的最大空閑時間,單位:秒

EstimatedRows

integer

預估行數,單位:行

Message

string

錯誤資訊。

success

RequestId

string

阿里雲為該請求產生的唯一識別碼。

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

Success

boolean

操作成功返回 true。

true

樣本

正常返回樣本

JSON格式

{
  "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
}

錯誤碼

HTTP status code

錯誤碼

錯誤資訊

描述

403 ServiceNotEnable Service not enable

訪問錯誤中心查看更多錯誤碼。

變更歷史

更多資訊,參考變更詳情