全部產品
Search
文件中心

Edge Security Acceleration:BatchSetDcdnDomainConfigs - 大量設定網域名稱

更新時間:Sep 16, 2025

調用BatchSetDcdnDomainConfigs實現網域名稱大量設定功能。

介面說明

  • 單次配置的網域名稱數量不超過 50 個。

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

調試

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

調試

授權資訊

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

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

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

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

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

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

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

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

操作

存取層級

資源類型

條件關鍵字

關聯操作

dcdn:BatchSetDcdnDomainConfigs

update

*domain

acs:dcdn:*:{#accountId}:domain/{#domainName}

請求參數

名稱

類型

必填

描述

樣本值

DomainNames

string

加速網域名稱,多個網域名稱用半形逗號(,)分隔,注意以下配置限制:

  • 一次最多傳 50 個網域名稱。

  • 網域名稱個數乘以 Functions 個數,小於等於 50。

example.com,example.org

Functions

string

功能列表,一次傳入最多 50 條,格式如下:

  • functionName(功能名稱):可配置功能請參見功能列表,多個參數之間用半形逗號(,)分隔。

  • argNamefunctionName 的配置項(可配置多個配置項)。

  • argValuefunctionName 的配置項的取值。

  • parentid(規則條件 ID,非必填):通過配置網域名稱配置功能參數中的功能函數 condition(規則引擎),可以建立出規則條件(規則條件可以通過識別使用者請求中攜帶的各種參數來匹配和過濾使用者請求),每一個規則條件被建立以後都會產生一個對應的 configid ,configid 可以被當作 ParentId 參數被其他功能函數引用,這樣規則條件就可以與功能配置一起組合形成更靈活的配置。

[
 {
   "functionArgs": [
    {
     "argName": "功能參數 A", 
     "argValue": "功能參數 A 對應的值"
    }, 
  {
    "argName": "功能參數 B", 
    "argValue": "功能參數 B 對應的值"
     }
 ], 
 "functionName": "功能名稱"
    }
]

[{"functionArgs":[{"argName":"switch","argValue":"on"},{"argName":"region","argValue":"*"}],"functionName":"ipv6"}]

返回參數

名稱

類型

描述

樣本值

object

RequestId

string

請求 ID。

04F0F334-1335-436C-A1D7-6C044FE73368

DomainConfigList

object

DomainConfigModel

array<object>

網域名稱配置清單。

object

ConfigId

integer

配置 ID,如果返回為 0,則表示該條配置未配置成功,需要重新設定。

123456

DomainName

string

網域名稱。

www.example.com

FunctionName

string

功能名稱。

set_resp_header

樣本

正常返回樣本

JSON格式

{
  "RequestId": "04F0F334-1335-436C-A1D7-6C044FE73368",
  "DomainConfigList": {
    "DomainConfigModel": [
      {
        "ConfigId": 123456,
        "DomainName": "www.example.com",
        "FunctionName": "set_resp_header"
      }
    ]
  }
}

錯誤碼

HTTP status code

錯誤碼

錯誤資訊

描述

400 InvalidFunctions.Malformed The specified Functions is invalid. 不支援該配置,請重新填寫。
400 InvalidArgValue.Malformed The specified ArgValue is invalid. ArgValue錯誤,請重新填寫。
400 Invalid%s.ValueNotSupported [%s] is not supported. 不支援該設定。
400 Invalid%s.Malformed The specified ArgValue [%s] is invalid. 不支援該ArgValue,請填寫正確的ArgValue。
400 MissingParameter You must specify ArgValue. 缺少參數。
400 InvalidRule.Malformed %s %s
400 InvalidHeaderKey.ValueNotSupported The specified value of parameter HeaderKey is not supported. HeaderKey的值不合法。
400 MissingParameter%s The specified value of ArgName %s is missing. 缺少參數。
400 InvalidParameter Domain already exists in high ddos. 開通的網域名稱已經在高防中開通服務
400 ConfigExceedLimit Count of config entries exceeds the limit. 配置條數超過限制。
400 EdgeScriptCountExceedLimit The number of rules exceeds the default limit (1). To increase the limit, submit a ticket.
400 EdgeScripOptionsHasInnerConfig The extension has a background configuration or a parameter of this configuration is invalid. For more information, submit a ticket. 擴充項存在後台配置或該配置的參數不合法,如有疑問,請提交工單諮詢
400 EdgeScriptGrammarNotSupport A background customization rule exists or a parameter of this configuration is invalid. For more information, submit a ticket. 存在後台定製規則或該配置的參數不合法,如有疑問,請提交工單諮詢
400 EdgeScriptNotSupportJs JavaScript rules are not supported. For more information, submit a ticket. 未開放JS規則,如有疑問,請提交工單諮詢
400 ServiceInvokeFailed Failed to invoke service. 調用內部服務失敗。
400 ConfigParentExceedLimit Config Parent exceed limit. 已引用的進階條件規則超過5條
400 BatchSetBusinessError some configs error:%s 發生配置錯誤:%s
400 Function.InvalidParentId The specified parentId does not exist. 指定的規則條件不存在
400 Domain.DDosQuotaFull The user’s domain quota for DDos is full. 防護網域名稱數量已達上限,請變更配置加購網域名稱數量
400 AccountArrears The user‘s account is in arrears. 您的帳號已欠費,無法操作
400 DDosExpired The user‘s DDoS protection has expired. 您的DDoS防護已到期,無法操作
400 Domain.DDosAlreadyExists This specified domain has been in DDoS. 該網域名稱已接入阿里雲高防產品,請刪除後再接入DCDN DDoS防護
400 Domain.PortConfiguring This specified domain's special ports are configuring. 網域名稱的特殊連接埠配置中,請稍後
400 Domain.PortAllocateError Your port resource allocation failed, please try again in 30 minutes. 您本次提交的自訂連接埠資源分派失敗,請30分鐘後重試。多次重試失敗可提交工單處理

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

變更歷史

更多資訊,參考變更詳情