BatchAddCdnDomain - 大量新增網域名稱
調用BatchAddCdnDomain可以實現大量新增加速網域名稱,一次最多可以添加50個加速網域名稱。
介面說明
添加加速網域名稱之前,必須先開通 CDN 服務。具體操作,請參見開通 CDN 服務。
如果加速地區選取項目的是僅中國內地或者全球,則加速網域名稱必須已完成備案。
支援批量查詢網域名稱,多個網域名稱用半形逗號(,)分隔,一次最多支援 50 個網域名稱查詢。
每個使用者每小時最多調用 100 次。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
cdn:BatchAddCdnDomain |
create |
*Domain
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| CdnType |
string |
是 |
加速網域名稱的業務類型。取值:
|
web |
| DomainName |
string |
是 |
需要接入 CDN 的加速網域名稱,多個網域名稱用英文逗號(,)分隔。 |
example.com,aliyundoc.com |
| ResourceGroupId |
string |
否 |
資源群組 ID,不傳時,自動補全預設資源群組 ID。 |
rg-acfmyuji4b6r4** |
| Sources |
string |
是 |
回源地址清單。 |
[ { "content": "192.0.2.0", "type": "ipaddr", "priority": "20", "port": 80, "weight": "15" } ] |
| CheckUrl |
string |
否 |
檢測 URL。 |
url |
| Scope |
string |
否 |
加速地區。取值:
|
domestic |
| TopLevelDomain |
string |
否 |
頂級接入域。 |
example.com |
Sources 各欄位含義如下所示。
| 參數 | 類型 | 是否必選 | 描述 |
| type | String | 是 | 來源站點類型。 ipaddr:IP 來源站點。 domain:標題來源站。 oss:OSS Bucket 為來源站點。 fc_domain:Function Compute來源站點。 |
| content | String | 是 | 回源地址,可以是 IP 或網域名稱。 |
| port | Integer | 否 | 連接埠,可以指定 443、80(預設值),也可以自訂連接埠。443 是 HTTPS 協議回源。 |
| priority | String | 否 | 來源站點地址對應的優先順序,支援 20(預設值)和 30。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 | Specified DomainName is malformed. | 網域名稱格式錯誤或批量新增不支援泛網域名稱。 |
| 400 | MissingParameter | The input parameter cdnType that is mandatory for processing this request is not supplied. | 參數cdnType為必填。 |
| 400 | InvalidCdnType.Malformed | Specified CdnType is malformed. | 參數CdnType不支援該參數值, 取值:web:圖片及小檔案分發;download:大檔案下載加速;video:視音頻點播加速; |
| 400 | InvalidSources.Malformed | Specified Sources is malformed. | 來源站點地址格式錯誤。 |
| 400 | InvalidSourceType.Malformed | Specified CdnType is malformed. | CdnType格式錯誤。 |
| 400 | InvalidSource.Priority.Malformed | The specified Source Priority is invalid. | |
| 400 | InvalidTypeAndContent.MissMatch | InvalidTypeAndContent.MissMatch | |
| 400 | InvalidScope.Malformed | Specified Scope is malformed. | Scope格式錯誤。 |
| 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 has not bind aoneId, can not add domain. | 您的賬戶沒有綁定aoneId,不能添加網域名稱。 |
| 400 | CheckSourceHealthFailed | sources ip or source domain check health failed,please input right source. | 源IP或源域檢查錯誤, 請輸入正確的源。 |
| 400 | ExtensiveAndAllBothExist | Extensive domain and the domain begins with all. can not exist at the same time. | 泛網域名稱與all.開頭網域名稱不能同時存在。 |
| 400 | CdnTypeNotSupportExtensiveDomain | Extensive domain not supported for this cdn type. | 泛網域名稱不支援該業務類型,目前泛網域名稱只支援圖片小檔案加速,大檔案下載加速,ApsaraVideo for VOD加速,請知悉。 |
| 400 | ExtensiveAndSpecificDomainConflict | The number of wildcard domain names exceeds the limit. | |
| 400 | InvalidResourceGroupId.Malformed | Specified ResourceGroupId is malformed. | 參數ResourceGroupId格式錯誤。 |
| 400 | DomainReserved | The root domain of your domain is reserved by another account. Submit a ticket to contact customer support. | |
| 400 | InvalidDomainNameLevel | Domain name suffixed with alicdn.com only support third level. | alicdn.com(針對泛網域名稱)最多支援第三層網域名。 |
| 400 | InvalidTopLevelDomain.Malformed | Specified TopLevelDomain is malformed. | 參數TopLevelDomain錯誤。 |
| 400 | TopLevelDomain.NotFound | TopLevelDomain is not exist. | TopLevelDomain不存在。 |
| 400 | EntityNotExists.ResourceGroup | The resource group does not exist. | 資源群組不存在。 |
| 400 | EntityNotExist.ResourceGroup | The resource group does not exist. | 該資源群組不存在。 |
| 400 | InvalidStatus.ResourceGroup | It is not 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 | 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 | DomainOwnerVerifyFail | Owner verification of the root domain failed. | 當您首次將新網域名稱添加至阿里雲CDN時,需按要求做網域名稱歸屬權驗證,當您按要求配置DNS解析或檔案驗證後,才能正常成功添加網域名稱。 |
| 400 | TopLevelDomain.Mismatch | The specified TopLevelDomain does not match webSiteType. | 頂級接入域和網域名稱類型不符。 |
| 400 | DomainOverLimit | The maximum number of domains is exceeded. | 網域名稱數量超過上限 |
| 400 | DomainInRiskList | The domain you added may be at risk. If you have any questions, please submit a ticket. | 您所添加的網域名稱可能存在風險,如有任何疑問,請提交工單。 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。