CDN Pro
删除一个加速项目版本。
Open API在线调试功能提供可视化界面在线调试API、支持生成代码示例、快速检索查看API文档等能力。前往调试
参数名称 | 类型 | 必填 | 描述 |
---|---|---|---|
propertyId | String | 是 | 加速项目ID。 |
version | String | 是 | 加速项目版本。必须是大于等于1的整数值。 |
错误代码(code) | 描述(message) | HTTP状态码 | 语义 |
---|---|---|---|
InvalidPropertyId | The specified property ID does not exist. | 404 | 指定的加速项目ID不存在。 |
InvalidVersion | The property version specified does not exist. | 404 | 指定的加速项目版本不存在。 |
PropertyInUse | The property version is currently deployed to staging or production and cannot be deleted. The user needs to create a deployment task to remove the property from cache servers. | 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}/versions/{version}" \ -X "DELETE" \ -u "$username:$password" \ -H "Date: $date" \ -H "Accept: application/json"
{ "code": "InvalidPropertyId", "message": "The specified property ID does not exist." }