AddLiveDomain - 添加直播域名

更新时间:
复制为 MD 格式

调用该接口添加直播域名,一次只能提交一个域名。

接口说明

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

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

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

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

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

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

QPS 限制

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

调试

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

调试

授权信息

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

  • 操作:是指具体的权限点。

  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。

  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:

    • 对于必选的资源类型,用前面加 * 表示。

    • 对于不支持资源级授权的操作,用全部资源表示。

  • 条件关键字:是指云产品自身定义的条件关键字。

  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。

操作

访问级别

资源类型

条件关键字

关联操作

live:AddLiveDomain

create

*全部资源

*

请求参数

名称

类型

必填

描述

示例值

LiveDomainType

string

域名业务类型。取值:

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

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

liveVideo

DomainName

string

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

example.aliyundoc.com

Region

string

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

  • cn-beijing:北京。

  • cn-shanghai:上海。

  • cn-shenzhen:深圳。

  • cn-qingdao:青岛。

  • ap-southeast-1:新加坡。

  • eu-central-1:德国。

  • ap-northeast-1:东京。

  • ap-southeast-5:雅加达。

说明

Region(直播域名单元化信息)与 Scope(加速区域)之间不存在相互限制。

cn-beijing

CheckUrl

string

健康检测 URL。

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

Scope

string

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

  • domestic(默认值):中国内地。

  • overseas:海外及港澳台加速。

  • global:全球加速。

domestic

TopLevelDomain

string

顶级接入域。

learn.aliyundoc.com

ResourceGroupId

string

资源组 ID。关于资源组的更多信息,请参见什么是资源组

rg-aekzw******

Tag

array<object>

标签列表。

object

标签列表。

Key

string

标签健。

TestKey

Value

string

标签值。

TestValue

返回参数

名称

类型

描述

示例值

object

RequestId

string

请求 ID。

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

示例

正常返回示例

JSON格式

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

异常返回示例

JSON格式

{
	"Code":"InternalError",
	"HostId":"live.aliyuncs.com",
	"Message":"The request processing has failed due to some unknown error.",
	"RequestId":"6EBD1AC4-C34D-4BE1-963E-B688A228BE31"
}

错误码

HTTP status code

错误码

错误信息

描述

400 InvalidDomainName.Malformed Specified DomainName is malformed.
400 InvalidRegion.Malformed Specified Region is malformed. 指定的区域无效。
400 InvalidSource.Content.Malformed Specified source content is malformed.
400 InvalidTypeContent.Mismatch Specified source type does not math the specified source content.
400 MissingSource.Content Specified source content is mandatory for this action.
400 MissingSource.Type Specified source type is mandatory for this action.
400 InvalidSource.Type.Malformed Specified source type is malformed.
400 InvalidSource.Priority.Malformed Specified source priority is malformed.
400 InvalidScope.Malformed Specified Scope is malformed.
400 SourceIp.Exceed The Certificate you provided is malformed!
400 InvalidCertificate The Certificate you provided is malformed!
400 InvalidCertificate.TooLong The Certificate you provided is over the max length!
400 InnerAddDomainDenied Your account haven't bind aoneId, can not add domain.
400 CheckSourceHealthFailed sources ip or source domain check health failed,please input right source.
400 ExtensiveAndAllBothExist Extensive domain and the domain begins with 'all.' can not exist at the same time.
400 CdnTypeNotSupportExtensiveDomain Extensive domain not supported for this cdn type.
400 ExtensiveAndSpecificDomainConflict Extensive domain and corresponding specific domain are mutually exclusive. 泛域名与对应的精确域名冲突
400 InvalidDomainNameLevel Domain name suffixed with alicdn.com only support third level.
400 TopLevelDomain.NotFound TopLevelDomain is not exist.
400 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 NotInternationRealIdentity You need to do real name authentication when you use Chinese mainland resources. 你需要使用真正的授权身份来访问中国大陆的资源
400 RecordCheckNotAvailable Please try again later.
400 IcpBlack The domain is on the ICP blacklist.
400 IspBlack The domain is on the ISP blacklist.
400 DomainNotRecordedAliyun The domain not access Ali Cloud for the record please access.
400 Abs.CheckUrl.Malformed The CheckUrl you provided is malformed!
400 DomainOwnerVerifyFail Owner verification of the root domain failed.
400 TopLevelDomain.Mismatch The specified TopLevelDomain does not match webSiteType.
400 InvalidResourceGroupId.Malformed Specified ResourceGroupId is malformed.
400 DomainReserved The root domain of your domain is reserved by another account. 此域名的根域名已添加到其他账号。
400 ExceedLimit The number of domains has exceeded the limit. 拥有的域名数量已经超过上限。
400 LockFail Domain has been occupied. 域名当前在占用中,请稍后再试。
403 AccountException Account exception. Please open ticket to make an appeal.
403 EntityNotExist.ResourceGroup The resource group does not exist. 资源组不存在。
404 InvalidUser The user's account is invalid.

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

变更历史

更多信息,参考变更详情