调用AddVodDomain添加点播加速域名。每次只能提交一个加速域名,一个用户最多添加20个域名。
- 目前仅支持上海地域。
- 创建加速域名之前,您需要先开通点播服务,并且加速域名必须已备案完成。
- 源站内容。如果不在阿里云平台上,需要审核,审核工作会在下一工作日前完成。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | AddVodDomain |
系统规定参数。取值:AddVodDomain。 |
DomainName | String | 是 | example.com |
需要接入点播的加速域名。支持泛域名,以英文句号(.)开头,如:.example.com。 |
Sources | String | 是 | [{"content":"1.1.1.1","type":"ipaddr","priority":"20","port":80}] |
回源地址列表。参数详情,请参见下表Sources。 |
CheckUrl | String | 否 | www.example.com/test.html |
健康检测URL。 |
Scope | String | 否 | domestic |
国际用户、国内L3及以上用户设置有效。 取值范围:
|
TopLevelDomain | String | 否 | example.com |
顶级接入域。 |
Sources
名称 |
类型 |
是否必需 |
描述 |
---|---|---|---|
type |
String |
是 |
源站类型 取值: ipaddr:IP源站。 domain:域名源站。 oss:OSS Bucket为源站。 |
content |
String |
是 |
回源地址,可以是IP或域名。 |
port |
Integer |
否 |
端口号。可以指定443、80。默认值80。443端口使用https回源。也可以自定义端口。 |
priority |
String |
否 |
源站地址对应的优先级。支持20和30,默认值为20。20是主源,30是备源。 |
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
RequestId | String | 15C66C7B-671A-4297-****-2C4477247A74 |
请求ID。 |
示例
请求示例
https://vod.aliyuncs.com/?Action=AddVodDomain
&DomainName=example.com
&Sources=[{"content":"1.1.1.1","type":"ipaddr","priority":"20","port":80}]
&<公共请求参数>
正常返回示例
XML
格式
<AddVodDomainResponse>
<RequestId>15C66C7B-671A-4297-****-2C4477247A74</RequestId>
</AddVodDomainResponse>
JSON
格式
{
"RequestId": "15C66C7B-671A-4297-****-2C4477247A74"
}
错误码
访问错误中心查看更多错误码。
接口错误码
下表列举了本接口特有的错误码。
错误代码 |
错误信息 |
HTTP 状态码 |
说明 |
---|---|---|---|
InvalidDomainName.Malformed |
Specified DomainName is malformed. |
400 |
DomainName 参数错误 |
InvalidCdnType.Malformed |
Specified CdnType is malformed. |
400 |
CdnType 参数错误。 |
InvalidSourceType.Malformed |
Specified SourceType is malformed. |
400 |
SourceType 参数错误。 |
InvalidSources.Malformed |
Specified Sources is malformed. |
400 |
回源地址与源站类型不一致。 |
InvalidScope.Malformed |
Specified Scope is malformed. |
400 |
Scope 参数错误。 |
InvaildParameter |
The Certificate you provided is malformed! |
400 |
https安全加速时证书和密钥长度和过长。 |
BusinessExist |
Business exist do not repeated submission |
400 |
该域名正在添加,不用重复提交。 |
DomainAlreadyExist |
This domain name is exist already |
400 |
该域名已经添加。 |
DomainOverLimit |
The Number of Domain is over the limit |
403 |
超过域名个数限制。 |
DomainNotRegistration |
The Domain name is not registered |
404 |
该域名没有备案。 |
IllegalOperation |
Illegal domain operate is not permitted. |
403 |
没有权限执行当前操作。 |
ServiceBusy |
The specified Domain is configuring, please retry later. |
403 |
域名正在配置中, 请稍后再试。 |
InvalidDomain.NotFound |
The domain provided does not belong to you. |
404 |
域名不存在或不属于当前用户。 |
InnerAddDomainDenied |
Your account haven’t bind aoneId, can not add domain. |
400 |
内部账号未绑定aoneId,不能添加域名。 |
ExtensiveAndAllBothExist |
Extensive domain and the domain begins with ‘all.’ can not exist at the same time. |
400 |
泛域名与all.开头域名不能同时存在。 |
CdnTypeNotSupportExtensiveDomain |
Extensive domain not supported for this cdn type. |
400 |
泛域名不支持该业务类型。 |
ExtensiveAndSpecificDomainConflict |
Extensive domain and corresponding specific domain are mutually exclusive. |
400 |
泛域名与对应同级别精确域名互斥。 |
InvalidParameter |
Add live region parameters have error. |
400 |
添加的直播region信息时出错。 |
InvalidRegion.Malformed |
Specified Region is malformed. |
400 |
region参数不正确。 |
InvalidResourceGroupId.Malformed |
Specified ResourceGroupId is malformed. |
400 |
ResourceGroupId参数不正确。 |
EntityNotExists.ResourceGroup |
The resource group does not exist. |
400 |
资源组不存在。 |
InvalidStatus.ResourceGroup |
It’s now allowed to do this operation because of the current status of resource-group. |
400 |
资源组状态检查失败。 |
InvalidPriorities.Malformed |
The length of priorities is not the same with source. |
400 |
优先级个数与源站个数不同。 |
NotInternationRealIdentity |
You need to do real name authentication when you use Chinese mainland resources. |
400 |
用中国大陆资源时,账号需要国际认证。 |
在文档使用中是否遇到以下问题
更多建议
匿名提交