CDN Pro
更新日志配置。
Open API在线调试功能提供可视化界面在线调试API、支持生成代码示例、快速检索查看API文档等能力。前往调试
参数名称 | 描述 |
---|---|
*idInteger | 日志配置的id。 |
参数名称 | 描述 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
descriptionString | 日志配置描述。 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
*hostnamesList | 适用该日志配置的域名列表。每个域名必须是完整的FQDN域名如domain.com,或者是带星号的泛域名如*.domain.com。如果该日志配置适用于所有域名,则直接用星号*表示。每个域名有且只能有一个对应的日志配置。 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
logDownloadFormatString | 默认值: %cltip %rmtuser [%utctime] '%method %url %protocol' %statuscode %rspsize '%referer' '%ua' %rsptime
日志格式。可使用以下变量来自定义日志输出格式:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
logDownloadStorageDaysInteger | 默认值: 14 取值范围: [ 1 .. 30 ]
日志保存天数。 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
logDownloadFileSpanMinutesInteger | 取值范围: 5,15,30,60,120,240,480,1440
默认值: 30
每几分钟生成日志文件。 |
错误代码(code) | 描述(message) | HTTP状态码 | 语义 |
---|---|---|---|
InvalidLogConfigId | The specified log config ID does not exist or the caller doesn't have access to this resource. | 400 | 指定的日志配置ID不存在,或者您无访问权限。 |
#!/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/report/logConfigs/{id}" \ -X "PATCH" \ -u "$username:$password" \ -H "Date: $date" \ -H "Accept: application/json" \ -d '{"description": "log configuration-UPD", "hostnames": ["testdomain.domain.info"], "logDownloadFormat": "%referer %method %rmtuser %scheme %utctime", "logDownloadStorageDays": 9, "logDownloadFileSpanMinutes": 1440}'
{ "code": "InvalidLogConfigId", "message": "The specified log config ID does not exist or the caller doesn't have access to this resource." }