全部產品
Search
文件中心

Edge Security Acceleration:AddDcdnDomain

更新時間:Oct 26, 2026

呼叫AddDcdnDomain新增網域。

介面說明

  • 建立網域之前,您必須先啟用 DCDN 服務。具體操作,請參閱 OpenDcdnService 。

  • 如果加速區域選擇的是僅中國內地或全球,則加速網域必須已完成備案。

  • 當您首次將新網域新增至阿里雲 DCDN 時,需按要求進行網域所有權驗證。具體操作,請參閱 VerifyDcdnDomainOwner 。

  • 每次只能新增一個加速網域,每個使用者預設最多可以新增 50 個網域,如果需要新增更多網域,您可以透過配額中心申請。

  • 每個使用者每小時最多呼叫 100 次。

調試

您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。

調試

授權資訊

下表是API對應的授權資訊,可以在RAM權限原則語句的Action元素中使用,用來給RAM使用者或RAM角色授予調用此API的許可權。具體說明如下:

  • 操作:是指具體的許可權點。

  • 存取層級:是指每個操作的存取層級,取值為寫入(Write)、讀取(Read)或列出(List)。

  • 資源類型:是指操作中支援授權的資源類型。具體說明如下:

    • 對於必選的資源類型,用前面加 * 表示。

    • 對於不支援資源級授權的操作,用全部資源表示。

  • 條件關鍵字:是指雲產品自身定義的條件關鍵字。

  • 關聯操作:是指成功執行操作所需要的其他許可權。操作者必須同時具備關聯操作的許可權,操作才能成功。

操作

存取層級

資源類型

條件關鍵字

關聯操作

dcdn:AddDcdnDomain

create

*Domain

