{"id":47387,"date":"2023-07-27T10:39:53","date_gmt":"2023-08-05T21:41:19","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e6%83%b3%e5%9c%a8ibm-cloud-functions%e4%b8%ad%e4%bd%bf%e7%94%a8%e5%a4%96%e9%83%a8%e5%ba%93%e3%80%82\/"},"modified":"2024-01-15T12:22:27","modified_gmt":"2024-01-15T04:22:27","slug":"%e6%88%91%e6%83%b3%e5%9c%a8ibm-cloud-functions%e4%b8%ad%e4%bd%bf%e7%94%a8%e5%a4%96%e9%83%a8%e5%ba%93%e3%80%82","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e6%83%b3%e5%9c%a8ibm-cloud-functions%e4%b8%ad%e4%bd%bf%e7%94%a8%e5%a4%96%e9%83%a8%e5%ba%93%e3%80%82\/","title":{"rendered":"\u6211\u60f3\u5728IBM Cloud Functions\u4e2d\u4f7f\u7528\u5916\u90e8\u5e93"},"content":{"rendered":"<p>\u4f7f\u7528IBM Cloud Functions\u65f6\uff0c\u652f\u6301\u5404\u79cd\u6807\u51c6\u8bed\u8a00\uff0c\u5e76\u63d0\u4f9b\u4e86\u5404\u79cd\u9ed8\u8ba4\u5e93\u3002\u4f46\u662f\uff0c\u5982\u679c\u8981\u4f7f\u7528\u4e0d\u5728\u9ed8\u8ba4\u5e93\u4e2d\u7684\u5e93\u8fdb\u884c\u5f00\u53d1\uff0c\u5219\u5fc5\u987b\u5728\u547d\u4ee4\u884c\u4e2d\u8fdb\u884c\u5f00\u53d1\u3002\u6b64\u5916\uff0c\u7531\u4e8eJava\u6ca1\u6709GUI\u5f00\u53d1\u73af\u5883\uff0c\u56e0\u6b64\u5fc5\u987b\u4f7f\u7528\u547d\u4ee4\u884c\u8fdb\u884c\u5f00\u53d1\u3002\u56e0\u6b64\uff0c\u672c\u6b21\u5c06\u603b\u7ed3\u5728\u4f7f\u7528\u547d\u4ee4\u884c\u5f00\u53d1Cloud Functions\u65f6\u9047\u5230\u7684\u95ee\u9898\uff0c\u4ee5Python\u4e3a\u4f8b\u3002\u8bf7\u6ce8\u610f\uff0c\u5728\u7ee7\u7eed\u8ba8\u8bba\u4e4b\u524d\uff0c\u6211\u4eec\u5047\u8bbe\u60a8\u5df2\u7ecf\u9884\u5148\u5b89\u88c5\u4e86docker\u3002\uff08\u5982\u679c\u4f7f\u7528\u5176\u4ed6\u8bed\u8a00\u8fdb\u884c\u5f00\u53d1\uff0c\u6309\u7167\u76f8\u5173\u9002\u5ba3\u8fdb\u884c\u9605\u8bfb\uff0c\u5e94\u8be5\u53ef\u4ee5\u8fdb\u884c\u5f00\u53d1\u3002\uff09<\/p>\n<h1>\u9996\u5148\u6309\u7167\u6587\u4ef6\u4e2d\u7684\u6307\u793a\u5c1d\u8bd5\u8fdb\u884c\u5236\u4f5c\u3002<\/h1>\n<p>\u6211\u60f3\u8981\u5b89\u88c5Python\u7684LINE bot SDK\u8fd9\u6b21\u3002\u8bf7\u6839\u636e\u8fd9\u4efd\u6587\u4ef6\uff0c\u521b\u5efa\u4ee5\u4e0b\u5185\u5bb9\u7684requirements.txt\u3002<\/p>\n<pre class=\"post-pre\"><code># Requirements.txt contains a list of dependencies for the Python Application #\r\n\r\n# Setup modules\r\ngevent == 1.4.0\r\nflask == 1.0.2\r\n\r\n# default available packages for python3action\r\nbeautifulsoup4 == 4.8.0\r\nhttplib2 == 0.13.0\r\nkafka_python == 1.4.6\r\nlxml == 4.3.4\r\npython-dateutil == 2.8.0\r\nrequests == 2.22.0\r\nscrapy == 1.6.0\r\nsimplejson == 3.16.0\r\nvirtualenv == 16.7.1\r\ntwisted == 19.7.0\r\nPyJWT == 1.7.1\r\n\r\n# packages for numerics\r\nnumpy == 1.16.4\r\nscikit-learn == 0.20.3\r\nscipy == 1.2.1\r\npandas == 0.24.2\r\n\r\n# packages for image processing\r\nPillow == 6.2.1\r\n\r\n# IBM specific python modules\r\nibm_db == 3.0.1\r\ncloudant == 2.12.0\r\nwatson-developer-cloud == 2.8.1\r\nibm-cos-sdk == 2.5.1\r\nibmcloudsql == 0.2.23\r\n\r\n# Compose Libs\r\npsycopg2 == 2.8.2\r\npymongo == 3.8.0\r\nredis == 3.2.1\r\npika == 1.0.1\r\nelasticsearch == 6.3.1\r\ncassandra-driver == 3.18.0\r\netcd3 == 0.10.0\r\n\r\n#Additional modules\r\nline-bot-sdk\r\n<\/code><\/pre>\n<p>\u5728\u521b\u5efa\u6587\u672c\u6587\u4ef6\u4e4b\u540e\uff0c\u4f7f\u7528Docker\u547d\u4ee4\u83b7\u53d6Functions\u7684\u8fd0\u884c\u73af\u5883\uff0c\u5e76\u521b\u5efaPython\u865a\u62df\u73af\u5883\u7684\u8f6f\u4ef6\u5305\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"gp\">$<\/span> docker pull ibmfunctions\/action-python-v3.7\r\n<span class=\"gp\">$<\/span> docker run <span class=\"nt\">--rm<\/span> <span class=\"nt\">-v<\/span> <span class=\"s2\">\"<\/span><span class=\"nv\">$PWD<\/span><span class=\"s2\">:\/tmp\"<\/span> ibmfunctions\/action-python-v3.7 bash <span class=\"nt\">-c<\/span> <span class=\"s2\">\"cd \/tmp &amp;&amp; virtualenv virtualenv &amp;&amp; source virtualenv\/bin\/activate &amp;&amp; pip install -r requirements.txt\"<\/span>\r\n<\/code><\/pre>\n<p>\u4ee5\u4e0b\u662f\u90e8\u7f72\u65f6\u6267\u884c\u7684\u4ee3\u7801(__main__.py)\uff1a<\/p>\n<pre class=\"post-pre\"><code><span class=\"k\">def<\/span> <span class=\"nf\">main<\/span><span class=\"p\">(<\/span><span class=\"n\">args<\/span><span class=\"p\">):<\/span>\r\n    <span class=\"k\">return<\/span> <span class=\"p\">{<\/span><span class=\"s\">\"result\"<\/span><span class=\"p\">:<\/span><span class=\"s\">\"OK!\"<\/span><span class=\"p\">}<\/span>\r\n<\/code><\/pre>\n<p>\u5c06\u521a\u521a\u521b\u5efa\u7684\u8f6f\u4ef6\u5305\u548c\u4ee3\u7801\u538b\u7f29\u6210zip\u6587\u4ef6\uff0c\u5e76\u4f7f\u7528\u547d\u4ee4\u884c\u521b\u5efa\u4e00\u4e2a\u64cd\u4f5c\u3002\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u5728\u5df2\u767b\u5f55IBM Cloud\u547d\u4ee4\u884c\u7684\u72b6\u6001\u4e0b\u7ee7\u7eed\u8fdb\u884c\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"gp\">$<\/span> zip <span class=\"nt\">-r<\/span> hellobot.zip virtualenv __main__.py\r\n<span class=\"gp\">$<\/span> ibmcloud fn action create hellobot hellobot.zip <span class=\"nt\">--kind<\/span> python:3.7\r\n<\/code><\/pre>\n<p>\u7136\u540e\uff0c\u6267\u884c\u7684\u7ed3\u679c\u88ab\u8f93\u51fa\u5982\u4e0b\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"go\">error: Unable to create action 'my-action-name': The connection failed, or timed out. (HTTP status code 413)\r\n<\/span><\/code><\/pre>\n<p>\u54ce\u5440\uff1f\u660e\u660e\u6ca1\u6709\u6253\u9519\u5b57\uff0c\u4e3a\u4ec0\u4e48\u4f1a\u51fa\u73b0\u8fd9\u6837\u7684\u9519\u8bef\u5462\uff1f<\/p>\n<h2>\u6211\u8fdb\u884c\u4e86\u539f\u56e0\u8c03\u67e5\u3002<\/h2>\n<p>\u5f53\u6211\u8c03\u67e5\u4e86\u4e00\u4e0b\u8fd9\u4e2a\u9519\u8bef\uff0c\u6211\u5728Stackoverflow\u4e0a\u627e\u5230\u4e86\u8fd9\u7bc7\u6587\u7ae0\u3002<br \/>\nIBM Cloud functions &#8211; \u65e0\u6cd5\u521b\u5efa\u4e00\u4e2a\u64cd\u4f5c<br \/>\n\u6839\u636eIBM Cloud Functions\u7684\u8d1f\u8d23\u4eba\u7684\u56de\u7b54\uff0c\u8fd9\u4f3c\u4e4e\u662f\u547d\u4ee4\u884c\u7aef\u7684\u4e00\u4e2a\u9519\u8bef\uff0c\u770b\u8d77\u6765\u65e0\u6cd5\u901a\u8fc7\u8fd9\u79cd\u65b9\u5f0f\u521b\u5efa\u4e00\u4e2a\u64cd\u4f5c\u3002\uff08\u8fd9\u4e2a\u5e94\u8be5\u5199\u5728\u6587\u6863\u4e0a\u554a\uff09<\/p>\n<h1>\u4f7f\u7528Docker Hub\u521b\u5efa\u64cd\u4f5c\uff08\u5982\u679c\u65f6\u95f4\u7d27\u5f20\uff0c\u8bf7\u4ece\u8fd9\u91cc\u5f00\u59cb\u9605\u8bfb\uff09\u3002<\/h1>\n<p>\u4e0d\u4ec5\u5728\u5148\u524d\u7684Stackoverflow\u95ee\u9898\u4e2d\u6307\u51fa\u4e86\u65e0\u6cd5\u4f7f\u7528\u56e0\u4e3a\u5b58\u5728bug\uff0c\u8fd8\u63d0\u4f9b\u4e86\u66ff\u4ee3\u89e3\u51b3\u65b9\u6848\uff0c\u56e0\u6b64\u6211\u5e0c\u671b\u4e0b\u6b21\u80fd\u591f\u5c1d\u8bd5\u90a3\u4e2a\u89e3\u51b3\u65b9\u6848\u3002\u6211\u5c06\u53c2\u8003\u8fd9\u4e2a\u65b9\u6848\u81ea\u5df1\u6784\u5efa\u865a\u62df\u73af\u5883\u5e76\u5c06\u5176\u4e0a\u4f20\u5230Docker Hub\uff0c\u7136\u540e\u521b\u5efa\u64cd\u4f5c\u3002\u8fd9\u79cd\u65b9\u6cd5\u5bf9\u4e8e\u719f\u6089Docker\u64cd\u4f5c\u7684\u4eba\u6765\u8bf4\u5f88\u7b80\u5355\uff0c\u4f46\u5bf9\u4e8e\u6ca1\u6709\u63a5\u89e6\u8fc7\u7684\u4eba\u53ef\u80fd\u4f1a\u6709\u4e9b\u96be\u4ee5\u7406\u89e3\u3002<\/p>\n<h2>\u5efa\u7acb\u6267\u884c\u73af\u5883<\/h2>\n<p>\u9996\u5148\uff0c\u51c6\u5907\u64cd\u4f5c\u73af\u5883\u7684Dockerfile\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"k\">FROM<\/span><span class=\"s\"> openwhisk\/actionloop-python-v3.7:36721d6<\/span>\r\n\r\n<span class=\"k\">COPY<\/span><span class=\"s\"> requirements.txt requirements.txt<\/span>\r\n\r\n<span class=\"k\">RUN <\/span>pip <span class=\"nb\">install<\/span> <span class=\"nt\">--upgrade<\/span> pip setuptools six <span class=\"o\">&amp;&amp;<\/span> pip <span class=\"nb\">install<\/span> <span class=\"nt\">--no-cache-dir<\/span> <span class=\"nt\">-r<\/span> requirements.txt\r\n\r\n<\/code><\/pre>\n<p>\u6839\u636eDockerfile\u4e2d\u7684\u5185\u5bb9\uff0c\u60a8\u53ef\u4ee5\u770b\u51farequirements.txt\u662f\u76f4\u63a5\u4f7f\u7528\u4e4b\u524d\u521b\u5efa\u7684\u6587\u4ef6\uff0c\u6240\u4ee5\u7701\u7565\u4e86\u5176\u5185\u5bb9\u3002\u73b0\u5728\u6211\u4eec\u5df2\u7ecf\u51c6\u5907\u597d\u4e86\u6240\u6709\u5fc5\u8981\u7684\u6587\u4ef6\uff0c\u63a5\u4e0b\u6765\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u6765\u521b\u5efa\u955c\u50cf\u3002\u8fd9\u4e2a\u8fc7\u7a0b\u53ef\u80fd\u9700\u8981\u82b1\u8d39\u4e00\u4e9b\u65f6\u95f4\u624d\u80fd\u5b8c\u6210\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"gp\">$<\/span> docker build <span class=\"nt\">-t<\/span> linebot_function <span class=\"nb\">.<\/span>\r\n<\/code><\/pre>\n<p>\u5c06\u521b\u5efa\u7684\u955c\u50cf\u4e0a\u4f20\u5230Docker Hub\u3002\u5982\u679c\u60a8\u8fd8\u6ca1\u6709\u6ce8\u518cDocker Hub\uff0c\u8bf7\u4ece\u8fd9\u91cc\u6ce8\u518c\u3002\u6ce8\u518c\u540e\uff0c\u5728Docker\u7684GUI\u754c\u9762\u4e2d\u767b\u5f55\u5230Docker Hub\u3002\u767b\u5f55\u6210\u529f\u540e\uff0c\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u7ed9\u521b\u5efa\u7684\u955c\u50cf\u6253\u4e0a\u6807\u7b7e\u5e76\u4e0a\u4f20\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"gp\">$<\/span> docker tag linebot_function YOUR_USER_NAME\/linebot_function\r\n<span class=\"gp\">$<\/span> docker push YOUR_USER_NAME\/linebot_function\r\n<\/code><\/pre>\n<h2>\u521b\u5efa\u4e00\u4e2a\u52a8\u4f5c<\/h2>\n<p>\u65e2\u7ecf\u4e3a\u51c6\u5907\u597d\u6267\u884c\u73af\u5883\uff0c\u73b0\u5728\u6211\u4eec\u5c06\u51c6\u5907\u8981\u8fd0\u884c\u7684\u4ee3\u7801\u3002\u8fd9\u6b21\u4f5c\u4e3a\u5916\u90e8\u5e93\uff0c\u6211\u4eec\u5b89\u88c5\u4e86LINE Bot\u7684Python SDK\uff0c\u73b0\u5728\u8981\u786e\u8ba4\u5b83\u662f\u5426\u5df2\u6b63\u786e\u5b89\u88c5\u3002\u56e0\u6b64\uff0c\u6211\u4eec\u51c6\u5907\u4e86\u4ee5\u4e0b\u4ee3\u7801\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"kn\">import<\/span> <span class=\"nn\">linebot<\/span>\r\n\r\n<span class=\"k\">def<\/span> <span class=\"nf\">main<\/span><span class=\"p\">(<\/span><span class=\"n\">args<\/span><span class=\"p\">):<\/span>\r\n    <span class=\"k\">return<\/span> <span class=\"p\">{<\/span><span class=\"s\">\"LINEbot\"<\/span><span class=\"p\">:<\/span><span class=\"n\">linebot<\/span><span class=\"p\">.<\/span><span class=\"n\">__version__<\/span><span class=\"p\">}<\/span>\r\n\r\n<\/code><\/pre>\n<p>\u4e00\u65e6\u51c6\u5907\u597d\u4ee3\u7801\uff0c\u6211\u4eec\u5c31\u53ef\u4ee5\u5f00\u59cb\u521b\u5efa\u884c\u52a8\u4e86\u3002\u9996\u5148\uff0c\u6211\u4eec\u9700\u8981\u5b89\u88c5IBM Cloud Functions\u63d2\u4ef6\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"gp\">$<\/span> ibmcloud plugin <span class=\"nb\">install <\/span>cloud-functions\r\n<\/code><\/pre>\n<p>\u8bf7\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5b9a\u4f4d\u8d44\u6e90\u7ec4\u3002\u5173\u4e8e\u7ec4\u540d\uff0c\u60a8\u53ef\u4ee5\u767b\u5f55\u5e76\u786e\u8ba4\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"gp\">$<\/span> ibmcloud target <span class=\"nt\">-o<\/span> &lt;org&gt; <span class=\"nt\">-s<\/span> &lt;space&gt; \r\n<\/code><\/pre>\n<p>\u56e0\u4e3a\u6211\u5df2\u7ecf\u51c6\u5907\u597d\u4e86\u4ee3\u7801\uff0c\u6240\u4ee5\u5c06\u4f7f\u7528\u4e0b\u9762\u7684\u547d\u4ee4\u6765\u521b\u5efa\u52a8\u4f5c\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"gp\">$<\/span> ibmcloud fn action create first-linebot <span class=\"nt\">--docker<\/span> YOUR_USER_NAME\/linebot_function first-linebot.py\r\n<\/code><\/pre>\n<p>\u5982\u679c\u6ca1\u6709\u9519\u8bef\u5e76\u6210\u529f\u8fd4\u56de\u7ed3\u679c\uff0c\u90a3\u5c31\u662f\u6210\u529f\u3002<\/p>\n<h1>\u786e\u8ba4\u884c\u52a8<\/h1>\n<p>\u6211\u5011\u5c07\u9032\u884c\u6240\u5275\u5efa\u7684\u52d5\u4f5c\u7684\u64cd\u4f5c\u78ba\u8a8d\u3002\u4f46\u662f\uff0c\u4f7f\u7528Docker\u74b0\u5883\u5275\u5efa\u7684\u52d5\u4f5c\u7121\u6cd5\u5f9e\u5716\u5f62\u7528\u6236\u754c\u9762\u9032\u884c\u64cd\u4f5c\u78ba\u8a8d\uff0c\u6240\u4ee5\u6211\u5011\u9700\u8981\u5728\u547d\u4ee4\u884c\u4e2d\u57f7\u884c\u64cd\u4f5c\u3002\u57f7\u884c\u4ee5\u4e0b\u547d\u4ee4\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"gp\">$<\/span> ibmcloud fn action invoke first-linebot <span class=\"nt\">--result<\/span>\r\n<\/code><\/pre>\n<p>\u5982\u679c\u5728\u6267\u884c\u540e\u8f93\u51fa\u4e86LINE bot SDK\u7684\u7248\u672c\uff0c\u5219\u610f\u5473\u7740\u81ea\u5df1\u7684\u73af\u5883\u4e2d\u7684\u64cd\u4f5c\u6b63\u5e38\u8fd0\u884c\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"p\">{<\/span>\r\n    <span class=\"nl\">\"LINEbot\"<\/span><span class=\"p\">:<\/span> <span class=\"s2\">\"1.15.0\"<\/span>\r\n<span class=\"p\">}<\/span>\r\n<\/code><\/pre>\n<p>\u6211\u8ba4\u4e3a\u53ef\u4ee5\u901a\u8fc7\u8fd9\u79cd\u65b9\u5f0f\u6269\u5927\u53ef\u521b\u5efa\u7684\u884c\u52a8\u8303\u56f4\u3002\u6211\u6253\u7b97\u5229\u7528\u8fd9\u6b21\u6784\u5efa\u7684\u73af\u5883\u6765\u521b\u5efa\u4e00\u4e2a\u65e0\u670d\u52a1\u5668\u7684LINE\u673a\u5668\u4eba\u3002<\/p>\n<p>\u60a8\u53ef\u4ee5\u901a\u8fc7\u8fd9\u91cc\u67e5\u770b\u6709\u5173\u521b\u4f5cLINE\u673a\u5668\u4eba\u7684\u6587\u7ae0\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4f7f\u7528IBM Cloud Functions\u65f6\uff0c\u652f\u6301\u5404\u79cd\u6807\u51c6\u8bed\u8a00\uff0c\u5e76\u63d0\u4f9b\u4e86\u5404\u79cd\u9ed8\u8ba4\u5e93\u3002\u4f46\u662f\uff0c\u5982\u679c\u8981\u4f7f\u7528\u4e0d\u5728\u9ed8\u8ba4\u5e93 [&hellip;]<\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-47387","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u6211\u60f3\u5728IBM Cloud Functions\u4e2d\u4f7f\u7528\u5916\u90e8\u5e93 - Blog - Silicon Cloud<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/zh\/blog\/\u6211\u60f3\u5728ibm-cloud-functions\u4e2d\u4f7f\u7528\u5916\u90e8\u5e93\u3002\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u6211\u60f3\u5728IBM Cloud Functions\u4e2d\u4f7f\u7528\u5916\u90e8\u5e93\" \/>\n<meta property=\"og:description\" content=\"\u4f7f\u7528IBM Cloud Functions\u65f6\uff0c\u652f\u6301\u5404\u79cd\u6807\u51c6\u8bed\u8a00\uff0c\u5e76\u63d0\u4f9b\u4e86\u5404\u79cd\u9ed8\u8ba4\u5e93\u3002\u4f46\u662f\uff0c\u5982\u679c\u8981\u4f7f\u7528\u4e0d\u5728\u9ed8\u8ba4\u5e93 [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u6211\u60f3\u5728ibm-cloud-functions\u4e2d\u4f7f\u7528\u5916\u90e8\u5e93\u3002\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-08-05T21:41:19+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-01-15T04:22:27+00:00\" \/>\n<meta name=\"author\" content=\"\u96c5, \u609f\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u96c5, \u609f\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e6%83%b3%e5%9c%a8ibm-cloud-functions%e4%b8%ad%e4%bd%bf%e7%94%a8%e5%a4%96%e9%83%a8%e5%ba%93%e3%80%82\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e6%83%b3%e5%9c%a8ibm-cloud-functions%e4%b8%ad%e4%bd%bf%e7%94%a8%e5%a4%96%e9%83%a8%e5%ba%93%e3%80%82\/\",\"name\":\"\u6211\u60f3\u5728IBM Cloud Functions\u4e2d\u4f7f\u7528\u5916\u90e8\u5e93 - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2023-08-05T21:41:19+00:00\",\"dateModified\":\"2024-01-15T04:22:27+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/f044a4b7fa4ee2701702942002419ca6\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e6%83%b3%e5%9c%a8ibm-cloud-functions%e4%b8%ad%e4%bd%bf%e7%94%a8%e5%a4%96%e9%83%a8%e5%ba%93%e3%80%82\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e6%83%b3%e5%9c%a8ibm-cloud-functions%e4%b8%ad%e4%bd%bf%e7%94%a8%e5%a4%96%e9%83%a8%e5%ba%93%e3%80%82\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e6%83%b3%e5%9c%a8ibm-cloud-functions%e4%b8%ad%e4%bd%bf%e7%94%a8%e5%a4%96%e9%83%a8%e5%ba%93%e3%80%82\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u6211\u60f3\u5728IBM Cloud Functions\u4e2d\u4f7f\u7528\u5916\u90e8\u5e93\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/f044a4b7fa4ee2701702942002419ca6\",\"name\":\"\u96c5, \u609f\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/e71a913e914f1aad1efc391f92084294bac54bc782acd289638580134cf667a6?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/e71a913e914f1aad1efc391f92084294bac54bc782acd289638580134cf667a6?s=96&d=mm&r=g\",\"caption\":\"\u96c5, \u609f\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/yawu\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e6%83%b3%e5%9c%a8ibm-cloud-functions%e4%b8%ad%e4%bd%bf%e7%94%a8%e5%a4%96%e9%83%a8%e5%ba%93%e3%80%82\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u6211\u60f3\u5728IBM Cloud Functions\u4e2d\u4f7f\u7528\u5916\u90e8\u5e93 - Blog - Silicon Cloud","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/zh\/blog\/\u6211\u60f3\u5728ibm-cloud-functions\u4e2d\u4f7f\u7528\u5916\u90e8\u5e93\u3002\/","og_locale":"zh_CN","og_type":"article","og_title":"\u6211\u60f3\u5728IBM Cloud Functions\u4e2d\u4f7f\u7528\u5916\u90e8\u5e93","og_description":"\u4f7f\u7528IBM Cloud Functions\u65f6\uff0c\u652f\u6301\u5404\u79cd\u6807\u51c6\u8bed\u8a00\uff0c\u5e76\u63d0\u4f9b\u4e86\u5404\u79cd\u9ed8\u8ba4\u5e93\u3002\u4f46\u662f\uff0c\u5982\u679c\u8981\u4f7f\u7528\u4e0d\u5728\u9ed8\u8ba4\u5e93 [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u6211\u60f3\u5728ibm-cloud-functions\u4e2d\u4f7f\u7528\u5916\u90e8\u5e93\u3002\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-08-05T21:41:19+00:00","article_modified_time":"2024-01-15T04:22:27+00:00","author":"\u96c5, \u609f","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u96c5, \u609f","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e6%83%b3%e5%9c%a8ibm-cloud-functions%e4%b8%ad%e4%bd%bf%e7%94%a8%e5%a4%96%e9%83%a8%e5%ba%93%e3%80%82\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e6%83%b3%e5%9c%a8ibm-cloud-functions%e4%b8%ad%e4%bd%bf%e7%94%a8%e5%a4%96%e9%83%a8%e5%ba%93%e3%80%82\/","name":"\u6211\u60f3\u5728IBM Cloud Functions\u4e2d\u4f7f\u7528\u5916\u90e8\u5e93 - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2023-08-05T21:41:19+00:00","dateModified":"2024-01-15T04:22:27+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/f044a4b7fa4ee2701702942002419ca6"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e6%83%b3%e5%9c%a8ibm-cloud-functions%e4%b8%ad%e4%bd%bf%e7%94%a8%e5%a4%96%e9%83%a8%e5%ba%93%e3%80%82\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e6%83%b3%e5%9c%a8ibm-cloud-functions%e4%b8%ad%e4%bd%bf%e7%94%a8%e5%a4%96%e9%83%a8%e5%ba%93%e3%80%82\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e6%83%b3%e5%9c%a8ibm-cloud-functions%e4%b8%ad%e4%bd%bf%e7%94%a8%e5%a4%96%e9%83%a8%e5%ba%93%e3%80%82\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u6211\u60f3\u5728IBM Cloud Functions\u4e2d\u4f7f\u7528\u5916\u90e8\u5e93"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/f044a4b7fa4ee2701702942002419ca6","name":"\u96c5, \u609f","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/e71a913e914f1aad1efc391f92084294bac54bc782acd289638580134cf667a6?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e71a913e914f1aad1efc391f92084294bac54bc782acd289638580134cf667a6?s=96&d=mm&r=g","caption":"\u96c5, \u609f"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/yawu\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%88%91%e6%83%b3%e5%9c%a8ibm-cloud-functions%e4%b8%ad%e4%bd%bf%e7%94%a8%e5%a4%96%e9%83%a8%e5%ba%93%e3%80%82\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/47387","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=47387"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/47387\/revisions"}],"predecessor-version":[{"id":59427,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/47387\/revisions\/59427"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=47387"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=47387"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=47387"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}