文档

AddVodDomain - 添加加速域名

调用AddVodDomain添加点播加速域名。

接口说明

  • 目前服务地址仅支持:华东 2(上海)
  • 创建加速域名之前,您需要先开通点播服务,并且加速域名必须已备案完成。
  • 源站内容。如果不在阿里云平台上,需要审核,审核工作会在下一工作日前完成。
  • 每次只能提交一个加速域名,一个用户最多添加 20 个域名。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息

下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:

  • 操作:是指具体的权限点。
  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:
    • 对于必选的资源类型,用背景高亮的方式表示。
    • 对于不支持资源级授权的操作,用全部资源表示。
  • 条件关键字:是指云产品自身定义的条件关键字。
  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作访问级别资源类型条件关键字关联操作
vod:AddVodDomainWrite
  • Domain
    acs:vod:*:{#accountId}:domain/{#domainId}

请求参数

名称类型必填描述示例值
DomainNamestring

需要接入点播的加速域名。支持泛域名,以英文句号(.)开头,如:.example.com。

example.com
Sourcesstring

回源地址列表。参数详情,请参见下表 Sources

[{"content":"1.1.1.1","type":"ipaddr","priority":"20","port":80}]
CheckUrlstring

健康检测 URL。

www.example.com/test.html
Scopestring

国际用户、中国内地 L3 及以上用户设置有效。 取值范围:

  • domestic(默认):中国大陆。
  • overseas:港澳台及海外。
  • global:全球加速。
domestic
TopLevelDomainstring

顶级接入域。

example.com

Sources

名称类型是否必需描述
typeString源站类型。取值:
ipaddr:IP 源站。
domain:域名源站。
oss:OSS Bucket 为源站。
contentString回源地址,可以是 IP 或域名。
portInteger端口号。可以指定 44380。默认值 80443 端口使用 HTTPS 回源。也可以自定义端口。
priorityString源站地址对应的优先级。支持 2030,默认值为 2020 是主源,30 是备源。

返回参数

名称类型描述示例值
object
RequestIdstring

请求 ID。

15C66C7B-671A-4297-****-2C4477247A74

示例

正常返回示例

JSON格式

{
  "RequestId": "15C66C7B-671A-4297-****-2C4477247A74"
}

错误码

访问错误中心查看更多错误码。

接口错误码

下表列举了本接口特有的错误码。

错误代码错误信息HTTP 状态码说明
InvalidDomainName.MalformedSpecified DomainName is malformed.400DomainName 参数错误
InvalidCdnType.MalformedSpecified CdnType is malformed.400CdnType 参数错误。
InvalidSourceType.MalformedSpecified SourceType is malformed.400SourceType 参数错误。
InvalidSources.MalformedSpecified Sources is malformed.400回源地址与源站类型不一致。
InvalidScope.MalformedSpecified Scope is malformed.400Scope 参数错误。
InvaildParameterThe Certificate you provided is malformed!400HTTPS 安全加速时证书和密钥长度和过长。
BusinessExistBusiness exist do not repeated submission400该域名正在添加,不用重复提交。
DomainAlreadyExistThis domain name is exist already400该域名已经添加。
DomainOverLimitThe Number of Domain is over the limit403超过域名个数限制。
DomainNotRegistrationThe Domain name is not registered404该域名没有备案。
IllegalOperationIllegal domain operate is not permitted.403没有权限执行当前操作。
ServiceBusyThe specified Domain is configuring, please retry later.403域名正在配置中, 请稍后再试。
InvalidDomain.NotFoundThe domain provided does not belong to you.404域名不存在或不属于当前用户。
InnerAddDomainDeniedYour account haven’t bind aoneId, can not add domain.400内部账号未绑定 aoneId,不能添加域名。
ExtensiveAndAllBothExistExtensive domain and the domain begins with ‘all.’ can not exist at the same time.400泛域名与 all.开头域名不能同时存在。
CdnTypeNotSupportExtensiveDomainExtensive domain not supported for this cdn type.400泛域名不支持该业务类型。
ExtensiveAndSpecificDomainConflictExtensive domain and corresponding specific domain are mutually exclusive.400泛域名与对应同级别精确域名互斥。
InvalidParameterAdd live region parameters have error.400添加的直播 region 信息时出错。
InvalidRegion.MalformedSpecified Region is malformed.400region 参数不正确。
InvalidResourceGroupId.MalformedSpecified ResourceGroupId is malformed.400ResourceGroupId 参数不正确。
EntityNotExists.ResourceGroupThe resource group does not exist.400资源组不存在。
InvalidStatus.ResourceGroupIt’s now allowed to do this operation because of the current status of resource-group.400资源组状态检查失败。
InvalidPriorities.MalformedThe length of priorities is not the same with source.400优先级个数与源站个数不同。
NotInternationRealIdentityYou need to do real name authentication when you use Chinese mainland resources.400用中国大陆资源时,账号需要国际认证。
  • 本页导读 (1)
文档反馈