airflow.providers.google.cloud.hooks.gdm

模組內容

類別

GoogleDeploymentManagerHook

使用 Google Cloud 連線與 Google Cloud Deployment Manager 互動。

class airflow.providers.google.cloud.hooks.gdm.GoogleDeploymentManagerHook(gcp_conn_id='google_cloud_default', impersonation_chain=None, **kwargs)[原始碼]

基底類別: airflow.providers.google.common.hooks.base_google.GoogleBaseHook

使用 Google Cloud 連線與 Google Cloud Deployment Manager 互動。

這允許排程和程式化的檢查和刪除由 GDM 管理的資源。

get_conn()[原始碼]

傳回 Google Deployment Manager 服務物件。

list_deployments(project_id=PROVIDE_PROJECT_ID, deployment_filter=None, order_by=None)[原始碼]

列出 Google Cloud 專案中的部署。

參數
  • project_id (str) – 此請求的專案 ID。

  • deployment_filter (str | None) – 過濾表示式,用於限制回應中傳回的資源。

  • order_by (str | None) – 要排序依據的欄位名稱,例如:“creationTimestamp desc”

delete_deployment(project_id, deployment=None, delete_policy=None)[原始碼]

刪除 Google Cloud 專案中的部署和所有相關資源。

參數
  • project_id (str | None) – 此請求的專案 ID。

  • deployment (str | None) – 此請求的部署名稱。

  • delete_policy (str | None) – 設定用於刪除資源的策略。(ABANDON | DELETE)

此條目是否有幫助?