调用PutDcdnKvNamespace给账号下新增Namespace。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
dcdn:PutDcdnKvNamespace |
update |
*全部资源
|
无 | 无 |
请求参数
名称 |
类型 |
必填 |
描述 |
示例值 |
Description |
string |
否 |
Namespace 描述信息。 |
the first namespace |
Namespace |
string |
是 |
Namespace 名称,不区分大小写,可以包含字母、数字、上划线和下划线。 |
ns1 |
返回参数
名称 |
类型 |
描述 |
示例值 |
object |
|||
Status |
string |
Namespace 状态,取值:
|
online |
Namespace |
string |
Namespace 名称。 |
ns1 |
NamespaceId |
string |
Namespace ID。 |
12423131231**** |
RequestId |
string |
请求 ID。 |
D61E4801-EAFF-4A63-AAE1-FBF6CE1CFD1C |
Description |
string |
Namespace 描述信息,最大长度为 1024 个字符。 |
the first namespace |
示例
正常返回示例
JSON
格式
{
"Status": "online",
"Namespace": "ns1",
"NamespaceId": "12423131231****",
"RequestId": "D61E4801-EAFF-4A63-AAE1-FBF6CE1CFD1C",
"Description": "the first namespace"
}
错误码
HTTP status code |
错误码 |
错误信息 |
描述 |
---|---|---|---|
400 | Invalid.Parameter | The specified parameter is invalid. | 输入参数无效 |
400 | InvalidAccount.Malformed | The specified account is invalid. | 账号输入不对,比如输入为空 |
400 | InvalidNameSpace.Malformed | The specified namespace is invalid. | namespace输入不对,比如输入为空 |
400 | InvalidKey.Malformed | The specified key is invalid. | key输入不对,比如输入为空 |
400 | InvalidKey.ExceedsMaximum | The size of the key cannot exceed 512 bytes. | key长度不能超过512B |
400 | InvalidValue.ExceedsMaximum | The size of the value cannot exceed 2,000,000 bytes. | value长度不能越过2000000B |
403 | InvalidKey.ExceedsCapacity | The maximum capacity of a single namespace cannot exceed 1 GB. | namespace容量超过限制,单个namespace最大容量为1G |
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. | 资源校验失败 |
404 | InvalidAccount.NotFound | The specified account does not exist. | 账号不存在,未创建 |
404 | InvalidNameSpace.NotFound | The specified namespace does not exist. | namespace不存在 |
404 | InvalidKey.NotFound | The specified key does not exist. | 请求的key不存在 |
406 | InvalidNameSpace.Duplicate | The specified namespace already exists. | namespace已存在 |
406 | InvalidNameSpace.QuotaFull | The maximum number of namespaces is exceeded. | namespace个数超过quota限制 |
406 | InvalidKey.QuotaFull | The maximum number of keys is exceeded. | key个数超过quota限制 |
429 | TooManyRequests | Too many requests are submitted. | 请求速率过快 |
429 | TooQuickRequests | Request for putting or deleting keys are frequently submitted. | key put/delete操作太频繁 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。
该文章对您有帮助吗?