DeleteVectorIndex
更新時間:
Copy as MD
調用DeleteVectorIndex介面刪除向量索引。
注意事項
-
刪除索引會同時刪除索引中的所有向量資料。
-
刪除操作無法復原,請謹慎操作,確保已備份重要資料。
許可權說明
阿里雲帳號預設擁有全部許可權。阿里雲帳號下的RAM使用者或RAM角色預設沒有任何許可權,需要阿里雲帳號或帳號管理員通過RAM Policy概述或Bucket Policy授予操作許可權。
|
API |
Action |
說明 |
|
DeleteVectorIndex |
|
刪除向量索引。 |
請求文法
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"
}
要求標頭
此介面僅涉及公用要求標頭。更多資訊,請參見公用HTTP頭定義。
請求參數
|
名稱 |
資料類型 |
是否必選 |
樣本值 |
描述 |
|
indexName |
字串 |
是 |
vectorindex1 |
要刪除的索引名稱。 |
回應標頭
此介面僅涉及公用回應標頭。更多資訊,請參見公用HTTP頭定義。
樣本
請求樣本
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"
}
返回樣本
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
SDK
DeleteVectorIndex介面所對應的各語言SDK如下:
命令列工具ossutil
DeleteVectorIndex介面所對應的ossutil命令,請參見delete-vector-index。
錯誤碼
|
錯誤碼 |
HTTP狀態代碼 |
描述 |
|
VectorIndexParameterInvalid |
400 |
請求中提供的向量索引參數不合法。 |
|
MalformedJson |
400 |
請求體中的 JSON 格式不符合規範。 |
|
AccessDenied |
403 |
返回該錯誤的可能原因如下:
|
|
NoSuchVectorIndex |
404 |
目標向量索引不存在。 |
|
VectorIndexOperationConflict |
409 |
刪除索引時,若索引狀態不是 enable,則禁止執行該操作,視為衝突。 |
该文章对您有帮助吗?