更新加速项目的基本信息

更新时间:2023-04-04 20:49:03

适用产品

CDN Pro

接口描述

该接口用于更新加速项目的名称和描述。该操作不会创建加速项目新版本,也不会更新现有的加速项目版本。 如果要更改加速项目的配置,请调用“更新加速项目版本”接口。

推荐使用 Open API在线调试

Open API在线调试功能提供可视化界面在线调试API、支持生成代码示例、快速检索查看API文档等能力。前往调试

请求参数

Path 参数

参数名称描述
*propertyIdString
加速项目ID。

Body 参数

参数名称描述
*nameString
加速项目的名称。
descriptionString
加速项目的描述。

错误码

错误代码(code)描述(message)HTTP状态码语义
AccessDeniedThis user is not allowed to perform this request.403无操作权限。
InvalidPropertyIdThe specified property ID does not exist.404指定的加速项目ID不存在。
DuplicatePropertyNameA property with the same name already exists.409加速项目名称已存在。

示例

403
404
409
403
请求示例
复制代码 复制成功
#!/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."
}
本篇文档内容对您是否有帮助?
有帮助
我要反馈
提交成功!非常感谢您的反馈,我们会继续努力做到更好!