全部產品
Search
文件中心

:BatchSetVodDomainConfigs - 大量設定網域名稱

更新時間:Dec 15, 2025

調用本介面大量設定加速網域名稱。

介面說明

  • 目前服務地址僅支援:華東 2(上海)

  • 一次最多支援配置 50 個網域名稱。

  • 調用本介面給網域名稱配置某些功能後,將會產生唯一的 ConfigId,通過 ConfigId 可以完成更新和刪除網域名稱配置的操作。本介面調用成功後不返回 ConfigId,需要通過 DescribeVodDomainConfigs 介面查詢。

調試

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

調試

授權資訊

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

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

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

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

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

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

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

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

操作

存取層級

資源類型

條件關鍵字

關聯操作

vod:BatchSetVodDomainConfigs

update

*全部資源

*

請求參數

名稱

類型

必填

描述

樣本值

DomainNames

string

點播加速網域名稱。多個網域名稱之間使用半形逗號(,)分隔。一次最多支援配置 50 個網域名稱。

example.com

Functions

string

功能列表。

  • functionName(功能名稱,必填):可配置的功能及功能名稱參數請參見網域名稱配置功能函數

  • argName(參數名稱,必填):functionName 的配置項(可配置多個配置項)。

  • argValue(參數值,必填):functionName 的配置項的取值。

點播加速網域名稱支援配置的功能及各功能名稱和參數名稱等詳細資料,請參見網域名稱配置功能函數

說明

某些功能,如 filetype_based_ttl_set(設定檔到期時間),可以設定多條配置規則,當需要更新其中某條配置規則時,可通過該條配置規則的 configId 來指定。配置樣本如下: [{"functionArgs":[{"argName":"file_type","argValue":"jpg"},{"argName":"ttl","argValue":"18"},{"argName":"weight","argValue":"30"}],"functionName":"filetype_based_ttl_set","configId":5068995}]

[{"functionArgs":[{"argName":"domain_name","argValue":"www.example.com"}],"functionName":"set_req_host_header"}]

返回參數

名稱

類型

描述

樣本值

object

返回結果。

RequestId

string

請求 ID。

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

樣本

正常返回樣本

JSON格式

{
  "RequestId": "04F0F334-1335-436C-****-6C044FE73368"
}

錯誤碼

HTTP status code

錯誤碼

錯誤資訊

描述

400 InvalidFunctions.Malformed The specified Functions is incorrectly formatted.
400 InvalidArgValue.Malformed The specified ArgValue is invalid.
400 Invalid%s.ValueNotSupported [%s] is not supported.
400 Invalid%s.Malformed The specified ArgValue [%s] is invalid.
400 MissingParameter%s The specified value of ArgName[%s] is missing.
400 InvalidFunctionArgs.Malformed The specified FunctionArgs is invalid.
400 MissingParameter The specified ArgValue is missing.
400 InvalidHeaderKey.ValueNotSupported The specified value of parameter HeaderKey is not supported.
400 TooManyDomains The count of domain is over 50.
400 InvalidRule.Malformed %s
400 InvalidFunction.NotSupported The domain is not supported to set the function.
400 InvalidDomain.BelongToConfigGroup This Domain activated in configuration group and should modify by config group.
400 EntityNotExist.Role EntityNotExist.Role
400 MissingParameterFunctions The specified value of Functions is missing.
400 NoPermission.SLR The current user does not have permission to create servicelinkedrole. Please contact the Alibaba Cloud account or administrator to authorize AliyunCDNFullAccess or custom policy:Service Name:cdn-ddos.cdn.aliyuncs.com,Role: AliyunServiceRoleForCDNAccessingDDoS,Permission: ram: CreateServiceLinkedRole
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. 超過預設規則數量1條限制,如需提升數量,請提交工單諮詢。
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.
400 ServiceInvokeFailed Failed to invoke service.
400 ConfigurationConflicts Failed to modify the parameter settings in the production environment because the parameter settings are different from those in the staging environment. Set parameters in the staging environment before you publish them to the production environment. 現在類比環境的配置和生產環境配置不一致,無法直接修改生產環境配置。請您前往類比環境完成您所需的配置,然後發布到生產環境進行覆蓋。

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

變更歷史

更多資訊,參考變更詳情