このガイドでは、関数のデプロイに関する最新のオプションと元の Google Cloud のオプションを比較します。このページは、以前に Cloud Functions API を使用して関数を作成し、Cloud Run Admin API に移行するユーザーをサポートします。このページでは、コンセプト、構成、デプロイ、トリガーと再試行など、いくつかの領域における主な違いについて説明します。
Cloud Run Admin API(推奨): この API を使用して作成された関数(Google Cloud コンソール、gcloud run、REST API、Terraform など)は、Cloud Run Admin API のみを使用して管理できます。
Cloud Functions v2 API: この API を使用して作成された関数(gcloud functions、REST API、Terraform など)は、Cloud Run Admin API と Cloud Functions v2 API で管理できます。この API を使用する場合は、関数のデプロイ時にトリガーを指定します。Cloud Run Admin API でのみ管理できるように v2 API 関数をデタッチする方法について学びます。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["わかりにくい","hardToUnderstand","thumb-down"],["情報またはサンプルコードが不正確","incorrectInformationOrSampleCode","thumb-down"],["必要な情報 / サンプルがない","missingTheInformationSamplesINeed","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-09-04 UTC。"],[],[],null,["# Compare Cloud Run functions\n\nThis guide compares the latest and original Google Cloud choices for deploying\nfunctions. This page helps those who previously created functions with the\n[Cloud Functions API](/functions/docs/reference/rest) and are transitioning to the\nCloud Run Admin API. This page describes key differences in several areas,\nsuch as concepts, configuration, deployment, and triggers and retries.\n\nComparison\n----------\n\nThere are two versions of Cloud Run functions:\n\n- **Cloud Run functions** , is the latest version of functions,\n [deployed as a service on Cloud Run](/run/docs/resource-model#functions).\n They can be created in one of the following ways:\n\n - [Cloud Run Admin API](/run/docs/reference/cloud-run-admin-api-overview) (Recommended): Functions created with this API (for example, by using Google Cloud console, `gcloud run`, the REST API, or Terraform) can be managed exclusively using the Cloud Run Admin API.\n - [Cloud Functions v2 API](/functions/docs/reference/rest): Functions created with this API (for example, by using `gcloud functions`, the REST API, or Terraform) can be managed with the Cloud Run Admin API as well as the Cloud Functions v2 API. When using this API, you specify the trigger when deploying your function. Learn how to [detach](/functions/docs/managing#detach) a v2 API function so that it can be managed exclusively using the Cloud Run Admin API.\n- **Cloud Run functions (1st gen)** ,\n formerly known as Cloud Functions (1st gen), is the original version of\n functions with limited event triggers, runtimes, and configurability.\n [Learn more](/functions/1stgendocs/concepts/overview).\n\nBy deploying functions directly onto Cloud Run, your functions\nare automatically built as containers and deployed as a Cloud Run\nservice.\n\n### Concepts\n\nThe following table summarizes the conceptual differences for functions.\n\n### Configuration\n\nCloud Run builds functions into containers and deploys them as\nservices. When you deploy a function to Cloud Run, you have\ncomplete access and control over the function's behavior. For example, you can\nenable Direct VPC, configure GPUs, use volume mounts, and more.\n\nThe following table summarizes the configuration differences for functions:\n\n### Deployment\n\nSince August 2024, you can use Cloud Run to deploy and manage\nfunctions created with the Cloud Functions v2 API. As a result of this change:\n\n- Function metadata such as runtime ID and build configurations are stored in the Cloud Run service definition.\n- You can safely edit your function using the Cloud Run Admin API.\n- You can rely on the Cloud Run service definition as the source of truth for your function.\n\nHowever, note that functions created with the Cloud Run Admin API cannot be\nmodified with the Cloud Functions API.\n\nThe following table summarizes the differences in how you create, deploy, edit,\nand manage functions:\n\n### Triggers and retries\n\nThe following table compares triggers and retries for functions:\n\nDetach your function\n--------------------\n\nFunctions created using the [Cloud Functions v2 API](/functions/docs/apis)\n(for example, by using `gcloud functions`, the REST API, or Terraform) can be\ndetached from its existing API environment. After you detach a function, you can\nonly manage it using the\n[Cloud Run Admin API](/run/docs/reference/cloud-run-admin-api-overview). You might\nwant to do this if your workloads need to stay within the\n`run.googleapis.com` API boundary for\n[Assured Workloads](/assured-workloads/docs/overview), or to ensure\nthat your workloads use the [Cloud Run SKU](/skus/sku-groups/cloud-run).\nSee [Manage functions](/functions/docs/managing) to learn more.\n\nWhat's next\n-----------\n\n- Try the getting started guide for [deploying a Cloud Run function](/run/docs/quickstarts/functions/deploy-functions-console)."]]