CDN Pro
删除保密信息。如果保密信息已在加速项目中使用,在删除保密信息之前,必须先从加速项目中解除引用,并重新验证和部署加速项目。
Open API在线调试功能提供可视化界面在线调试API、支持生成代码示例、快速检索查看API文档等能力。前往调试
参数名称 | 描述 |
---|---|
*secretIdString | 保密信息id。 |
错误代码(code) | 描述(message) | HTTP状态码 | 语义 |
---|---|---|---|
AccessDenied | Please enter valid credentials. | 403 | 鉴权失败。 |
InvalidSecretId | The specified secret ID does not exist. | 404 | 指定的secret ID不存在。 |
SecretInUse | The secret cannot be deleted because it is in use on production or staging. | 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/secrets/{secretID}" \ -X "DELETE" \ -u "$username:$password" \ -H "Date: $date" \ -H "Accept: application/json"
{ "code": "AccessDenied", "message": "Please enter valid credentials." }