全部產品
Search
文件中心

:ModifyCdnDomain - 修改網域名稱基礎資訊

更新時間:Dec 14, 2025

調用ModifyCdnDomain修改加速網域名稱基礎資訊。

介面說明

說明

單使用者調用頻率:30 次/秒。

調試

您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。

調試

授權資訊

下表是API對應的授權資訊,可以在RAM權限原則語句的Action元素中使用,用來給RAM使用者或RAM角色授予調用此API的許可權。具體說明如下:

  • 操作:是指具體的許可權點。

  • 存取層級:是指每個操作的存取層級,取值為寫入(Write)、讀取(Read)或列出(List)。

  • 資源類型:是指操作中支援授權的資源類型。具體說明如下:

    • 對於必選的資源類型,用前面加 * 表示。

    • 對於不支援資源級授權的操作,用全部資源表示。

  • 條件關鍵字:是指雲產品自身定義的條件關鍵字。

  • 關聯操作:是指成功執行操作所需要的其他許可權。操作者必須同時具備關聯操作的許可權,操作才能成功。

操作

存取層級

資源類型

條件關鍵字

關聯操作

cdn:ModifyCdnDomain

update

*Domain

acs:cdn:*:{#accountId}:domain/{#DomainName}

請求參數

名稱

類型

必填

描述

樣本值

DomainName

string

加速網域名稱,僅支援修改單個網域名稱。

example.com

Sources

string

回源地址清單。

說明

不支援同時傳入 SourcesTopLevelDomain 參數,如果您同時傳入 SourcesTopLevelDomain 參數,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 設定才有效。

說明

不支援同時傳入 SourcesTopLevelDomain 參數,如果您同時傳入 SourcesTopLevelDomain 參數,TopLevelDomain 將不生效。

aliyundoc.com

Sources 各欄位含義如下所示。

參數類型是否必選描述
typeString來源站點類型。
ipaddr:IP 來源站點。
domain:標題來源站。
oss:OSS Bucket 為來源站點。
fc_domain:Function Compute來源站點。



contentString回源地址,可以是 IP 或網域名稱。
portInteger連接埠,可以指定 80、443,也可以自訂連接埠,預設值為 80。443 是 HTTPS 協議回源。
priorityString來源站點地址對應的優先順序,支援 20 和 30,預設值為 20。20 是主源,30 是備源。
weightString回源權重,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.

訪問錯誤中心查看更多錯誤碼。

變更歷史

更多資訊,參考變更詳情