Add a table for the table data connector.
Usage notes
- RAM users (sub-accounts) must first obtain the API permissions for Alibaba Cloud Model Studio (the
AliyunBailianDataFullAccesspolicy, which includes the sfm:AddTable permission) and join a workspace before calling this operation. An Alibaba Cloud account can call this operation directly without authorization. We recommend that you call this operation by using the latest version of the Alibaba Cloud Model Studio SDK. - This operation is not idempotent.
Try it out
You can call this operation in OpenAPI Explorer without calculating a signature. After a successful call, OpenAPI Explorer can automatically generate SDK code examples.
Authorization information
The following table describes the authorization information of the API. You can use it in the Action element of RAM permission policy statements to grant RAM users or RAM roles the permission to call this API. The details are as follows:
- Action: the specific permission point.
- Access level: the access level of each action. Valid values: Write, Read, and List.
-
Resource type: the resource types that support authorization for the action. The details are as follows:
- Required resource types are marked with a prefixed asterisk (*).
- For operations that do not support resource-level authorization,
All Resourcesis used.
- Condition key: the condition keys defined by the cloud service itself.
- Dependent actions: the other permissions required to successfully perform the operation. The caller must have the permissions of all dependent actions for the operation to succeed.
Action | Access level | Resource type | Condition key | Dependent action |
|---|---|---|---|---|
sfm:AddTable | create | *All Resources
| None | None |
Request syntax
Path parameters
Name | Type | Required | Description | Example |
|---|---|---|---|---|
| WorkspaceId | string | Yes | The ID of the workspace to which the file belongs. For information about how to obtain the workspace ID, see Work with workspaces. | llm-3shx2gu255oqxxxx |
Request parameters
Name | Type | Required | Description | Example |
|---|---|---|---|---|
| TableName | string | Yes | The table name. | ads_wjjr_basc_enterprise_di |
| TableDesc | string | No | The table description. | table description |
| ConnectorId | string | Yes | The connector ID. | connector-d51861492df64257 |
| TableColumns | array<object> | Yes | The column information of the table. | |
object | Yes | The information of a single column. | ||
| ColumnName | string | Yes | The column name. | column1 |
| ColumnDesc | string | No | The column description. | desc |
| DataType | string | Yes | The data type. | string |
Response parameters
Name | Type | Description | Example |
|---|---|---|---|
object | Schema of Response | ||
| Code | string | The error status code. | Index.Forbidden |
| Data | object | The returned data. | |
| TableId | string | The table ID. | table_b6ddc67e7df14db38b74ef5e2e0fe24e_12792097 |
| Message | string | The error message. | Required parameter(%s) missing or invalid, please check the request parameters. |
| RequestId | string | The request ID. | 778C0B3B-03C1-5FC1-A947-36EDD13606AB |
| Status | string | The status code returned by the API. | 200 |
| Success | boolean | Indicates whether the API call is successful. Valid values:
| True |
Examples
Sample success response
JSON format