調用ListTables擷取一個庫下面的表詳情列表。
介面說明
僅管控模式為安全協同的資料庫執行個體可調用此 API。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
dms:ListTables |
list |
*全部資源
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| Tid |
integer |
否 |
租戶 ID,可通過調用介面 GetUserActiveTenant 或 ListUserTenants 擷取該參數的值。 |
3*** |
| DatabaseId |
string |
是 |
物理庫 ID,可通過調用介面 ListDatabases 或 SearchDatabase 擷取該參數的值。 |
1860**** |
| PageNumber |
integer |
否 |
第幾頁。 |
1 |
| PageSize |
integer |
否 |
每頁資料量。 |
10 |
| SearchName |
string |
否 |
表搜尋名,支援模糊搜尋。 |
test |
| ReturnGuid |
boolean |
否 |
是否返回表的唯一識別碼 GUID(Globally Unique Identifier),取值如下:
|
true |
| RealLoginUserUid |
string |
否 |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
|||
| TotalCount |
integer |
滿足條件的表總個數。 |
1 |
| RequestId |
string |
請求 ID。 |
B16FB618-5E96-4FFD-BB0D-490C890A4030 |
| ErrorCode |
string |
錯誤碼。 |
UnknownError |
| TableList |
object |
||
| Table |
array<object> |
表詳情列表。 |
|
|
array<object> |
|||
| DatabaseId |
string |
物理庫 ID。 |
1860**** |
| TableName |
string |
表名。 |
consumption_records |
| StoreCapacity |
integer |
表佔用儲存空間容量(統計值,非精確容量),單位為 MB。 |
1024 |
| OwnerIdList |
object |
||
| OwnerIds |
array |
表 Owner 的使用者識別碼 列表。 |
|
|
string |
表 Owner 的使用者識別碼。 |
51**** |
|
| Description |
string |
表描述資訊。 |
test |
| Encoding |
string |
表編碼。 |
utf8 |
| OwnerNameList |
object |
||
| OwnerNames |
array |
表 Owner 的使用者暱稱列表。 |
|
|
string |
表 Owner 的使用者暱稱。 |
owner_name |
|
| TableSchemaName |
string |
表所在的資料庫。 |
qntest |
| TableType |
string |
表類型,預設為 NORMAL。 |
NORMAL |
| TableGuid |
string |
表在 DMS 中的唯一識別碼 GUID(Globally Unique Identifier)。 |
IDB_44743****.qntest.consumption_records |
| Engine |
string |
表引擎。 |
InnoDB |
| NumRows |
integer |
錶行數(統計值,非精確行數)。 |
10085 |
| TableId |
string |
表 ID。 |
44743**** |
| ErrorMessage |
string |
錯誤資訊。 |
UnknownError |
| Success |
boolean |
請求是否成功,傳回值如下:
|
true |
樣本
正常返回樣本
JSON格式
{
"TotalCount": 1,
"RequestId": "B16FB618-5E96-4FFD-BB0D-490C890A4030",
"ErrorCode": "UnknownError",
"TableList": {
"Table": [
{
"DatabaseId": "1860****",
"TableName": "consumption_records",
"StoreCapacity": 1024,
"OwnerIdList": {
"OwnerIds": [
"51****"
]
},
"Description": "test",
"Encoding": "utf8",
"OwnerNameList": {
"OwnerNames": [
"owner_name"
]
},
"TableSchemaName": "qntest",
"TableType": "NORMAL",
"TableGuid": "IDB_44743****.qntest.consumption_records",
"Engine": "InnoDB",
"NumRows": 10085,
"TableId": "44743****"
}
]
},
"ErrorMessage": "UnknownError",
"Success": true
}
錯誤碼
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。