acs:dcdn:*:{#accountId}:domain/{#DomainName}

無 無

請求參數

名稱

類型

必填

描述

樣本值

DomainName

string

是

待新增的加速網域,僅支援新增單一網域。

支援新增泛網域,以點號(.)開頭,例如.example.com。

example.com

ResourceGroupId

string

否

資源群組 ID。未傳遞此參數時,系統會自動補齊預設資源群組 ID。

rg-acfmyuji4b6r4**

Sources

string

否

回源位址清單。

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

CheckUrl

string

否

健康檢查 URL。

www.example.com/test.html

Scope

string

否

加速區域。取值:

  • domestic:僅中國內地。

  • overseas:全球(不包含中國內地)。

  • global:全球。

預設取值為 domestic。

domestic

TopLevelDomain

string

否

頂級接入網域。

yourTopLevelDomain

Tag

array<object>

否

標籤資訊。最多 20 個標籤。

object

否

Key

string

否

標籤鍵。

env

Value

string

否

標籤值。

value

FunctionType

string

否

運算服務類型。取值:

  • routine:程式。

  • image:映像。

  • cloudFunction:函數。

routine

Sources 各欄位含義如下所示。

參數類型是否必選描述
typeString是來源站類型。ipaddr:IP 來源站;domain:網域來源站;oss:OSS Bucket 為來源站。
contentString是回源位址,可以是 IP 或網域。
portInteger否可以指定 443、80 連接埠,也可以自訂連接埠,預設值 80。443 是 HTTPS 協定回源。
priorityString否來源站位址對應的優先順序,支援 20 和 30,預設 20。20 是主源,30 是備源。
weightString否回源權重,100 以內,預設 10。

返回參數

名稱

類型

描述

樣本值

object

RequestId

string

請求 ID。

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

樣本

正常返回樣本

JSON格式

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

錯誤碼

HTTP status code

錯誤碼

錯誤資訊

描述

400 InvalidDomainName.Malformed The specified DomainName is invalid. 指定的網域無效。
400 InvalidSource.Content.Malformed The specified Source Content is invalid. 來源站資訊錯誤,請重新填寫。
400 MissingSource.Content The Source Content must be specified. Source Content 為必填項,請填寫後重試。
400 MissingSource.Type The Source Type must be specified. Source Type 為必填項,請填寫後重試。
400 InvalidSource.Type.Malformed The specified Source Type is invalid. Source Type 格式錯誤,請重新填寫。
400 InvalidSource.Priority.Malformed The specified Source Priority is invalid. Source Priority 格式錯誤,請填寫正確的格式。
400 InvalidScope.Malformed The specified Scope is invalid. Scope 錯誤,請填寫正確的 Scope 後重新請求。
400 SourceIp.Exceed The maximum number of back-to-origin IP addresses is exceeded. 回源 IP 數量超過限額。
400 InvalidCertificate The specified certificate format is invalid. Certificate 格式錯誤,請填寫正確的 Certificate 後重試。
400 InvalidCertificate.TooLong The maximum length of the certificate is exceeded. Certificate 長度超過限制。
400 CheckSourceHealthFailed Error checking the security. Provide the valid origin site information. 來源站檢查失敗,請提供正確的來源站資訊。
400 ExtensiveAndAllBothExist A wildcard domain name and a domain name with an all. prefix cannot be both specified. 泛網域與 all. 開頭網域不能同時存在。
400 CdnTypeNotSupportExtensiveDomain Wildcard domain names are not supported. 不支援萬用字元網域。
400 ExtensiveAndSpecificDomainConflict The wildcard domain name overlaps a domain name at the same level. 泛網域和同級精確網域互斥,請重新新增。
400 InvalidResourceGroupId.Malformed The specified ResourceGroupId is invalid. ResourceGroupId 錯誤,請填寫正確的 ResourceGroupId。
400 DomainReserved The root domain of your domain is reserved by another account. Submit a ticket to contact customer support. 該網域的根網域已被其他帳號佔用,若需要新增請提交工單處理。
400 InvalidDomainNameLevel The alicdn.com domain supports a maximum of three levels of domain. alicdn.com(針對泛網域)最多支援三級網域。
400 EntityNotExists.ResourceGroup The resource group does not exist. 該資源群組不存在。
400 InvalidStatus.ResourceGroup The current status of the resource group does not support this operation. 資源群組目前狀態不允許進行此操作。
400 NotInternationRealIdentity Real-name registration is required for services offered in Mainland China. 根據中華人民共和國法律規定,在中國境內購買使用資訊服務的使用者需要進行實名登記。
400 TopLevelDomain.NotFound The specified TopLevelDomain does not exist. 頂級接入網域不存在。
400 RecordCheckNotAvailable The ICP filing interface is unavailable. Please try again later. 備案檢查異常,請稍後重試。
400 IcpBlack The domain is on the ICP blacklist. 網域在工信部黑名單中。
400 IspBlack The domain is on the ISP blacklist. 網域在阿里雲黑名單中。
400 InvalidCheckUrl.Malformed The specified CheckUrl is invalid. CheckUrl 參數不合法。
400 DomainOwnerVerifyFail Owner verification of the root domain failed. 當您首次將新網域新增至阿里雲 DCDN 時,需按要求進行網域歸屬權驗證,待您按要求設定 DNS 解析或檔案驗證後,才能成功新增網域。
400 TopLevelDomain.Mismatch The specified TopLevelDomain does not match webSiteType. 頂級接入網域和網域類型不匹配。
400 DomainInBlacklist The domain is in the blacklist. 該網域在黑名單中。
400 DomainOverLimit The maximum number of domains is exceeded. 網域已達上限。
400 SourceInBlacklist Source is in the blacklist. 來源站在黑名單中。
400 InvalidTagKey The key should not be null, start with "acs:" or "aliyun", contain "http://" or "https://" or have special symbols:.!@#$%?/^&*)(+={}[]",'<>~·`?;.
400 InvalidTagValue The tag value cannot contain these special symbols:http://, https://
400 ReservedTagKey The tag key is used internally as a reserved field and is not allowed to be used.
400 InvalidFunctionType.Malformed The specified FunctionType is invalid.
400 InvalidfunctionType.Malformed FunctionType is malformed.
400 DomainInRiskList The domain you added may be at risk. If you have any questions, please submit a ticket. 您所新增的網域可能存在風險,如有任何疑問,請提交工單。
400 RegionNoResource Resource allocation failed. Please submit a work order to contact customer service. 您選擇的區域沒有對應的資源。

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

變更歷史

更多資訊,參考變更詳情。