Deletes a specified vector index.
Usage notes
-
Deleting an index also deletes all vector data in the index.
-
The delete operation is irreversible. Back up important data and proceed with caution.
Permissions
Alibaba Cloud accounts have full permissions by default. Resource Access Management (RAM) users and roles have none. An account administrator must grant permissions through a RAM policy or bucket policy.
|
API |
Action |
Description |
|
DeleteVectorIndex |
|
Delete a vector index. |
Request syntax
POST /?deleteVectorIndex HTTP/1.1
Host: examplebucket-123***456.cn-hangzhou-internal.oss-vectors.aliyuncs.com
Date: GMT Date
Authorization: SignatureValue
Content-type: application/json
{
"indexName": "string"
}
Request headers
This operation uses only Common request headers.
Request parameters
|
Name |
Data type |
Required |
Example |
Description |
|
indexName |
string |
Yes |
vectorindex1 |
The name of the index to delete. |
Response headers
This operation returns only Common response headers.
Examples
Sample request
POST /?deleteVectorIndex HTTP/1.1
Host: examplebucket-123***456.cn-hangzhou-internal.oss-vectors.aliyuncs.com
Date: Thu, 17 Apr 2025 01:33:47 GMT
Authorization: OSS4-HMAC-SHA256 Credential=LTAI********************/20250417/cn-hangzhou/oss/aliyun_v4_request,Signature=a7c3554c729d71929e0b84489addee6b2e8d5cb48595adfc51868c299c0c218
Content-type: application/json
{
"indexName": "vectorindex1"
}
Sample response
HTTP/1.1 204 No Content
x-oss-request-id: 534B371674E88A4D8906****
Date: Thu, 17 Apr 2025 01:33:47 GMT
Connection: keep-alive
Server: AliyunOSS
SDKs
Supported SDKs:
ossutil command-line interface
The corresponding ossutil command is delete-vector-index.
Error codes
|
Error code |
HTTP status code |
Description |
|
VectorIndexParameterInvalid |
400 |
The vector index parameter in the request is invalid. |
|
MalformedJson |
400 |
The JSON format of the request body is invalid. |
|
AccessDenied |
403 |
Possible causes of this error:
|
|
NoSuchVectorIndex |
404 |
The specified vector index does not exist. |
|
VectorIndexOperationConflict |
409 |
You cannot delete an index that is not in the `enable` state. |