讓使用者建立一個新的網站。
介面說明
建立網站之前,您必須擁有可用的套餐執行個體。
如果加速地區包含中國內地,網站必須完成備案。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| SiteName |
string |
是 |
網站名稱。 |
example.com |
| Coverage |
string |
是 |
加速地區。取值:
|
domestic |
| AccessType |
string |
是 |
網站的接入類型。取值:
|
NS |
| InstanceId |
string |
是 |
執行個體 ID,可通過調用 ListUserRatePlanInstances 介面擷取。執行個體 ID 和網站 ID 至少填寫一個,若兩者都填,則以執行個體 ID 為準進行查詢。 |
dbaudit-cn-nwy349jdb03 |
| ResourceGroupId |
string |
否 |
資源群組 ID。不傳該參數時,系統自動補全預設資源群組 ID。 |
rg-acfmw4znnok**** |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
|||
| RequestId |
string |
請求 ID。 |
CB1A380B-09F0-41BB-3C82-72F8FD6DA2FE |
| SiteId |
integer |
網站 ID。 |
1234567890123 |
| NameServerList |
string |
為站台指派的 NS 列表,用半形逗號(,)分隔。當網站的接入方式為 NS 接入時,該欄位有值,需要將網站的 DNS 伺服器修改成這些 NS。隨後即可驗證網站的歸屬權,啟用網站。 |
ns1.example.com,ns2.example.com |
| VerifyCode |
string |
網站的校正碼。當網站的接入方式為 CNAME 接入時,需要在網站的 DNS 伺服器下配置一條記錄名稱為_esaauth.[網站名稱] 、記錄值為校正碼的 TXT 記錄。隨後即可驗證網站的歸屬權,啟用網站。 |
verify_aah9dioasmov**** |
樣本
正常返回樣本
JSON格式
{
"RequestId": "CB1A380B-09F0-41BB-3C82-72F8FD6DA2FE",
"SiteId": 1234567890123,
"NameServerList": "ns1.example.com,ns2.example.com",
"VerifyCode": "verify_aah9dioasmov****"
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | ServiceInvokeFailed | The call to the internal service failed. The engineer is resolving the problem. Please wait a moment before trying, or contact customer service for details. | 調用服務失敗,請稍後重試或聯絡客服諮詢詳情。 |
| 400 | InternalException | Failed to call the service. Try again later or contact technical support. | 調用服務失敗,請稍後重試或聯絡客服諮詢詳情。 |
| 400 | InvalidParameter | The specified parameter is invalid. | 輸入參數規範校正失敗。 |
| 400 | Instance.NotOnline | Your plan is unavailable due to an overdue payment. Complete the payment first. | 您的套餐執行個體因欠費當前處於非上線狀態,請先完成續約操作以繼續使用。 |
| 400 | InvalidParameter.SiteName | Invalid website name. Specify a valid name that contains letters and digits and does not contain special characters. | 網站名稱無效,請重新輸入網站名稱,可以包含字母和數字,不能包含特殊字元。 |
| 400 | QuotaExceed.SiteCount | The maximum number of websites associated with your plan has been reached. | 網站數量超出配額限制。 |
| 400 | Site.Conflict | Duplicate website names exist across multiple accounts. Rename or delete one and try again. | 網站衝突,多個賬戶下存在相同名稱的網站,請刪除或更名後重試。 |
| 400 | Site.AlreadyExist | The website name you specified already exists. Try with another name. | 您輸入的網站已存在,請您重新設定。 |
| 400 | SubSiteUnavailable | Subdomains are allowed only in Enterprise plans. Upgrade your plan to add a subdomain to ESA. | 僅企業版支援以子網域名稱建立網站,請升級您的套餐。 |
| 400 | Site.InvalidCoverage | The selected location is unavailable in your plan. Change the location to one that is covered by the plan and try again. | 您選擇的加速地區不在當前套餐支援範圍內,請更換為套餐支援的加速地區後重試。 |
| 400 | InvalidSiteICP | The specified website does not have an ICP filing or the filing information is invalid. Make sure your website is filed and try again. | 您配置的網站未備案或ICP備案資訊不合法,請確保網站已完成備案後重試。 |
| 400 | InvalidSiteName | Invalid website name. Check and try again. | 您配置的網站名稱不正確,請確保傳入正確的網站名稱後重試。 |
| 400 | Site.InBlacklist | The site name is in the blacklist. | 網站名稱在黑名單中。 |
| 400 | NoPermission | You do not have permissions to access or operate on the resource.Contact your account administrator to attach the AliyunESAFullAccess policy to the current user. | 對當前資源無許可權訪問或者操作。請聯絡您阿里雲賬戶的管理員,以授予您 AliyunESAFullAccess 策略。 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。