调用UploadStagingRoutineCode上传边缘程序ER的测试代码。

说明
  • 上传一次边缘程序ER的测试代码,生成一个版本号,占用一个CodeRev的代码版本数,仅用作测试使用。
  • 该参数自动发布代码为测试环境。
  • 一个边缘程序ER最多保留10个版本号,超出限制后需要手动调用DeleteRoutineCodeRevision删除无用的版本。

调试

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

请求参数

名称 类型 是否必选 示例值 描述
Action String UploadStagingRoutineCode

系统规定参数。取值:UploadStagingRoutineCode

Name String test

边缘程序名, 同一个账号下命名唯一。

CodeDescription String desc

版本描述。

返回数据

名称 类型 示例值 描述
Content Map OssPostConfig和CodeRevision

代码所需要的参数。

RequestId String DFA2027F-86C0-4421-9593-581A7993696C

请求ID。

示例

请求示例

http://dcdn.aliyuncs.com/?Action=UploadStagingRoutineCode&Name="test"&CodeDescription="desc"&<公共请求参数>

正常返回示例

XML格式

<RequestId>DFA2027F-86C0-4421-9593-581A7993696C</RequestId>
<Content>
    <OssPostConfig>
        <OSSAccessKeyId>KiTr</OSSAccessKeyId>
        <Signature>+VaGBmeMjdKTD1E=</Signature>
        <callback>eyJjYWxsYmFja1VybCI6Imh0dHA6Ly9lci1ub2RlYXBpLmFsaXl1bmNzLmNvbS91cGxvYWRfY29kZV9vc3NfY2FsbGJhY2siLCJjYWxsYmFja0JvZHkiOiJPYmplY3Q9JHtvYmplY3R9JkNvZGVEZXNjcmlwdGlvbj0ke3g6Y29kZWRlc2NyaXB0aW9ufSIsImNhbGxiYWNrQm9keVR5cGUiOiJhcHBsaWNhdGlvbi94LXd3dy1mb3JtLXVybGVuY29kZWQifQo=</callback>
        <x:codeDescription>IkhlbGxvIFdvcmxkIg==</x:codeDescription>
        <Url>http://cdn-edgejs.oss-cn-hangzhou.aliyuncs.com</Url>
        <key>test.123.69188190343.js</key>
        <policy>eyJleHBpcmF0aW9uIjoiMjAyMS0wNS0yNlQxMzowNzo0OVoiLCJjb25kaXRpb25zIjpbWyJlcSIsIiRrZXkiLCJ0ZXN0LXNsYy4xMzc3MjkyNjI4ODEwMzI3LjE2MjIwMzQxNjkxODgxOTAzNDMuanMiXSxbImVxIiwiJGNhbGxiYWNrIiwiZXlKallXeHNZbUZqYTFWeWJDSTZJbWgwZEhBNkx5OWxjaTF1YjJSbFlYQnBMbUZzYVhsMWJtTnpMbU52YlM5MWNHeHZZV1JmWTI5a1pWOXZjM05mWTJGc2JHSmhZMnNpTENKallXeHNZbUZqYTBKdlpIa2lPaUpQWW1wbFkzUTlKSHR2WW1wbFkzUjlKa052WkdWRVpYTmpjbWx3ZEdsdmJqMGtlM2c2WTI5a1pXUmxjMk55YVhCMGFXOXVmU0lzSW1OaGJHeGlZV05yUW05a2VWUjVjR1VpT2lKaGNIQnNhV05oZEdsdmJpOTRMWGQzZHkxbWIzSnRMWFZ5YkdWdVkyOWtaV1FpZlFvPSJdLFsiZXEiLCIkeDpjb2RlZGVzY3JpcHRpb24iLCJJa2hsYkd4dklGZHZjbXhrSWc9PSJdLFsiY29udGVudC1sZW5ndGgtcmFuZ2UiLDEsNDE5NDMwNF1dfQ==</policy>
    </OssPostConfig>
    <CodeRevision>1622034169188190343</CodeRevision>
</Content>

JSON格式

{
    "RequestId": "DFA2027F-86C0-4421-9593-581A7993696C",
    "Content": {
        "OssPostConfig": {
            "OSSAccessKeyId": "KiTr",
            "Signature": "+VaGBmeMjdKTD1E=",
            "callback": "eyJjYWxsYmFja1VybCI6Imh0dHA6Ly9lci1ub2RlYXBpLmFsaXl1bmNzLmNvbS91cGxvYWRfY29kZV9vc3NfY2FsbGJhY2siLCJjYWxsYmFja0JvZHkiOiJPYmplY3Q9JHtvYmplY3R9JkNvZGVEZXNjcmlwdGlvbj0ke3g6Y29kZWRlc2NyaXB0aW9ufSIsImNhbGxiYWNrQm9keVR5cGUiOiJhcHBsaWNhdGlvbi94LXd3dy1mb3JtLXVybGVuY29kZWQifQo=",
            "x:codeDescription": "IkhlbGxvIFdvcmxkIg==",
            "Url": "http://cdn-edgejs.oss-cn-hangzhou.aliyuncs.com",
            "key": "test.123.69188190343.js",
            "policy": "eyJleHBpcmF0aW9uIjoiMjAyMS0wNS0yNlQxMzowNzo0OVoiLCJjb25kaXRpb25zIjpbWyJlcSIsIiRrZXkiLCJ0ZXN0LXNsYy4xMzc3MjkyNjI4ODEwMzI3LjE2MjIwMzQxNjkxODgxOTAzNDMuanMiXSxbImVxIiwiJGNhbGxiYWNrIiwiZXlKallXeHNZbUZqYTFWeWJDSTZJbWgwZEhBNkx5OWxjaTF1YjJSbFlYQnBMbUZzYVhsMWJtTnpMbU52YlM5MWNHeHZZV1JmWTI5a1pWOXZjM05mWTJGc2JHSmhZMnNpTENKallXeHNZbUZqYTBKdlpIa2lPaUpQWW1wbFkzUTlKSHR2WW1wbFkzUjlKa052WkdWRVpYTmpjbWx3ZEdsdmJqMGtlM2c2WTI5a1pXUmxjMk55YVhCMGFXOXVmU0lzSW1OaGJHeGlZV05yUW05a2VWUjVjR1VpT2lKaGNIQnNhV05oZEdsdmJpOTRMWGQzZHkxbWIzSnRMWFZ5YkdWdVkyOWtaV1FpZlFvPSJdLFsiZXEiLCIkeDpjb2RlZGVzY3JpcHRpb24iLCJJa2hsYkd4dklGZHZjbXhrSWc9PSJdLFsiY29udGVudC1sZW5ndGgtcmFuZ2UiLDEsNDE5NDMwNF1dfQ=="
        },
        "CodeRevision": "1622034169188190343"
    }
}

错误码

HttpCode 错误码 错误信息 描述
400 EdgeRoutine.GeneralError A server error occurred: %s 后端服务器发生错误:%s 。如果重试多次依然报错,请提交工单。

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