获取边缘函数Routine上传测试版本代码的上传信息,用于上传测试版本代码到OSS。
接口说明
上传一次边缘函数 ER 的测试代码,生成一个版本号,占用一个 CodeRev 的代码版本数,仅用作测试使用。
一个边缘函数 ER 最多保留 10 个版本号,超出限制后需要手动调用 DeleteRoutineCodeRevision 删除无用的版本。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
esa:GetRoutineStagingCodeUploadInfo |
none |
*全部资源
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| Name |
string |
是 |
边缘函数 Routine 名。 |
test-routine1 |
| CodeDescription |
string |
否 |
代码描述。 |
the description of code |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
Schema of Response |
||
| RequestId |
string |
请求 ID。 |
EDBD3EB3-97DA-5465-AEF5-8DCA5DC5E395 |
| CodeVersion |
string |
代码版本号。 |
1710120201067203242 |
| OssPostConfig |
object |
上传 OSS 配置信息。 |
{ "Url": "http://oss_fake_bucket_url", "OSSAccessKeyId": "xxx", "key": "site_er_js/hello.1418586423220543.unstable.js", "callback": "xxx==", "x:codeDescription": "xxx=", "policy": "xxx", "Signature": "xxx=" } |
示例
正常返回示例
JSON格式
{
"RequestId": "EDBD3EB3-97DA-5465-AEF5-8DCA5DC5E395",
"CodeVersion": "1710120201067203242",
"OssPostConfig": {
"Url": "http://oss_fake_bucket_url",
"OSSAccessKeyId": "xxx",
"key": "site_er_js/hello.1418586423220543.unstable.js",
"callback": "xxx==",
"x:codeDescription": "xxx=",
"policy": "xxx",
"Signature": "xxx="
}
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | InternalException | Failed to call the service. Try again later or contact technical support. | 调用服务失败,请稍后重试或联系客服咨询详情。 |
| 400 | InvalidParameter | The specified parameter is invalid. | 输入参数规范校验失败。 |
| 400 | RoutineNotExist | The routine name does not exist. Check the routine name and try again. | 输入的函数名不存在,请您核对函数名,再重试。 |
| 400 | InternalOperationError | Failed to call the service. Try again later or contact technical support. | 调用服务失败,请稍后重试或联系客服咨询详情。 |
| 400 | CodeVersionNumberExceedQuotaLimit | The maximum number of code versions in your plan has been reached. Check your plan quota and upgrade the plan to request a quota increase. | 您的代码版本数量已达到套餐上限,请查看您的套餐配额,并升级您的套餐获得更多的代码版本配额数量。 |
| 400 | RoutineUserServiceStatusHalt | Failed to update the configurations because you have overdue payments. | 用户处于停机状态,不能进行更新操作。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。