全部產品
Search
文件中心

ApsaraVideo Live:AddLiveDomain

更新時間:Jul 20, 2026

呼叫此介面新增直播網域,一次只能提交一個網域。

介面說明

  • 新增直播網域之前,必須先開通影片直播服務。具體操作請參見開通服務

  • 新增新的網域時,必須先進行驗證,再呼叫此介面新增網域。您可以選擇 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。

枚舉值:

  • liveEdge :

    邊緣推流網域。

  • liveGrtnPub :

    grtn 推流網域。

  • liveGrtnSub :

    grtn 播流網域。

  • liveVideo :

    播流網域。

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"
}

錯誤碼

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.

訪問錯誤中心查看更多錯誤碼。

變更歷史

更多資訊,參考變更詳情