BatchSetVodDomainConfigs - 批量配置域名

更新时间:
复制 MD 格式

调用本接口批量配置加速域名。

接口说明

  • 目前服务地址仅支持:华东 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. 现在模拟环境的配置和生产环境配置不一致,无法直接修改生产环境配置。请您前往模拟环境完成您所需的配置,然后发布到生产环境进行覆盖。

访问错误中心查看更多错误码。

变更历史

更多信息,参考变更详情