閱讀411 返回首頁    go 阿裏雲


添加加速域名__域名操作接口_API 手冊_CDN-阿裏雲

描述

添加加速域名,一次隻能提交一個加速域名,一個用戶最多添加20個域名。

限製條件:

  • 創建加速域名之前, 必須先開通CDN服務。
  • 加速域名必須已備案完成。
  • 源站內容,如果不在阿裏雲平台上,需要審核,審核工作會在下一工作日前完成。

請求參數

參數 類型 必須? 描述
Action String 操作接口名,係統規定參數 取值:AddCdnDomain
DomainName String 需要接入CDN的域名。支持泛域名,以符號“.”開頭,如:.a.com
CdnType String 加速域名的業務類型; 取值:web:圖片及小文件分發;download:大文件下載加速;video:視音頻點播加速;liveStream:直播流媒體加速
SourceType String 源站類型 取值:ipaddr、 domain、OSS分別表示:IP源站、域名源站、OSS Bucket為源站。注:若選擇了直播流媒體加速的業務類型,無需填寫源站類型和信息
SourcePort Integer 可以指定443,80。默認值80。443的話走https回源。oss不支持443
Sources String 回源地址,可以是IP或域名;IP支持最多20個,以逗號區分,域名隻能輸入一個。IP與域名不能同時輸入。除了業務類型為直播流媒體加速無需輸入源站地址外,其他業務類型源站地址必填(內部用戶,類型為common公有源,可以填寫類型枚舉值)

返回參數

名稱 類型 描述
RequestID String 該條任務請求ID

特殊錯誤碼(公共錯誤碼)

ErrorCode 錯誤碼 Message 錯誤信息 HTTP 狀態 語義
InvalidDomainName.Malformed Specified DomainName is malformed. 400 DomainName 參數錯誤
InvalidCdnType.Malformed Specified CdnType is malformed. 400 CdnType 參數錯誤
InvalidSourceType.Malformed Specified SourceType is malformed. 400 SourceType 參數錯誤
InvalidSources.Malformed Specified SourceStr is malformed. 400 回源地址與源站類型不一致
InvaildParameter The Certificate you provided is malformed! 400 https安全加速時證書和密鑰長度和過長
BusinessExist Business exist do not repeated submission 400 該域名正在添加,不用重複提交
DomainAlreadyExist This domain name is exist already 400 該域名已經添加
DomainOverLimit The Number of Domain is over the limit 403 超過域名個數限製
DomainNotRegistration The Domain name is not registered 404 該域名沒有備案
IllegalOperation Illegal domain operate is not permitted. 403 沒有權限執行當前操作
ServiceBusy The specified Domain is configuring, please retry later. 403 域名正在配置中, 請稍後再試
InvalidDomain.NotFound The domain provided does not belong to you. 404 域名不存在或不屬於當前用戶
InnerAddDomainDenied Your account haven’t bind aoneId, can not add domain. 400 內部賬號未綁定aoneId,不能添加域名
ExtensiveAndAllBothExist Extensive domain and the domain begins with ‘all.’ can not exist at the same time. 400 泛域名與all.開頭域名不能同時存在
CdnTypeNotSupportExtensiveDomain Extensive domain not supported for this cdn type. 400 泛域名不支持該業務類型
ExtensiveAndSpecificDomainConflict Extensive domain and corresponding specific domain are mutually exclusive. 400 泛域名與對應同級別精確域名互斥

示例

請求示例:

  1. https://cdn.aliyuncs.com?Action=AddCdnDomain&CdnType=web&SourceType=domain&DomainName=test.com&Sources=test.com&<公共請求參數>

返回示例

JSON格式:

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

XML格式:

  1. <AddCdnDomainResponse>
  2. <RequestId>A22F5DDD-E6B8-4DB4-A210-FF3CA5A82644</RequestId>
  3. </AddCdnDomainResponse>

最後更新:2016-11-23 17:16:03

  上一篇:go CDN API概述__API 手冊_CDN-阿裏雲
  下一篇:go 查詢域名列表__域名操作接口_API 手冊_CDN-阿裏雲