調用ModifyCdnDomain修改加速網域名稱基礎資訊。
介面說明
單使用者調用頻率:30 次/秒。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
cdn:ModifyCdnDomain |
update |
*Domain
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| DomainName |
string |
是 |
加速網域名稱,僅支援修改單個網域名稱。 |
example.com |
| Sources |
string |
否 |
回源地址清單。 說明
不支援同時傳入 Sources 和 TopLevelDomain 參數,如果您同時傳入 Sources 和 TopLevelDomain 參數,TopLevelDomain 將不生效。 |
[{"content":"1.1.1.1","type":"ipaddr","priority":"20","port":80,"weight":"15"}] |
| ResourceGroupId |
string |
否 |
資源群組 ID。 |
rg-acfmyuji4b6r4** |
| TopLevelDomain |
string |
否 |
頂級接入域。只有白名單使用者 CDN_TOP_LEVEL_DOMAIN_GREY_USER_LIST 設定才有效。 說明
不支援同時傳入 Sources 和 TopLevelDomain 參數,如果您同時傳入 Sources 和 TopLevelDomain 參數,TopLevelDomain 將不生效。 |
aliyundoc.com |
Sources 各欄位含義如下所示。
| 參數 | 類型 | 是否必選 | 描述 |
| type | String | 是 | 來源站點類型。 ipaddr:IP 來源站點。 domain:標題來源站。 oss:OSS Bucket 為來源站點。 fc_domain:Function Compute來源站點。 |
| content | String | 是 | 回源地址,可以是 IP 或網域名稱。 |
| port | Integer | 否 | 連接埠,可以指定 80、443,也可以自訂連接埠,預設值為 80。443 是 HTTPS 協議回源。 |
| priority | String | 否 | 來源站點地址對應的優先順序,支援 20 和 30,預設值為 20。20 是主源,30 是備源。 |
| weight | String | 否 | 回源權重,100 以內,預設值為 10。 |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
|||
| RequestId |
string |
請求 ID。 |
16A96B9A-F203-4EC5-8E43-CB92E68F4CD8 |
樣本
正常返回樣本
JSON格式
{
"RequestId": "16A96B9A-F203-4EC5-8E43-CB92E68F4CD8"
}
異常返回樣本
JSON格式
{"RequestId":"16A96B9A-F203-4EC5-8E43-CB92E68F4CD8","HostId":"cdn.aliyuncs.com","Code":"InternalError","Message":"The request processing has failed due to some unknown error."}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | Abs.Sources.Malformed | The specified Sources is invalid. | 指定的來源站點無效。 |
| 400 | MissingDomainName | The domainName parameter is required. | |
| 400 | InvalidDomainName.Malformed | The specified DomainName is invalid. | 網域名稱格式錯誤。 |
| 400 | InvalidSource.Content.Malformed | The specified Source Content is invalid. | 來源站點地址格式錯誤。 |
| 400 | InvalidTypeContent.Mismatch | The specified source type does not match the specified source content. | |
| 400 | MissingSource.Content | The Source Content must be specified. | 缺少來源站點資訊。 |
| 400 | MissingSource.Type | The Source Type must be specified. | |
| 400 | InvalidSource.Type.Malformed | The specified Source Type is invalid. | |
| 400 | InvalidSource.Priority.Malformed | The specified Source Priority is invalid. | |
| 400 | InvalidResourceGroupId.Malformed | The specified ResourceGroupId is invalid. | |
| 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 | TopLevelDomain.NotFound | TopLevelDomain is not exist. | TopLevelDomain不存在。 |
| 400 | InvalidTopLevelDomain.Malformed | Specified TopLevelDomain is malformed. | 參數TopLevelDomain錯誤。 |
| 400 | TopLevelDomain.Mismatch | The specified TopLevelDomain does not match webSiteType. | 頂級接入域和網域名稱類型不符。 |
| 400 | SourceInBlacklist | Source is in the blacklist. | 來源站點在黑名單中。 |
| 403 | DomainInProtectedMode | The domain is in protection mode. To request permission, contact Customer Service. |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。