全部產品
Search
文件中心

ApsaraVideo VOD:BatchSetVodDomainConfigs

更新時間:Jul 21, 2026

呼叫本介面批次設定加速網域。

介面說明

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

  • 一次最多支援設定 50 個網域。

  • 呼叫本介面為網域設定某些功能後,將會產生唯一的 ConfigId,透過 ConfigId 可以完成更新和刪除網域設定的操作。本介面呼叫成功後不會回傳 ConfigId,需要透過 DescribeVodDomainConfigs 介面查詢。

調試

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

調試

授權資訊

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

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

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

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

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

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

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

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

操作

存取層級

資源類型

條件關鍵字

關聯操作

vod:BatchSetVodDomainConfigs

update

*All Resource

*

請求參數

名稱

類型

必填

描述

樣本值

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.
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.

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

變更歷史

更多資訊,參考變更詳情