CDN

使用须知

最近更新时间:2019-02-28 16:38:21

使用须知

大小写约定

变量的名称、action的名称,都是首字母大写,并且用驼峰字。
枚举类型的值无规范,一般用纯小写、下划线间隔,或者用纯大写。

时间格式

ISO8601表示法,北京时间,格式为:YYYY-MM-DDThh:mm+0800,例如: 2016-08-01T21:14+0800

枚举类型表

DomainStatus

域名状态(DomainStatus)包括:

  • 正在运行 - online
  • 已停止 - offline
  • 配置中 - configuring
  • 配置失败 - configure_failed
  • 审核中 - icp_checking
  • 审核失败 - icp_check_failed
  • 已封禁 - locked
  • 封禁中 - locking

CdnSubType

产品子类型(CdnSubType)包括:

  • 大文件下载 - download
  • 音视频点播 - video
  • 流媒体直播 - live
  • 图片小文件 - page

CacheRuleType

缓存规则类型(CacheRuleType)包括:

  • 文件后缀 - file_suffix:文件后缀名,如输入多个须以半角逗号分隔,如:jpg,txt,mp4;
  • 目录 - directory:单条输入,目录必须以/开头且以/结尾,如:/www/dir/aaa/。若需要设置域名下全部目录,则直接输入/即可
  • 全路径 - exact:单条输入,全路径须以 / 开头,如:/www/dir/aaa

ErrorHttpCode

支持的错误码见下表:

状态码 状态码描述
400 客户端请求的语法错误,服务器无法理解
403 服务器理解请求客户端的请求,但是拒绝执行此请求
404 服务器无法根据客户端的请求找到资源。
405 客户端请求中的方法被禁止
406 服务器无法根据客户端请求的内容特性完成请求
414 请求的URI过长(URI通常为网址),服务器无法处理
416 客户端请求的范围无效
500 服务器内部错误,无法完成请求
501 服务器不支持请求的功能,无法完成请求
502 作为网关或者代理工作的服务器尝试执行请求时,从远程服务器接收到了一个无效的响应
503 由于超载或系统维护,服务器暂时的无法处理客户端的请求
504 充当网关或代理的服务器,未及时从远端服务器获取请求

Content-Type

智能压缩默认支持的Content-Type包括:

  • application/atom+xml

  • application/javascript

  • application/x-javascript

  • application/xhtml+xml

  • application/xml

  • application/xml+rss

  • application/xml-dtd

  • text/css

  • text/htm

  • text/html

  • text/javascript

  • text/js

  • text/json

  • text/plain

  • text/xml

Regions

加速区域(Regions)包括:

  • 中国大陆 - CN
  • 香港 - HK
  • 台湾 - TW
  • 亚洲其他 - AS
  • 北美洲 - NA
  • 欧洲 - EU
  • 大洋洲 - AU
  • 非洲 - AF
  • 南美洲 - SA

Provinces

省份(Provinces)包括:

  • 北京:beijing,内蒙古:neimenggu,山西:shanxi,河北:hebei,天津:tianjin
  • 宁夏:ningxia,陕西:shaanxi,甘肃:gansu,青海:qinghai,新疆:xinjiang
  • 黑龙江:heilongjiang,吉林:jilin,辽宁:liaoning
  • 福建:fujian,江苏:jiangsu,安徽:anhui,山东:shandong,上海:shanghai,浙江:zhejiang
  • 河南:henan,湖北:hubei,江西:jiangxi,湖南:hunan
  • 贵州:guizhou,云南:yunnan,重庆:chongqing,四川:sichuan,西藏:xizang
  • 广东:guangdong,广西:guangxi,海南:hainan

Isps

运营商(Isps)包括:

  • 联通 - UN
  • 移动 - CM
  • 电信 - CT
  • 铁通 - CTT
  • 鹏博士 - PBS
  • 教育网 - CE
  • 国内其他 - Other
  • 海外ISP - OverseaIsp

Areas

地区(Areas)包括:

  • 北京:beijing,内蒙古:neimenggu,山西:shanxi,河北:hebei,天津:tianjin
  • 宁夏:ningxia,陕西:shaanxi,甘肃:gansu,青海:qinghai,新疆:xinjiang
  • 黑龙江:heilongjiang,吉林:jilin,辽宁:liaoning
  • 福建:fujian,江苏:jiangsu,安徽:anhui,山东:shandong,上海:shanghai,浙江:zhejiang
  • 河南:henan,湖北:hubei,江西:jiangxi,湖南:hunan
  • 贵州:guizhou,云南:yunnan,重庆:chongqing,四川:sichuan,西藏:xizang
  • 广东:guangdong,广西:guangxi,海南:hainan
  • 香港:hongkong, 澳门:macao,台湾:taiwan
  • 其他:other
  • 海外:oversea

