全部产品
Search
文档中心

边缘安全加速:CreateRoutine - 创建边缘函数

更新时间:Jan 15, 2026

创建一个边缘函数(Routine)。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

调试

授权信息

下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:

  • 操作:是指具体的权限点。

  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。

  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:

    • 对于必选的资源类型,用前面加 * 表示。

    • 对于不支持资源级授权的操作,用全部资源表示。

  • 条件关键字:是指云产品自身定义的条件关键字。

  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。

操作

访问级别

资源类型

条件关键字

关联操作

esa:CreateRoutine

none

*全部资源

*

请求参数

名称

类型

必填

描述

示例值

Name

string

边缘函数 Routine 名, 同一个账号下命名唯一。

test-routine1

Description

string

Routine 描述。

the description of this routine

HasAssets

boolean

是否包含 Assets 文件标记。

false

返回参数

名称

类型

描述

示例值

object

Schema of Response

RequestId

string

请求 ID。

EDBD3EB3-97DA-5465-AEF5-8DCA5DC5E395

Status

string

接口操作结果,成功或失败。

OK

示例

正常返回示例

JSON格式

{
  "RequestId": "EDBD3EB3-97DA-5465-AEF5-8DCA5DC5E395",
  "Status": "OK"
}

错误码

HTTP status code

错误码

错误信息

描述

400 RoutineAlreadyExist The routine name already exists. 输入的函数名已存在,请您重新设置。
400 InternalOperationError Failed to call the service. Try again later or contact technical support. 调用服务失败,请稍后重试或联系客服咨询详情。
400 ParameterNotExist The specified parameter does not exist. Check your configurations and try again. 输入参数不存在,请您核对后重试。
400 ServiceNotOpen You have not activated Edge Routine. Activate the service and try again. 您尚未开通边缘函数服务,请开通服务后重试。
400 RoutineNumberExceedQuotaLimit The maximum number of configuration items for the feature has been reached. Adjust your configurations and try again. 当前功能的配置项数量已经超过系统设定的上限,请您调整后重试。
400 DependedByOthers Failed to call the service. Try again later or contact technical support. 调用服务失败,请稍后重试或联系客服咨询详情。
400 RoutineUserServiceStatusHalt Failed to update the configurations because you have overdue payments. 用户处于停机状态,不能进行更新操作。
400 InternalException Failed to call the service. Try again later or contact technical support. 调用服务失败,请稍后重试或联系客服咨询详情。
400 InvalidParameter The specified parameter is invalid. 输入参数规范校验失败。
400 UserOperationStatusIsLocked You are calling an another routine related api. Please wait for the api finished, and try again later. 您正在调用其他操作函数相关的接口,请等待其他接口调用完成后重试。

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

变更历史

更多信息,参考变更详情