名称 | 类型 | 是否必选 | 示例值 | 描述 |
Action | String | 是 | AddVodDomain | 系统规定参数。取值:AddVodDomain |
SpaceName | String | 否 | setljfselfa | 空间名称。不传值查询默认空间 |
DomainName | String | 是 | 需要接入点播的加速域名。暂时不支持泛域名。域名每一级最多63个字节 | |
CdnType | String | 是 | web | 加速域名的业务类型。取值:
|
Sources | Array of Source | 是 | [{"content":"1.1.1.1","type":"ipaddr","priority":"20","port":80}] | 回源地址列表。参数详情,请参见Source。 |
Scope | String | 否 | domestic | 加速区域,国际用户、国内L3及以上用户设置有效。 取值范围:
|
Ipv6 | Boolean | 否 | true | 是否开启Ipv6访问。 取值范围:
默认开启。 |
OriginHost | String | 否 | img.test.com | 全局自定义回源host |
OriginProtocol | String | 否 | https | 回源协议全局配置,默认为http |
公共返回参数
curl --location --request POST 'https://vod.streamlakeapi.com/?Action=AddVodDomain' \
--header 'AccessKey: xxx' \
--header 'Content-Type: application/json' \
--data-raw '{
"DomainName": "test_0823.streamlake.cn",
"Sources": [{
"Port": 80,
"Type": "kos",
"Content": "video-streamlake-test",
"Priority": 50
}],
"CdnType": "video",
"Scope": "domestic"
}'
HTTP/1.1 200 OK
Content-Type:application/json
"ResponseMeta": {
"RequestId":"CixgpmAFOYcAAAAAAAAAAw",
"ErrorCode":"",
"ErrorMessage":""
}
错误代码 | 错误信息 | 说明 | HTTP 状态码 |
ResourceNotFound | Space does not exist | 空间不存在 | 404 |
InvalidArgument | [CDN错误码]错误信息 | CDN内部错误,联系相关同学排查 | 400 |
InvalidArgument | domainName is empty | 域名为空 | 400 |
InvalidArgument | domainName is invalid | 域名不合法 | 400 |
InvalidArgument | domainName has illegal characters or length | 域名含有非法字符 | 400 |
InvalidArgument | domainName contains illegal hyphens | 域名含连续短划线 | 400 |
InvalidArgument | domainName contains consecutive dots | 域名含连续的点 | 400 |
InvalidArgument | domainName uses hyphen illegally | 域名在开头或结尾使用短划线 | 400 |
InvalidArgument | domainName uses dots illegally | 域名在开头或结尾使用点 | 400 |