UpdateTableFromAuthorizedOss
Update a table in an Alibaba Cloud Model Studio data connector using a file from an authorized OSS bucket.
Operation description
-
Ensure that the OSS bucket belongs to the same Alibaba Cloud account as your Alibaba Cloud Model Studio instance. You must also complete the authorization steps described in Configure data import from OSS.
The bucket storage class must not be Archive, Cold Archive, or Deep Cold Archive. Buckets with server-side encryption are supported. public-read-write, public-read, and private buckets are also supported.
If you use a bucket with Referer-based hotlink protection, you must add
*.console.aliyun.comto the Referer whitelist. For more information, see Allow access only from trusted websites.
-
Before a RAM user (sub-account) can call this operation, they must obtain API permissions for Alibaba Cloud Model Studio and join a workspace. The AliyunBailianDataFullAccess policy includes the required
sfm:UpdateTableFromAuthorizedOsspermission. An Alibaba Cloud account (root account) can call this operation directly without additional permissions. We recommend that you use the latest version of the or Alibaba Cloud Model Studio SDK. -
This operation is not idempotent.
Rate limiting: This operation is subject to rate limiting. Do not call it more than five times per second. If you reach the limit, wait before you try again.
Try it now
Test
RAM authorization
Request syntax
PUT /{WorkspaceId}/datacenter/table/fromoss/{TableId} HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| WorkspaceId |
string |
Yes |
ID of the workspace that owns the file. For details, see Use workspaces. |
llm-3z7uw7fwz0vxxxx |
| TableId |
string |
Yes |
ID of the table to update. |
table_100b51399c404966b7d49f71e388a3fd_12738336 |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| OssBucket |
string |
Yes |
Name of the OSS bucket. For details, see bucket. |
yinghuo-ai |
| OssRegionId |
string |
Yes |
Region ID of the OSS bucket. For details, see OSS regions and endpoints. |
cn-beijing |
| OssKey |
string |
Yes |
Object key of the file in the OSS bucket. For details, see object naming. |
a0deedbce4a8162b8d66c63ace28330c |
| UpdateMode |
string |
Yes |
Update mode. Valid values: APPEND and OVERWRITE. |
OVERWRITE |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| Code |
string |
Error status code. |
DataCenter.FileTooLarge |
| Data |
object |
Data field of the response. |
|
| TableId |
string |
Same as the input TableId parameter. |
table_df96ebd5da8640e5a0991b3d15f39d4d_12792097 |
| Status |
string |
Current table status. After upload, the status usually changes to TO_IMPORT. This means the system has accepted the uploaded file and is waiting to schedule it into the data table. |
TO_IMPORT |
| Message |
string |
Error message. |
Required parameter(%s) missing or invalid, please check the request parameters. |
| RequestId |
string |
ID of the request. |
7BA8ADD9-53D6-53F0-918F-A1E776AD230E |
| Status |
string |
Status code returned by the operation. |
200 |
| Success |
boolean |
Indicates whether the operation succeeded. |
true |
Examples
Success response
JSON format
{
"Code": "DataCenter.FileTooLarge",
"Data": {
"TableId": "table_df96ebd5da8640e5a0991b3d15f39d4d_12792097",
"Status": "TO_IMPORT"
},
"Message": "Required parameter(%s) missing or invalid, please check the request parameters.",
"RequestId": "7BA8ADD9-53D6-53F0-918F-A1E776AD230E",
"Status": "200",
"Success": true
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.