調用AddDcdnDomain添加網域名稱。
介面說明
建立網域名稱之前,您必須先開通 DCDN 服務。具體操作,請參見 OpenDcdnService 。
網域名稱必須已成功備案。
當您首次將新網域名稱添加至阿里雲 DCDN 時,需按要求做網域名稱歸屬權驗證。具體操作,請參見 VerifyDcdnDomainOwner 。
每次只能添加一個加速網域名稱,每個使用者最多可以添加 50 個網域名稱。
如果來源站點內容不在阿里雲平台上,阿里雲平台需要對內容進行審核,審核工作會在下一個工作日前完成。
單使用者調用頻率:30 次/秒。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
dcdn:AddDcdnDomain |
create |
*Domain
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| 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。 |
domestic |
| TopLevelDomain |
string |
否 |
頂級接入域。 |
yourTopLevelDomain |
| Tag |
array<object> |
否 |
標籤資訊。最多 20 個標籤。 |
|
|
object |
否 |
|||
| Key |
string |
否 |
標籤鍵。 |
env |
| Value |
string |
否 |
標籤值。 |
value |
| FunctionType |
string |
否 |
計算服務類型。取值:
|
routine |
Sources 各欄位含義如下所示。
| 參數 | 類型 | 是否必選 | 描述 |
| type | String | 是 | 來源站點類型。ipaddr:IP 來源站點;domain:標題來源站;oss:OSS Bucket 為來源站點。 |
| content | String | 是 | 回源地址,可以是 IP 或網域名稱。 |
| port | Integer | 否 | 可以指定 443、80 連接埠,也可以自訂連接埠,預設值 80。443 是 HTTPS 協議回源。 |
| priority | String | 否 | 來源站點地址對應的優先順序,支援 20 和 30,預設 20。20 是主源,30 是備源。 |
| weight | String | 否 | 回源權重,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. | 資源分派失敗,請提交工單聯絡客服。 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。