GetTableDDL - 查询建表语句
查询建表语句。
接口说明
地域的公网接入地址:
adb.<region-id>.aliyuncs.com。示例:adb.cn-hangzhou.aliyuncs.com。地域的 VPC 接入地址:
adb-vpc.<region-id>.aliyuncs.com。示例:adb-vpc.cn-hangzhou.aliyuncs.com。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| SchemaName |
string |
否 |
数据库名称。 |
adb_demo |
| TableName |
string |
否 |
表名。 |
test |
| DBClusterId |
string |
是 |
集群 ID。 |
am-bp1ub9grke1**** |
| RegionId |
string |
是 |
地域 ID。 |
cn-hangzhou |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
返回结果。 |
||
| RequestId |
string |
请求 ID。 |
863D51B7-5321-41D8-A0B6-A088B0****** |
| SQL |
string |
SQL 语句。 |
create table ( id varchar(32) ); |
示例
正常返回示例
JSON格式
{
"RequestId": "863D51B7-5321-41D8-A0B6-A088B0******",
"SQL": "create table (\n id varchar(32)\n);"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | MDS.IllegalArgument | Invalid argument. | 用户使用了非法参数 |
| 400 | MDS.InvalidPrivilege | No permissions. | 用户无权限进行操作 |
| 400 | MDS.MetaSchemaAlreadyExist | The database already exists. | 数据库已存在 |
| 400 | MDS.MetaSchemaNotExist | The database does not exist. | 操作的数据库不存在 |
| 400 | MDS.MetaTableAlreadyExist | The table already exists. | 操作的表已经存在 |
| 400 | MDS.MetaTableNotExist | The table is not found. | 操作的表不存在 |
| 500 | MDS.InternalError | An internal MDS error occurred. | MDS服务内部错误 |
| 500 | MDS.MetaVisitError | Failed to access metadata. | 访问元数据失败 |
| 403 | MDS.RamAuthAccessDenied | ram auth access denied. | RAM鉴权失败 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。