CDN Pro
该接口用于更新加速项目的名称和描述。该操作不会创建加速项目新版本,也不会更新现有的加速项目版本。 如果要更改加速项目的配置,请调用“更新加速项目版本”接口。
Open API在线调试功能提供可视化界面在线调试API、支持生成代码示例、快速检索查看API文档等能力。前往调试
参数名称 | 类型 | 必填 | 描述 |
---|---|---|---|
propertyId | String | 是 | 加速项目ID。 |
参数名称 | 类型 | 必填 | 描述 |
---|---|---|---|
name | String | 是 | 加速项目的名称。 |
description | String | 否 | 加速项目的描述。 |
错误代码(code) | 描述(message) | HTTP状态码 | 语义 |
---|---|---|---|
AccessDenied | This user is not allowed to perform this request. | 403 | 无操作权限。 |
InvalidPropertyId | The specified property ID does not exist. | 404 | 指定的加速项目ID不存在。 |
DuplicatePropertyName | A property with the same name already exists. | 409 | 加速项目名称已存在。 |
#!/bin/bash username="example_username" apiKey="example_apiKey" date=`env LANG="en_US.UTF-8" date -u "+%a, %d %b %Y %H:%M:%S GMT"` password=`echo -en "$date" | openssl dgst -sha1 -hmac $apiKey -binary | openssl enc -base64` curl -i --url "https://open.chinanetcenter.com/cdn/properties/{propertyID}" \ -X "PATCH" \ -u "$username:$password" \ -H "Date: $date" \ -H "Accept: application/json" \ -d '{"name": "TestProperty1572403806952", "description": "updated"}'
{ "code": "AccessDenied", "message": "This user is not allowed to perform this request." }