Updates the metadata of vector data in a collection.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
gpdb:UpdateCollectionDataMetadata |
create |
*Collection
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| DBInstanceId |
string |
No |
The instance ID. Note
You can call the DescribeDBInstances operation to query all AnalyticDB for PostgreSQL instances in a region, including instance IDs. |
gp-j788ghhjjxxxx |
| Namespace |
string |
No |
The namespace. Note
You can call the ListNamespaces operation to query available namespaces. |
mynamespace |
| Collection |
string |
Yes |
The collection name. Note
You can call the ListCollections operation to query available collections. |
document |
| RegionId |
string |
Yes |
The region ID of the instance. |
cn-hangzhou |
| NamespacePassword |
string |
Yes |
The password of the namespace. |
testpassword |
| Filter |
string |
No |
The filter condition for the data to update, in SQL WHERE clause format. Either this parameter or the Ids parameter must be specified. |
business_value = 'chat_file_1' |
| Ids |
array |
No |
The list of data IDs to update, corresponding to the Row.Id values specified when uploading the data. Either this parameter or the Filter parameter must be specified. |
|
|
string |
No |
The ID of the data to update. |
AC-2642a8744eba4c5eb7d7595d08306d15 |
|
| Metadata |
object |
Yes |
The metadata to update, as a JSON-formatted MAP string. The key is the field name and the value is the new field value. |
{ "title": "new title", "content": "new content" } |
|
any |
No |
The metadata value. |
new title |
|
| WorkspaceId |
string |
No |
The workspace ID, which identifies a workspace composed of multiple instances. You must specify either this parameter or DBInstanceId. If both are specified, this parameter takes precedence. |
gp-ws-***** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
ABB39CC3-4488-4857-905D-2E4A051D0521 |
| Message |
string |
The error message returned when the request fails. |
failed to connect database, detailMsg: getConnection fail::SQL State: 28P01, Error Code: 0, Error Message: FATAL: password |
| Status |
string |
The request status. Valid values:
|
success |
| AppliedRows |
integer |
The number of rows affected. |
10 |
Examples
Success response
JSON format
{
"RequestId": "ABB39CC3-4488-4857-905D-2E4A051D0521",
"Message": "failed to connect database, detailMsg: getConnection fail::SQL State: 28P01, Error Code: 0, Error Message: FATAL: password",
"Status": "success",
"AppliedRows": 10
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.