本指南說明如何管理及分離使用 gcloud functions 指令建立的函式。如要瞭解如何管理使用 gcloud run 指令建立的函式,請參閱「管理 Cloud Run 服務」。
使用 Cloud Functions v2 API 建立的函式 (例如,使用 gcloud functions、REST API 或 Terraform) 可透過 Cloud Run Admin API 和 Cloud Functions v2 API 進行管理。舉例來說,您可以使用 gcloud functions 或 gcloud run 指令更新現有函式:
[[["容易理解","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-06-16 (世界標準時間)。"],[[["Cloud Functions v2 API functions can be managed using either the Cloud Functions v2 API or the Cloud Run Admin API, allowing for flexibility in deployment and updates via `gcloud functions` or `gcloud run` commands."],["The `gcloud beta functions detach` command enables the detachment of a Cloud Functions v2 function from its original API environment, transitioning its management exclusively to the Cloud Run Admin API."],["Detaching a function is irreversible and not applicable to Cloud Run (1st gen) functions, but HTTP functions retain their URLs and event-driven functions retain triggers."],["Detaching a function to the Cloud Run Admin API changes the billing to the Cloud Run SKU, and modifies the retry settings for event-driven functions to ensure a maximum of five delivery attempts with the use of a dead letter queue for undelivered messages."],["Following a successful detach operation, a new Cloud Run revision of the function is created, marking the point from which the function will be managed and billed through the Cloud Run framework."]]],[]]