You need to enable JavaScript to run this app.
导航
更新函数代码
最近更新时间:2023.08.14 16:44:49首次发布时间:2023.02.15 19:04:54

本接口用于更新函数代码

请求参数

名称位置类型是否必填示例值描述
ActionQueryStringUpdateSourceCode要执行的操作。取值:UpdateSourceCode
domainBodyStringtest-sparrow.test.test函数域名
source_codeBodyStringLyoqCiAqIEFkZCB0aGUgbmVjZXNzYXJ5IGV2ZW50IGxpc3RlbmVyCiAqIEBwYXJhbSB7RXZ
lbnR9IGZldGNoIGV2ZW50LCB7RnVuY3Rpb259IGFzeW5jIGZ1bmN0aW9uCiAqLwphZG
RFdmVudExpc3RlbmVyKCdmZXRjaCcsIGV2ZW50ID0+IHsKICBldmVudC5yZXNwb25kV
2l0aChoYW5kbGVSZXF1ZXN0KGV2ZW50LnJlcXVlc3QpKTsKfSkKCi8qKgogKiBNYWtl
IGEgcmVzcG9uc2UgdG8gY2xpZW50CiAqIEBwYXJhbSB7UmVxdWVzdH0gcmVxdWVzdAo
gKi8KYXN5bmMgZnVuY3Rpb24gaGFuZGxlUmVxdWVzdChyZXF1ZXN0KSB7CiAgcmV0dX
JuIG5ldyBSZXNwb25zZSgnSGVsbG8gV29ybGQhJywgeyBzdGF0dXM6IDIwMCB9KTsKf
Q==
代码内容
  • 非空
  • base64后的值

返回数据

请求示例

POST https://veefedge.volcengineapi.com/?Action=UpdateSourceCode
&<公共请求参数>

{
    "domain":"test-sparrow.test.test",
    "source_code": "LyoqCiAqIEFkZCB0aGUgbmVjZXNzYXJ5IGV2ZW50IGxpc3RlbmVyCiAqIEBwYXJhbSB7RXZlbnR9IGZldGNoIGV2ZW50LCB7RnVuY3Rpb259IGFzeW5jIGZ1bmN0aW9uCiAqLwphZGRFdmVudExpc3RlbmVyKCdmZXRjaCcsIGV2ZW50ID0+IHsKICBldmVudC5yZXNwb25kV2l0aChoYW5kbGVSZXF1ZXN0KGV2ZW50LnJlcXVlc3QpKTsKfSkKCi8qKgogKiBNYWtlIGEgcmVzcG9uc2UgdG8gY2xpZW50CiAqIEBwYXJhbSB7UmVxdWVzdH0gcmVxdWVzdAogKi8KYXN5bmMgZnVuY3Rpb24gaGFuZGxlUmVxdWVzdChyZXF1ZXN0KSB7CiAgcmV0dXJuIG5ldyBSZXNwb25zZSgnSGVsbG8gV29ybGQhJywgeyBzdGF0dXM6IDIwMCB9KTsKfQ=="
}

返回示例

正常返回示例

{
    "ResponseMetadata": {
        "RequestId": "20211207213413010225146063****",
        "Action": "UpdateSourceCode",
        "Version": "2021-04-30",
        "Service": "veefedge",
        "Region": "cn-north-1"
    }
}