airflow.providers.google.suite.sensors.drive¶
此模組包含 Google Drive 感測器。
類¶
檢查 Google Drive 中檔案的存在。 |
模組內容¶
- 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 Drive 中檔案的存在。
- 引數:
folder_id (str) – 檔案所在的 Google Drive 資料夾。
file_name (str) – 要在 Google Drive 中檢查的檔名
drive_id (str | None) – 可選。檔案所在的共享 Google Drive 的 ID。
gcp_conn_id (str) – 連線到 Google Cloud 時使用的連線 ID。
impersonation_chain (str | collections.abc.Sequence[str] | None) – 可選的服務賬號,用於使用短期憑據模擬,或需要獲取列表中最後一個賬號的 access_token 的賬號鏈列表,該 access_token 將用於請求中的模擬。如果設定為字串,該賬號必須授予原始賬號 Service Account Token Creator IAM 角色。如果設定為序列,列表中的身份必須授予緊前身份 Service Account Token Creator IAM 角色,其中列表中的第一個賬號將此角色授予原始賬號(模板化)。
- template_fields: collections.abc.Sequence[str] = ('folder_id', 'file_name', 'drive_id', 'impersonation_chain')[source]¶