airflow.providers.google.suite.sensors.drive

此模組包含 Google 雲端硬碟感測器。

模組內容

類別

GoogleDriveFileExistenceSensor

檢查 Google Cloud Storage 中檔案是否存在。

class airflow.providers.google.suite.sensors.drive.GoogleDriveFileExistenceSensor(*, folder_id, file_name, drive_id=None, gcp_conn_id='google_cloud_default', impersonation_chain=None, **kwargs)[source]

基於: airflow.sensors.base.BaseSensorOperator

檢查 Google Cloud Storage 中檔案是否存在。

參數
  • folder_id (str) – 檔案所在的 Google 雲端硬碟資料夾。

  • file_name (str) – 在 Google 雲端硬碟中要檢查的檔案名稱

  • drive_id (str | None) – 選填。檔案所在的共用 Google 雲端硬碟的 ID。

  • gcp_conn_id (str) – 連接 Google Cloud Storage 時使用的連線 ID。

  • impersonation_chain (str | collections.abc.Sequence[str] | None) – 選填的服務帳戶,用於模擬短期憑證,或取得列表中最後一個帳戶的 access_token 所需的帳戶鏈結列表,該帳戶將在請求中被模擬。如果設定為字串,則該帳戶必須授予原始帳戶「服務帳戶權杖建立者」IAM 角色。如果設定為序列,則列表中的身分必須將「服務帳戶權杖建立者」IAM 角色授予直接前一個身分,列表中的第一個帳戶將此角色授予原始帳戶(可使用範本)。

template_fields: collections.abc.Sequence[str] = ('folder_id', 'file_name', 'drive_id', 'impersonation_chain')[source]
ui_color = '#f0eee4'[source]
poke(context)[source]

衍生此類別時覆寫。

這個條目有幫助嗎?