--- title: "サンプルコード" slug: "cloudfunctions-samplecodes" tags: ["Cloud Functions"] updated: 2026-10-20T09:00:28Z published: 2026-10-20T09:00:28Z canonical: "guide.ncloud-docs.com/cloudfunctions-samplecodes" --- > ## Documentation Index > Fetch the complete documentation index at: https://guide.ncloud-docs.com/llms.txt > Use this file to discover all available pages before exploring further. # サンプルコード Classic/VPC環境で利用できます。 Cloud Functionsの概念の理解と活用に役立つ様々なサンプルコードを確認できます。 Node.js、Pythonのサンプルコードを提供しており、次の通りです。すべてのサンプルコードは [NAVER Cloud Platform GitHub](https://github.com/NaverCloudPlatform/cloud-functions/tree/master/samples)で確認できます。 | テーマ | 説明 | 詳細説明 | サンプルコード | | --- | --- | --- | --- | | REST API | HTTP REST APIの実装 | API Gatewayトリガーを利用して DBに学生情報を追加したり、照会、削除、更新する REST APIを実装 | [Node.js](https://github.com/NaverCloudPlatform/cloud-functions/blob/master/samples/nodejs/rest-api) [Python](https://github.com/NaverCloudPlatform/cloud-functions/blob/master/samples/python/rest-api) | | Object Storage連携 | バケット作成/照会/削除 | Object Storage SDKを利用してバケットを作成(create)、リスト照会(list)、削除(delete) | [Node.js](https://github.com/NaverCloudPlatform/cloud-functions/blob/master/samples/nodejs/object-storage/bucket) [Python](https://github.com/NaverCloudPlatform/cloud-functions/blob/master/samples/python/object-storage/bucket) | | Object Storage連携 | オブジェクト作成/照会/削除 | Object Storage SDKを利用してバケット内のオブジェクトを作成(Upload)、リスト照会(list)、削除(delete) | [Node.js](https://github.com/NaverCloudPlatform/cloud-functions/blob/master/samples/nodejs/object-storage/object) [Python](https://github.com/NaverCloudPlatform/cloud-functions/blob/master/samples/python/object-storage/object) | | Cloud DB for MySQL連携 | MySQLデータ CRUD | Student(studentId、name、age)テーブルの作成およびデータの挿入、削除、更新、照会 | [Node,js](https://github.com/NaverCloudPlatform/cloud-functions/blob/master/samples/nodejs/mysql/db-crud) [Python](https://github.com/NaverCloudPlatform/cloud-functions/blob/master/samples/python/mysql/db-crud) | | Cloud DB for MongoDB連携 | MongoDBデータの保存 | MongoDBの booksコレクションに書籍情報(タイトル、著者)を保存 | [Node.js](https://github.com/NaverCloudPlatform/cloud-functions/blob/master/samples/nodejs/mongodb) [Python](https://github.com/NaverCloudPlatform/cloud-functions/tree/master/samples/python/mongodb) | | Cloud DB for Cache連携 | Cloud DB for Cacheデータの保存 | Cloud DB for Cacheに Key/Valueデータを保存 | [Node.js](https://github.com/NaverCloudPlatform/cloud-functions/blob/master/samples/nodejs/cache) [Python](https://github.com/NaverCloudPlatform/cloud-functions/blob/master/samples/python/cache) | | Server連携 | Server Instanceの開始/停止 | Serverサービス OpenAPIを利用してサーバインスタンスを開始または停止 | [Node.js](https://github.com/NaverCloudPlatform/cloud-functions/blob/master/samples/nodejs/server/control-server-instance) [Python](https://github.com/NaverCloudPlatform/cloud-functions/blob/master/samples/python/server/control-server-instance) | | Slack連携 | Slackアラーム送信 | Cloud Functions GitHub Triggerを利用して Commitが発生すると Slackでアラームを送信 | [Node.js](https://github.com/NaverCloudPlatform/cloud-functions/blob/master/samples/nodejs/slack) [Python](https://github.com/NaverCloudPlatform/cloud-functions/blob/master/samples/python/slack) | | Data Flowの連携 | Data Flowのワークフローを実行 | Object Storageトリガーで実行されたアクションが Data Flowワークフロー実行 APIを呼び出す | [Python](https://github.com/NaverCloudPlatform/cloud-functions/blob/master/samples/python/dataflow/workflow/execute-workflow) |