Updates the tags for a specified file.
Operation description
A RAM User (sub-account) must be granted the required API permissions for Alibaba Cloud Model Studio (the
AliyunBailianDataFullAccesspolicy, which includes thesfm:UpdateFileTagpermission) and join a workspace before calling this operation. An Alibaba Cloud account (main account) can call this operation directly without authorization. We recommend using the latest version of the Alibaba Cloud Model Studio SDK to call this operation.
Throttling: Do not call this operation more than 5 times per second. If a request is throttled, try again later.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
sfm:UpdateFileTag |
update |
*All Resource
|
None | None |
Request syntax
PUT /{WorkspaceId}/datacenter/file/{FileId} HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| WorkspaceId |
string |
Yes |
The ID of the workspace that contains the file. For instructions on obtaining the ID, see How to use workspaces. |
llm-3z7uw7fwz0vxxxx |
| FileId |
string |
Yes |
The ID of the file. You can obtain the ID from the application data page by clicking the ID icon next to the file name. |
file_9a65732555b54d5ea10796ca5742ba22_xxxxxxxx |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Tags |
array |
Yes |
|
|
|
string |
No |
The value of a tag. Each tag can be up to 32 characters long. Supported characters include Unicode letters (such as English and Chinese characters), digits, underscores (_), and hyphens (-). A tag cannot contain spaces. |
标签A |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response body. |
||
| Code |
string |
The result code. A value of |
Success |
| Data |
object |
The data returned. |
|
| FileId |
string |
The ID of the file. |
file_9a65732555b54d5ea10796ca5742ba22_xxxxxxxx |
| Message |
string |
The response message. |
Requests throttling triggered. |
| RequestId |
string |
The request ID. |
35A267BF-xxxx-54DB-8394-AA3B0742D833 |
| Status |
string |
The status code. |
200 |
| Success |
boolean |
Indicates whether the request was successful. Valid values:
|
true |
Examples
Success response
JSON format
{
"Code": "Success",
"Data": {
"FileId": "file_9a65732555b54d5ea10796ca5742ba22_xxxxxxxx"
},
"Message": "Requests throttling triggered.",
"RequestId": "35A267BF-xxxx-54DB-8394-AA3B0742D833",
"Status": "200",
"Success": true
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.