CreateKvNamespace - 创建KV存储空间

更新时间:
复制为 MD 格式

在当前账号下创建一个KV存储空间。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

调试

授权信息

当前API暂无授权信息透出。

请求参数

名称

类型

必填

描述

示例值

Namespace

string

KV 存储空间的名字。

test_namespace

Description

string

KV 存储空间的描述信息。

this is a test namespace.

返回参数

名称

类型

描述

示例值

object

Status

string

KV 存储空间状态,取值:

  • online:正常。

  • delete:待删除。

  • deleting:删除中。

  • deleted:已删除。

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. 存储空间名输入错误,比如输入空字符串。
400 InvalidKey.Malformed The specified key is invalid. Key名输入错误,比如输入空字符串。
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. 键值对的修改或者删除操作太频繁。

访问错误中心查看更多错误码。

变更历史

更多信息,参考变更详情