Cloud Composer 3 | Cloud Composer 2 | Cloud Composer 1
本頁說明如何在 Google Cloud 專案中啟用及停用 Cloud Composer 服務。
如要瞭解如何管理 Google Cloud上的服務,請參閱「啟用及停用服務」。
如要查看 VPC Service Controls 設定中 Cloud Composer 必須使用的服務清單,請參閱「設定 VPC Service Controls」。
啟用 Cloud Composer 服務
本節說明如何在 Google Cloud 專案中啟用 Cloud Composer 服務。
事前準備
如要啟用 Cloud Composer 服務,您必須具備正確的 Identity and Access Management 權限。如要瞭解「服務使用情形」的 IAM 需求,請參閱「服務使用情形」頁面的存取權控管。
確認您已為專案啟用計費功能。
啟用 Cloud Composer API
主控台
啟用 Cloud Composer API:
gcloud
啟用 composer.googleapis.com
API:
gcloud services enable composer.googleapis.com
API
使用 services.enable
方法啟用 composer.googleapis.com
API。
Terraform
使用 google_project_service
資源設定 composer.googleapis.com
API。
停用 Cloud Composer 服務
本節說明如何在 Google Cloud 專案中停用 Cloud Composer 服務。
事前準備
如要停用 Cloud Composer 服務,您必須具備正確的 Identity and Access Management 權限。如要瞭解「服務使用情形」的 IAM 需求,請參閱「服務使用情形」頁面的存取權控管一節。
請確認專案中的所有 Cloud Composer 環境都已刪除。停用 API 後,系統會永久刪除 Cloud Composer 環境的租戶專案部分,這些環境將無法使用。
停用 Cloud Composer API 前,請針對每個環境完成下列步驟,以免系統向您收取額外費用:
- 暫停 DAG。
- 視需要匯出環境資料,例如環境值區中的 DAG。
- 刪除環境,包括未自動刪除的資源。
停用 Cloud Composer API
如要停用 Cloud Composer 服務,請按照下列步驟操作:
主控台
前往 Google Cloud 控制台的「Cloud Composer API」頁面。
點選「管理」。
點選「停用 API」。
gcloud
執行 gcloud services disable
指令:
gcloud services disable composer.googleapis.com
API
使用 services.disable
方法停用 composer.googleapis.com
API。
Terraform
移除 composer.googleapis.com
API 的設定。您通常會使用 google_project_service
資源來設定 Google Cloud 服務。
Cloud Composer 服務需求
本節說明 Cloud Composer 必須使用的服務。在某些情況下,機構或專案管理員可以限制專案中可使用的 Google 服務。
Cloud Composer 需要下列服務:
- artifactregistry.googleapis.com
- cloudbuild.googleapis.com
- composer.googleapis.com
- compute.googleapis.com
container.googleapis.com
logging.googleapis.com
cloudkms.googleapis.com (如果您使用 Cloud KMS 或 CMEK 金鑰)
monitoring.googleapis.com
pubsub.googleapis.com
storage.googleapis.com
secretmanager.googleapis.com (如果您使用 Secret Manager 做為密鑰後端)
cloudresourcemanager.googleapis.com
servicedirectory.googleapis.com
在大多數專案中,Cloud DNS 或 IAM 等 Google 服務預設已獲准。
此外,請允許使用 DAG 使用的所有服務,例如:
- bigquery.googleapis.com
- dataflow.googleapis.com
- datacatalog.googleapis.com
您可以在 API Explorer 頁面連結的 API 頁面中,找到服務的 *.googleapis.com 名稱。
Cloud Composer 3 不再需要的部分服務即將淘汰
我們計畫逐步淘汰 Cloud Composer 3 不需要的 API:
自 2026 年 2 月 27 日起,下列 API 將完全可拆卸。停用這些 API 不會導致 Cloud Composer API 停用。
- artifactregistry.googleapis.com
- cloudbuild.googleapis.com
- container.googleapis.com
- pubsub.googleapis.com
- sqladmin.googleapis.com
自 2026 年 5 月 27 日起,啟用 Cloud Composer API 時,系統將不再自動啟用這些 API。如要在新專案中建立 Cloud Composer 2 環境,必須手動啟用這組分離式 API。
如果專案已啟用 Cloud Composer API,現有的 Cloud Composer 3 和 Cloud Composer 2 環境不會受到影響。您可以執行以下操作:
2026 年 2 月 27 日後,如果專案只有 Cloud Composer 3 環境,您可以手動停用已分離的 API。
2026 年 2 月 27 日後,如果專案有 Cloud Composer 2 環境,建議您保持啟用這些 API,因為停用可能會導致環境故障。
2026 年 5 月 27 日後,如果您使用自動化指令碼佈建 Cloud Composer 2 環境,請務必啟用 Cloud Composer API 和下列 API。