错误代码表

HttpStatus状态码 ErroyCode 错误码 Message 错误信息 语义
400 InvalidClientTokenId The security token included in the request is invalid. ak/sk不正确
400 UnSupportCdnType This api currently did not support such cdn type. Supported:file. 不支持的Cdn业务类型:此处只支持XX类型
400 InvalidCdnType Invalid cdn type.Expected:file\live\page\download,but receive:${CdnType} 产品类型参数错误
400 InvalidGranularity Invalid granularity.Option for granularity is 5, 10, 15 ...1440(min),received:${Granularity} 统计粒度参数错误
400 InvalidDataType.EdgeOrigin Invalid data type.Expected:edge\origin, but receive:${DataType} 数据类型参数错误
400 InvalidDataType.ReqhitrateFlowhitrate Invalid data type.Expected:reqhitrate\flowhitrate, but receive:${DataType} 命中率数据类型参数错误
400 InvalidResultType Invalid result type.Expected:0\1, but receive:${ResultType} 返回结果参数错误
400 InvalidRegion Invalidregion.Expected:CN,NA,AS,EU,SA,AU,AF, but receive:${Region} 加速区域参数错误
400 InvalidEndTime.Mismatch Specified end time should not be earlier than starttime."StartTime:${StartTime},EndTime:${EndTime} EndTime小于StartTime
400 InvalidStartTime.ValueNotSupported The gap between start time and end time should be less then or equal to 93 days."StartTime:${StartTime} , EndTime:${EndTime} EndTime和StartTime差值超过93天
400 InvalidStartTime.Malformed Specified start time is malformed."StartTime:${StartTime}" StartTime参数错误
400 InvalidEndTime.Malformed Specified end time is malformed."EndTime:${EndTime}" EndtTime参数错误
400 InvalidDomain.NotFound The domain provided does not belong to you.Invalid domains:${DomainId} 域名不属于当前用户
400 InvalidDomain.Offline The domain provided is offline.Invalid domains:${DomainId} 域名处于非法状态
400 IllegalOperation Your account does not open CDN service yet 未开通CDN服务
400 TooManyDataPoints "Domain number: ${DomainNumber}, region number:${RegionNumber}, time points:${TimePoints}, total points in this request(DomainNumber_RegionNumber_TimePoints):${TotalPoints}.Total points must be less than or equal to 10000." 超出接口最大吞吐量范围
400 NoAvailableDomain Your do not have any domain config yet 没有可用的域名信息
400 DomainCdnTypeNotMatch Domains and cdn type did not match.Invalid domains:${DomainId} 域名与产品类型不符
400 BindException Rejected keys and values: ${params};${paramValues} 参数类型错误
400 InvalidCdnSubType Sub type is malformed 产品子类型参数错误
400 InvalidOriginProtocol Back to the source protocol is malformed 回源协议参数错误
400 InvalidCdnProtocol Edge node protocol is malformed 访问协议参数错误
400 InvalidOriginType Source station type is malformed 源站类型参数错误
400 InvalidOriginPort Invalid origin port.Expected:80, but receive: $(OriginPort) 无效的回源端口号
400 InvalidCacheRuleType nvalid cache rule type.Expected:file_suffix\directory\exact\url_regex, but receive:$(value) 无效的缓存规则类型
400 InvalidCacheRuleValue Invalid cache rule value.Expected:$(type) value, but receive: $(value) 无效缓存规则值
400 InvalidCacheTime Invalid cache time value.Expected:Must be lost as an integer must be greater than 0, but receive: $(value) 无效的缓存时间值
400 InvalidSwitchValue Invalid switch value.Expected:on\off, but receive:$(value) 无效开关值
400 CacheRuleListIsEmpty Cache rule list is empty. 缓存规则列表是空的
400 InvalidConfigInfoQueryCondition Invalid configuration information query condition.Expected:cache_expired\cc\error_page\http_header\optimize\page_compress\ignore_query_string\range\referer\req_auth\src_host\video_seek\waf\notify_url\redirect_type, but receive: $(value) 无效的配置信息的查询条件
400 RequiresInputValue Requires input value.Expected:This value is required, but no found value from: $(value) 要求输入值
400 InvalidSourceStationLine Invalid source station line.Expected:default\un\ct\cm, but receive:$(value) 无效源站线路
400 InvalidSourceStationType Invalid source station type.Expected:ipaddr\domain, but receive:$(value) 无效源站类型
400 InvalidDomainName This value does not conform to the rules of the domain name.Expected: Submit parameter values in the format, but receive:$(value) 该项值不符合域名的规则
400 InvalidCdnSubType.Live Invalid live child type.Expected:live, but receive:$(value) 无效的直播子类型
400 InvalidCdnSubType.Download Invalid download child type.Expected:web\download\video, but receive:$(value) 无效的下载子类型
400 InvalidCdnProtocol.Live Invalid live protocol.Expected:http+flv\hls\rtmp, but receive:$(value) 无效的直播协议
400 InvalidCdnProtocol.Download Invalid download protocol.Expected:HTTP, but receive:$(value) 无效下载协议
400 InvalidOriginType Invalid origin type.Expected:ipaddr\domain\ksvideo\KS3, but receive:$(value) 无效源站类型
400 InvalidOriginType.Live Invalid live origin type.Expected:ipaddr\domain\ksvideo, but receive:$(value) 无效直播源站类型
400 InvalidOriginType.Download Invalid Download origin type.Expected:ipaddr\domain\KS3, but receive:$(value) 无效下载源站类型
400 InvalidOriginProtocol.Live Invalid live origin protocol.Expected:rtmp, but receive:$(value) 无效的直播回源协议
400 InvalidOriginProtocol.Download Invalid download origin protocol.Expected:http, but receive:$(value) 无效的下载回源协议
400 InvalidOriginPort Invalid origin port.Expected:80, but receive:$(value) 无效的回源端口
400 PageSizeOutOfRange Page size out of range.Expected:Between 1 and 500, but receive:$(value) 页面大小超出范围
400 pageNumberOutOfRange Page number out of range. Expected:Between 1 and 10000, but receive:$(value) 超出范围的页面编号
400 InvalidDomainStatus Invalid domain status.Expected:online\offline\configuring\configure_failed\icp_checking\icp_check_failed, but receive:$(value) 无效域名状态
400 InvalidActionType Invalid domain action type.Expected:start\stop, but receive:$(value) 无效域动作类型
400 InvalidOriginAdress Origin adress is not standardized. 源地址不规范
400 OriginLineRepeat Origin line can not be repeated. 线路不能重复
400 OriginTypeNotUnique Advanced source station must unique. 回源类型必须唯一
400 InvalidOriginPolicyType Invalid polling type.Expected:rr\quality, but receive:$(value) 无效轮询类型
400 PolicyBestCountOutOfRange Policy best count out of range.Expected:Between 1 and 10, but receive:$(value) 超出计数范围
400 NotCorrectURL URL is not correct. url不正确
400 InvalidReferType Invalid refer type.Expected:block\allow, but receive:$(value) 无效的refer类型
400 TooManyReferList Too many refer url in this request.Expected:Between 1 and 100, but receive:$(value) url太多
400 DomainNameHasBeUsed Domain name has been used. 域名已存在
400 DomainNotFound Through the domain name ID did not find the domain name information. 找不到域名信息
400 RecordQueryFailed Query record information failed. 域名未备案
400 StatusCannotOrNoneedModified Current domain status does not allow or need to be modified. 当前状态不能或无需修改
400 CanNotSetByOriginType Cannot set back the source host function Because of OringType value is KS3 源站类型为KS3时,不能修改回源host
400 RepeatedCacheValue The value of the same CacheRuleType cannot be repeated. 同一个缓存类型的值不能重复
400 InvalidIsp Invalid isp.Expected:UN,CM,CT,CTT,PBS,CE,Other, but receive:{} 运营商参数错误
400 InvalidProvince Invalid province.Expected:beijing, neimenggu, shanxi and so on, but receive:{} 省份参数错误
400 InvalidEnable.ValueNotSupported The specified value of parameter Enable is not supported. Enable的值不合法
400 ServerCertificate.MissingParameter An input parameter ServerCertificate that is mandatory for processing the request is not supplied. ServerCertificate参数缺失
400 PrivateKey.MissingParameter An input parameter PrivateKey that is mandatory for processing the request is not supplied. PrivateKey参数缺失
400 InvalidServerCertificate The ServerCertificate you provided is malformed! 证书内容不合法
400 InvalidPrivateKey The Private Key you provided is malformed! 私钥内容不合法
400 ServerCertificate.MissMatch The Private Key does not math the specified ServerCertificate! 证书和私钥不匹配
400 InvalidServerCertificate.TooLong The ServerCertificate you provided is over the max length! 证书私钥内容超过长度限制
400 Certificate.CertNull The Certificate is not null. 证书不能为空
400 Certificate.FormatError The Certificate format is error. 证书格式错误
400 Certificate.KeyNull The private key is not null. 私钥不能为空
400 Key.Malformed The private key format is error. 私钥格式错误

金山云,开启您的云计算之旅

注册有礼