在當前帳號下建立一個KV儲存空間。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| Namespace |
string |
是 |
KV 儲存空間的名字。 |
test_namespace |
| Description |
string |
否 |
KV 儲存空間的描述資訊。 |
this is a test namespace. |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
|||
| Status |
string |
KV 儲存空間狀態,取值:
|
online |
| Namespace |
string |
KV 儲存空間名稱。 |
test_namespace |
| NamespaceId |
string |
KV 儲存空間的 ID。 |
657717877171818496 |
| RequestId |
string |
請求 ID。 |
EEEBE525-F576-1196-8DAF-2D70CA3F4D2F |
| Description |
string |
KV 儲存空間的描述資訊。 |
this is a test namespace. |
樣本
正常返回樣本
JSON格式
{
"Status": "online",
"Namespace": "test_namespace",
"NamespaceId": "657717877171818496",
"RequestId": "EEEBE525-F576-1196-8DAF-2D70CA3F4D2F",
"Description": "this is a test namespace."
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | InvalidAccount.Malformed | The specified account is invalid. | 帳號輸入不對,比如輸入為空白。 |
| 400 | InvalidNameSpace.Malformed | The specified namespace is invalid. | 儲存空間名輸入錯誤,比如輸入Null 字元串。 |
| 400 | InvalidKey.Malformed | The specified key is invalid. | Key名輸入錯誤,比如輸入Null 字元串。 |
| 400 | InvalidKey.ExceedsMaximum | The size of the key cannot exceed 512 bytes. | 請求的Key的長度過大。 |
| 400 | InvalidValue.ExceedsMaximum | The size of the value cannot exceed 2,000,000 bytes. | 存入的值過大。 |
| 400 | InvalidParameter | The specified parameter is invalid. | 輸入參數規範校正失敗。 |
| 400 | TooManyRequests | Too many requests.Please try again later. | 請求過於頻繁,請稍後重試。 |
| 403 | Unauthorized.InvalidParameters | The specified authentication parameters are invalid. | 鑒權參數輸入錯誤。 |
| 403 | Unauthorized.InvalidTime | The specified authentication time is invalid. | 您輸入的鑒權時間參數無效,請檢查參數值後重試。 |
| 403 | Unauthorized.InvalidToken | Token authentication failed. | 您輸入的token無效,請檢查並輸入正確的token後進行重試。 |
| 403 | Unauthorized.InvalidResource | Resource authentication failed. | |
| 403 | InvalidKey.ExceedsCapacity | The maximum storage capacity of the Edge KV namespace has been reached. Delete unwanted key-value pairs to save the storage. | 邊緣儲存的儲存空間(Namespace)容量超過限制,請清理Namespace中無需使用的Key,從而減少Namespace中的儲存消耗。 |
| 404 | InvalidAccount.NotFound | The specified account does not exist. | 指定的帳號不存在。 |
| 404 | InvalidNameSpace.NotFound | The specified namespace does not exist. | 指定的儲存空間不存在。 |
| 404 | InvalidKey.NotFound | The specified key does not exist. | 指定的索引值對不存在。 |
| 406 | InvalidNameSpace.Duplicate | The specified namespace already exists. | 指定的儲存空間已經存在。 |
| 406 | InvalidNameSpace.QuotaFull | The maximum number of namespaces is exceeded. | 儲存空間的個數超過容量限制。 |
| 406 | InvalidKey.QuotaFull | The total number of IP exceeds the quota. | ip總數量超過配額。 |
| 429 | TooQuickRequests | Request for putting or deleting keys are frequently submitted. | 索引值對的修改或者刪除操作太頻繁。 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。