文档

AddLiveDomain - 添加直播域名

更新时间:

一次只能提交一个域名。

接口说明

使用说明

  • 添加直播域名之前,必须先开通视频直播服务。具体操作请参见开通服务

  • 添加新的域名时,必须先进行验证,再调用本接口添加域名。您可以选择 DNS 解析验证或文件验证。请参见验证域名归属权

  • 使用视频直播需要进行推流和播流,您需要分别添加推流域名和播流域名,一次只能提交一个域名。

  • 完成添加域名操作后,还需要对添加的域名进行 CNAME 解析,请参见配置 CNAME 域名解析

  • 在添加推流域名和播流域名后,您需要关联域名,才能使用视频直播服务,具体操作请参见关联域名

注意 从 2019 年 2 月 19 日起,通过 AddLiveDomain 添加的域名不支持中心推流的方式,通过 CDN API 添加的新域名同样不支持中心推流。请使用边缘推流添加一个推流域名(调用 AddLiveDomain,业务类型为 liveEdge),一个播流域名(调用 AddLiveDomain,业务类型为 liveVideo),并做关联(调用 AddLiveDomainMapping ),2019 年 2 月 19 日之前添加的域名不受影响。

QPS 限制

本接口的单用户 QPS 限制为 30 次/秒。超过限制,API 调用会被限流,这可能会影响您的业务,请合理调用。更多信息,请参见 QPS 限制

调试

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

授权信息

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

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

请求参数

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

域名业务类型。取值:

  • liveVideo:播流域名。如果选择 DomainName(需要接入直播的域名)为播流域名时,则域名业务类型必须选择为 liveVideo。
  • liveEdge:边缘推流域名。如果选择 DomainName(需要接入直播的域名)为推流域名时,则域名业务类型必须选择为 liveEdge。
liveVideo
DomainNamestring

需要接入直播的推流域名或播流域名。支持泛域名,以英文句号(.)开头。

example.aliyundoc.com
Regionstring

直播域名单元化信息。取值:

  • cn-beijing:北京。
  • cn-shanghai:上海。
  • cn-shenzhen:深圳。
  • cn-qingdao:青岛。
  • ap-southeast-1:新加坡。
  • eu-central-1:德国。
  • ap-northeast-1:东京。
  • ap-southeast-5:雅加达。
说明 Region(直播域名单元化信息)与 Scope(加速区域)之间不存在相互限制。
cn-beijing
CheckUrlstring

健康检测 URL。

http://demo.aliyundoc.com/status.html
Scopestring

加速区域。国际用户、中国站 L3 及以上用户设置有效。取值:

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

顶级接入域。

learn.aliyundoc.com

返回参数

名称类型描述示例值
object
RequestIdstring

请求 ID。

16A96B9A-F203-4EC5-8E43-CB92E68F4CD8

示例

正常返回示例

JSON格式

{
  "RequestId": "16A96B9A-F203-4EC5-8E43-CB92E68F4CD8"
}

错误码

HTTP status code错误码错误信息描述
400InvalidDomainName.MalformedSpecified DomainName is malformed.-
400InvalidRegion.MalformedSpecified Region is malformed.指定的区域无效。
400InvalidSource.Content.MalformedSpecified source content is malformed.-
400InvalidTypeContent.MismatchSpecified source type does not math the specified source content.-
400MissingSource.ContentSpecified source content is mandatory for this action.-
400MissingSource.TypeSpecified source type is mandatory for this action.-
400InvalidSource.Type.MalformedSpecified source type is malformed.-
400InvalidSource.Priority.MalformedSpecified source priority is malformed.-
400InvalidScope.MalformedSpecified Scope is malformed.-
400SourceIp.ExceedThe Certificate you provided is malformed!-
400InvalidCertificateThe Certificate you provided is malformed!-
400InvalidCertificate.TooLongThe Certificate you provided is over the max length!-
400InnerAddDomainDeniedYour account haven't bind aoneId, can not add domain.-
400CheckSourceHealthFailedsources ip or source domain check health failed,please input right source.-
400ExtensiveAndAllBothExistExtensive domain and the domain begins with 'all.' can not exist at the same time.-
400CdnTypeNotSupportExtensiveDomainExtensive domain not supported for this cdn type.-
400ExtensiveAndSpecificDomainConflictExtensive domain and corresponding specific domain are mutually exclusive.泛域名与对应的精确域名冲突
400InvalidDomainNameLevelDomain name suffixed with alicdn.com only support third level.-
400TopLevelDomain.NotFoundTopLevelDomain is not exist.-
400EntityNotExists.ResourceGroupThe resource group does not exist.-
400InvalidStatus.ResourceGroupIt's now allowed to do this operation because of the current status of resource-group.-
400NotInternationRealIdentityYou need to do real name authentication when you use Chinese mainland resources.你需要使用真正的授权身份来访问中国大陆的资源
400RecordCheckNotAvailablePlease try again later.-
400IcpBlackThe domain is on the ICP blacklist.-
400IspBlackThe domain is on the ISP blacklist.-
400DomainNotRecordedAliyunThe domain not access Ali Cloud for the record please access.-
400Abs.CheckUrl.MalformedThe CheckUrl you provided is malformed!-
400DomainOwnerVerifyFailOwner verification of the root domain failed.-
400TopLevelDomain.MismatchThe specified TopLevelDomain does not match webSiteType.-
400InvalidResourceGroupId.MalformedSpecified ResourceGroupId is malformed.-
400DomainReservedThe root domain of your domain is reserved by another account.此域名的根域名已添加到其他账号。
400ExceedLimitThe number of domains has exceeded the limit.拥有的域名数量已经超过上限。
400LockFailDomain has been occupied.-
403AccountExceptionAccount exception. Please open ticket to make an appeal.-
404InvalidUserThe user's account is invalid.-

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

变更历史

变更时间变更内容概要操作
2023-05-09OpenAPI 错误码发生变更查看变更详情