apache-airflow-providers-google 9.0.0rc1__py3-none-any.whl → 10.0.0rc1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. airflow/providers/google/cloud/hooks/automl.py +5 -6
  2. airflow/providers/google/cloud/hooks/bigquery.py +5 -6
  3. airflow/providers/google/cloud/hooks/bigquery_dts.py +11 -8
  4. airflow/providers/google/cloud/hooks/bigtable.py +5 -6
  5. airflow/providers/google/cloud/hooks/cloud_build.py +14 -11
  6. airflow/providers/google/cloud/hooks/cloud_composer.py +16 -0
  7. airflow/providers/google/cloud/hooks/cloud_memorystore.py +5 -14
  8. airflow/providers/google/cloud/hooks/cloud_sql.py +5 -7
  9. airflow/providers/google/cloud/hooks/cloud_storage_transfer_service.py +5 -5
  10. airflow/providers/google/cloud/hooks/compute.py +5 -6
  11. airflow/providers/google/cloud/hooks/compute_ssh.py +8 -12
  12. airflow/providers/google/cloud/hooks/datacatalog.py +5 -9
  13. airflow/providers/google/cloud/hooks/dataflow.py +14 -6
  14. airflow/providers/google/cloud/hooks/dataform.py +8 -0
  15. airflow/providers/google/cloud/hooks/datafusion.py +13 -6
  16. airflow/providers/google/cloud/hooks/dataplex.py +5 -8
  17. airflow/providers/google/cloud/hooks/dataproc.py +13 -8
  18. airflow/providers/google/cloud/hooks/dataproc_metastore.py +8 -0
  19. airflow/providers/google/cloud/hooks/datastore.py +5 -6
  20. airflow/providers/google/cloud/hooks/dlp.py +5 -9
  21. airflow/providers/google/cloud/hooks/functions.py +5 -6
  22. airflow/providers/google/cloud/hooks/gcs.py +6 -6
  23. airflow/providers/google/cloud/hooks/gdm.py +5 -6
  24. airflow/providers/google/cloud/hooks/kms.py +5 -9
  25. airflow/providers/google/cloud/hooks/kubernetes_engine.py +6 -4
  26. airflow/providers/google/cloud/hooks/life_sciences.py +5 -9
  27. airflow/providers/google/cloud/hooks/mlengine.py +8 -0
  28. airflow/providers/google/cloud/hooks/natural_language.py +5 -9
  29. airflow/providers/google/cloud/hooks/os_login.py +5 -6
  30. airflow/providers/google/cloud/hooks/pubsub.py +5 -5
  31. airflow/providers/google/cloud/hooks/secret_manager.py +5 -9
  32. airflow/providers/google/cloud/hooks/spanner.py +5 -6
  33. airflow/providers/google/cloud/hooks/speech_to_text.py +5 -9
  34. airflow/providers/google/cloud/hooks/stackdriver.py +5 -6
  35. airflow/providers/google/cloud/hooks/tasks.py +5 -9
  36. airflow/providers/google/cloud/hooks/text_to_speech.py +5 -9
  37. airflow/providers/google/cloud/hooks/translate.py +5 -6
  38. airflow/providers/google/cloud/hooks/vertex_ai/auto_ml.py +5 -5
  39. airflow/providers/google/cloud/hooks/vertex_ai/batch_prediction_job.py +5 -6
  40. airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py +5 -6
  41. airflow/providers/google/cloud/hooks/vertex_ai/dataset.py +8 -0
  42. airflow/providers/google/cloud/hooks/vertex_ai/endpoint_service.py +8 -0
  43. airflow/providers/google/cloud/hooks/vertex_ai/hyperparameter_tuning_job.py +5 -6
  44. airflow/providers/google/cloud/hooks/vertex_ai/model_service.py +8 -0
  45. airflow/providers/google/cloud/hooks/video_intelligence.py +5 -9
  46. airflow/providers/google/cloud/hooks/vision.py +5 -6
  47. airflow/providers/google/cloud/hooks/workflows.py +8 -0
  48. airflow/providers/google/cloud/operators/bigquery.py +1 -148
  49. airflow/providers/google/cloud/operators/cloud_build.py +0 -13
  50. airflow/providers/google/cloud/operators/cloud_composer.py +2 -68
  51. airflow/providers/google/cloud/operators/cloud_storage_transfer_service.py +0 -21
  52. airflow/providers/google/cloud/operators/dataflow.py +2 -72
  53. airflow/providers/google/cloud/operators/dataform.py +5 -141
  54. airflow/providers/google/cloud/operators/datafusion.py +0 -102
  55. airflow/providers/google/cloud/operators/dataplex.py +3 -61
  56. airflow/providers/google/cloud/operators/dataproc.py +5 -13
  57. airflow/providers/google/cloud/operators/datastore.py +2 -86
  58. airflow/providers/google/cloud/operators/gcs.py +1 -43
  59. airflow/providers/google/cloud/operators/mlengine.py +1 -123
  60. airflow/providers/google/cloud/operators/pubsub.py +0 -61
  61. airflow/providers/google/cloud/operators/stackdriver.py +0 -101
  62. airflow/providers/google/cloud/operators/vertex_ai/auto_ml.py +0 -26
  63. airflow/providers/google/cloud/operators/vertex_ai/batch_prediction_job.py +0 -41
  64. airflow/providers/google/cloud/operators/vertex_ai/custom_job.py +0 -39
  65. airflow/providers/google/cloud/operators/vertex_ai/dataset.py +0 -71
  66. airflow/providers/google/cloud/operators/vertex_ai/endpoint_service.py +0 -71
  67. airflow/providers/google/cloud/operators/vertex_ai/hyperparameter_tuning_job.py +0 -35
  68. airflow/providers/google/cloud/operators/vertex_ai/model_service.py +0 -41
  69. airflow/providers/google/cloud/sensors/bigquery.py +0 -24
  70. airflow/providers/google/cloud/sensors/cloud_composer.py +0 -10
  71. airflow/providers/google/cloud/sensors/dataflow.py +0 -42
  72. airflow/providers/google/cloud/sensors/dataform.py +0 -12
  73. airflow/providers/google/cloud/sensors/datafusion.py +0 -11
  74. airflow/providers/google/cloud/sensors/dataplex.py +0 -10
  75. airflow/providers/google/cloud/sensors/gcs.py +0 -44
  76. airflow/providers/google/cloud/sensors/pubsub.py +0 -11
  77. airflow/providers/google/cloud/transfers/adls_to_gcs.py +0 -12
  78. airflow/providers/google/cloud/transfers/azure_fileshare_to_gcs.py +0 -12
  79. airflow/providers/google/cloud/transfers/bigquery_to_bigquery.py +0 -10
  80. airflow/providers/google/cloud/transfers/bigquery_to_gcs.py +0 -11
  81. airflow/providers/google/cloud/transfers/bigquery_to_mssql.py +0 -11
  82. airflow/providers/google/cloud/transfers/bigquery_to_mysql.py +0 -11
  83. airflow/providers/google/cloud/transfers/calendar_to_gcs.py +0 -12
  84. airflow/providers/google/cloud/transfers/cassandra_to_gcs.py +0 -11
  85. airflow/providers/google/cloud/transfers/gcs_to_bigquery.py +0 -13
  86. airflow/providers/google/cloud/transfers/gcs_to_gcs.py +0 -11
  87. airflow/providers/google/cloud/transfers/gcs_to_local.py +0 -11
  88. airflow/providers/google/cloud/transfers/gcs_to_sftp.py +0 -11
  89. airflow/providers/google/cloud/transfers/gdrive_to_gcs.py +0 -12
  90. airflow/providers/google/cloud/transfers/gdrive_to_local.py +0 -11
  91. airflow/providers/google/cloud/transfers/local_to_gcs.py +0 -9
  92. airflow/providers/google/cloud/transfers/s3_to_gcs.py +0 -11
  93. airflow/providers/google/cloud/transfers/sftp_to_gcs.py +0 -11
  94. airflow/providers/google/cloud/transfers/sheets_to_gcs.py +0 -12
  95. airflow/providers/google/cloud/transfers/sql_to_gcs.py +0 -11
  96. airflow/providers/google/cloud/triggers/bigquery_dts.py +0 -12
  97. airflow/providers/google/cloud/triggers/cloud_build.py +0 -11
  98. airflow/providers/google/cloud/triggers/cloud_composer.py +0 -9
  99. airflow/providers/google/cloud/triggers/dataflow.py +0 -7
  100. airflow/providers/google/cloud/triggers/datafusion.py +0 -11
  101. airflow/providers/google/cloud/triggers/dataproc.py +2 -8
  102. airflow/providers/google/cloud/triggers/kubernetes_engine.py +0 -4
  103. airflow/providers/google/cloud/triggers/mlengine.py +0 -3
  104. airflow/providers/google/common/hooks/discovery_api.py +0 -7
  105. airflow/providers/google/firebase/hooks/firestore.py +0 -10
  106. airflow/providers/google/get_provider_info.py +1 -0
  107. airflow/providers/google/marketing_platform/example_dags/example_display_video.py +0 -64
  108. airflow/providers/google/marketing_platform/hooks/campaign_manager.py +3 -3
  109. airflow/providers/google/marketing_platform/hooks/display_video.py +7 -38
  110. airflow/providers/google/marketing_platform/operators/campaign_manager.py +22 -22
  111. airflow/providers/google/marketing_platform/operators/display_video.py +0 -284
  112. airflow/providers/google/marketing_platform/sensors/campaign_manager.py +3 -3
  113. airflow/providers/google/marketing_platform/sensors/display_video.py +0 -65
  114. airflow/providers/google/suite/transfers/gcs_to_gdrive.py +0 -4
  115. airflow/providers/google/suite/transfers/gcs_to_sheets.py +0 -4
  116. airflow/providers/google_vendor/googleads/interceptors/interceptor.py +1 -1
  117. {apache_airflow_providers_google-9.0.0rc1.dist-info → apache_airflow_providers_google-10.0.0rc1.dist-info}/METADATA +34 -4
  118. {apache_airflow_providers_google-9.0.0rc1.dist-info → apache_airflow_providers_google-10.0.0rc1.dist-info}/RECORD +123 -123
  119. {apache_airflow_providers_google-9.0.0rc1.dist-info → apache_airflow_providers_google-10.0.0rc1.dist-info}/LICENSE +0 -0
  120. {apache_airflow_providers_google-9.0.0rc1.dist-info → apache_airflow_providers_google-10.0.0rc1.dist-info}/NOTICE +0 -0
  121. {apache_airflow_providers_google-9.0.0rc1.dist-info → apache_airflow_providers_google-10.0.0rc1.dist-info}/WHEEL +0 -0
  122. {apache_airflow_providers_google-9.0.0rc1.dist-info → apache_airflow_providers_google-10.0.0rc1.dist-info}/entry_points.txt +0 -0
  123. {apache_airflow_providers_google-9.0.0rc1.dist-info → apache_airflow_providers_google-10.0.0rc1.dist-info}/top_level.txt +0 -0
@@ -24,7 +24,6 @@ This module contains a Google AutoML hook.
24
24
  """
25
25
  from __future__ import annotations
26
26
 
27
- import warnings
28
27
  from typing import Sequence
29
28
 
30
29
  from google.api_core.gapic_v1.method import DEFAULT, _MethodDefault
@@ -65,16 +64,16 @@ class CloudAutoMLHook(GoogleBaseHook):
65
64
  def __init__(
66
65
  self,
67
66
  gcp_conn_id: str = "google_cloud_default",
68
- delegate_to: str | None = None,
69
67
  impersonation_chain: str | Sequence[str] | None = None,
68
+ **kwargs,
70
69
  ) -> None:
71
- if delegate_to:
72
- warnings.warn(
73
- "'delegate_to' parameter is deprecated, please use 'impersonation_chain'", DeprecationWarning
70
+ if kwargs.get("delegate_to") is not None:
71
+ raise RuntimeError(
72
+ "The `delegate_to` parameter has been deprecated before and finally removed in this version"
73
+ " of Google Provider. You MUST convert it to `impersonate_chain`"
74
74
  )
75
75
  super().__init__(
76
76
  gcp_conn_id=gcp_conn_id,
77
- delegate_to=delegate_to,
78
77
  impersonation_chain=impersonation_chain,
79
78
  )
80
79
  self._client: AutoMlClient | None = None
@@ -74,7 +74,6 @@ class BigQueryHook(GoogleBaseHook, DbApiHook):
74
74
  Interact with BigQuery. This hook uses the Google Cloud connection.
75
75
 
76
76
  :param gcp_conn_id: The Airflow connection used for GCP credentials.
77
- :param delegate_to: This performs a task on one host with reference to other hosts.
78
77
  :param use_legacy_sql: This specifies whether to use legacy SQL dialect.
79
78
  :param location: The location of the BigQuery resource.
80
79
  :param api_resource_configs: This contains params configuration applied for Google BigQuery jobs.
@@ -91,20 +90,20 @@ class BigQueryHook(GoogleBaseHook, DbApiHook):
91
90
  def __init__(
92
91
  self,
93
92
  gcp_conn_id: str = GoogleBaseHook.default_conn_name,
94
- delegate_to: str | None = None,
95
93
  use_legacy_sql: bool = True,
96
94
  location: str | None = None,
97
95
  api_resource_configs: dict | None = None,
98
96
  impersonation_chain: str | Sequence[str] | None = None,
99
97
  labels: dict | None = None,
98
+ **kwargs,
100
99
  ) -> None:
101
- if delegate_to:
102
- warnings.warn(
103
- "'delegate_to' parameter is deprecated, please use 'impersonation_chain'", DeprecationWarning
100
+ if kwargs.get("delegate_to") is not None:
101
+ raise RuntimeError(
102
+ "The `delegate_to` parameter has been deprecated before and finally removed in this version"
103
+ " of Google Provider. You MUST convert it to `impersonate_chain`"
104
104
  )
105
105
  super().__init__(
106
106
  gcp_conn_id=gcp_conn_id,
107
- delegate_to=delegate_to,
108
107
  impersonation_chain=impersonation_chain,
109
108
  )
110
109
  self.use_legacy_sql = use_legacy_sql
@@ -18,7 +18,6 @@
18
18
  """This module contains a BigQuery Hook."""
19
19
  from __future__ import annotations
20
20
 
21
- import warnings
22
21
  from copy import copy
23
22
  from typing import Sequence
24
23
 
@@ -58,17 +57,17 @@ class BiqQueryDataTransferServiceHook(GoogleBaseHook):
58
57
  def __init__(
59
58
  self,
60
59
  gcp_conn_id: str = "google_cloud_default",
61
- delegate_to: str | None = None,
62
60
  location: str | None = None,
63
61
  impersonation_chain: str | Sequence[str] | None = None,
62
+ **kwargs,
64
63
  ) -> None:
65
- if delegate_to:
66
- warnings.warn(
67
- "'delegate_to' parameter is deprecated, please use 'impersonation_chain'", DeprecationWarning
64
+ if kwargs.get("delegate_to") is not None:
65
+ raise RuntimeError(
66
+ "The `delegate_to` parameter has been deprecated before and finally removed in this version"
67
+ " of Google Provider. You MUST convert it to `impersonate_chain`"
68
68
  )
69
69
  super().__init__(
70
70
  gcp_conn_id=gcp_conn_id,
71
- delegate_to=delegate_to,
72
71
  impersonation_chain=impersonation_chain,
73
72
  )
74
73
  self.location = location
@@ -282,13 +281,17 @@ class AsyncBiqQueryDataTransferServiceHook(GoogleBaseAsyncHook):
282
281
  def __init__(
283
282
  self,
284
283
  gcp_conn_id: str = "google_cloud_default",
285
- delegate_to: str | None = None,
286
284
  location: str | None = None,
287
285
  impersonation_chain: str | Sequence[str] | None = None,
286
+ **kwargs,
288
287
  ):
288
+ if kwargs.get("delegate_to") is not None:
289
+ raise RuntimeError(
290
+ "The `delegate_to` parameter has been deprecated before and finally removed in this version"
291
+ " of Google Provider. You MUST convert it to `impersonate_chain`"
292
+ )
289
293
  super().__init__(
290
294
  gcp_conn_id=gcp_conn_id,
291
- delegate_to=delegate_to,
292
295
  location=location,
293
296
  impersonation_chain=impersonation_chain,
294
297
  )
@@ -19,7 +19,6 @@
19
19
  from __future__ import annotations
20
20
 
21
21
  import enum
22
- import warnings
23
22
  from typing import Sequence
24
23
 
25
24
  from google.cloud.bigtable import Client, enums
@@ -43,16 +42,16 @@ class BigtableHook(GoogleBaseHook):
43
42
  def __init__(
44
43
  self,
45
44
  gcp_conn_id: str = "google_cloud_default",
46
- delegate_to: str | None = None,
47
45
  impersonation_chain: str | Sequence[str] | None = None,
46
+ **kwargs,
48
47
  ) -> None:
49
- if delegate_to:
50
- warnings.warn(
51
- "'delegate_to' parameter is deprecated, please use 'impersonation_chain'", DeprecationWarning
48
+ if kwargs.get("delegate_to") is not None:
49
+ raise RuntimeError(
50
+ "The `delegate_to` parameter has been deprecated before and finally removed in this version"
51
+ " of Google Provider. You MUST convert it to `impersonate_chain`"
52
52
  )
53
53
  super().__init__(
54
54
  gcp_conn_id=gcp_conn_id,
55
- delegate_to=delegate_to,
56
55
  impersonation_chain=impersonation_chain,
57
56
  )
58
57
  self._client: Client | None = None
@@ -18,7 +18,6 @@
18
18
  """Hook for Google Cloud Build service."""
19
19
  from __future__ import annotations
20
20
 
21
- import warnings
22
21
  from typing import Sequence
23
22
 
24
23
  from google.api_core.client_options import ClientOptions
@@ -42,9 +41,6 @@ class CloudBuildHook(GoogleBaseHook):
42
41
  Hook for the Google Cloud Build Service.
43
42
 
44
43
  :param gcp_conn_id: The connection ID to use when fetching connection info.
45
- :param delegate_to: The account to impersonate using domain-wide delegation of authority,
46
- if any. For this to work, the service account making the request must have
47
- domain-wide delegation enabled.
48
44
  :param impersonation_chain: Optional service account to impersonate using short-term
49
45
  credentials, or chained list of accounts required to get the access_token
50
46
  of the last account in the list, which will be impersonated in the request.
@@ -58,16 +54,15 @@ class CloudBuildHook(GoogleBaseHook):
58
54
  def __init__(
59
55
  self,
60
56
  gcp_conn_id: str = "google_cloud_default",
61
- delegate_to: str | None = None,
62
57
  impersonation_chain: str | Sequence[str] | None = None,
58
+ **kwargs,
63
59
  ) -> None:
64
- if delegate_to:
65
- warnings.warn(
66
- "'delegate_to' parameter is deprecated, please use 'impersonation_chain'", DeprecationWarning
60
+ if kwargs.get("delegate_to") is not None:
61
+ raise RuntimeError(
62
+ "The `delegate_to` parameter has been deprecated before and finally removed in this version"
63
+ " of Google Provider. You MUST convert it to `impersonate_chain`"
67
64
  )
68
- super().__init__(
69
- gcp_conn_id=gcp_conn_id, delegate_to=delegate_to, impersonation_chain=impersonation_chain
70
- )
65
+ super().__init__(gcp_conn_id=gcp_conn_id, impersonation_chain=impersonation_chain)
71
66
  self._client: dict[str, CloudBuildClient] = {}
72
67
 
73
68
  def _get_build_id_from_operation(self, operation: Operation) -> str:
@@ -628,6 +623,14 @@ class CloudBuildHook(GoogleBaseHook):
628
623
  class CloudBuildAsyncHook(GoogleBaseHook):
629
624
  """Asynchronous Hook for the Google Cloud Build Service."""
630
625
 
626
+ def __init__(self, **kwargs):
627
+ if kwargs.get("delegate_to") is not None:
628
+ raise RuntimeError(
629
+ "The `delegate_to` parameter has been deprecated before and finally removed in this version"
630
+ " of Google Provider. You MUST convert it to `impersonate_chain`"
631
+ )
632
+ super().__init__(**kwargs)
633
+
631
634
  @GoogleBaseHook.fallback_to_default_project_id
632
635
  async def get_cloud_build(
633
636
  self,
@@ -46,6 +46,14 @@ class CloudComposerHook(GoogleBaseHook):
46
46
 
47
47
  client_options = ClientOptions(api_endpoint="composer.googleapis.com:443")
48
48
 
49
+ def __init__(self, **kwargs):
50
+ if kwargs.get("delegate_to") is not None:
51
+ raise RuntimeError(
52
+ "The `delegate_to` parameter has been deprecated before and finally removed in this version"
53
+ " of Google Provider. You MUST convert it to `impersonate_chain`"
54
+ )
55
+ super().__init__(**kwargs)
56
+
49
57
  def get_environment_client(self) -> EnvironmentsClient:
50
58
  """Retrieves client library object that allow access Environments service."""
51
59
  return EnvironmentsClient(
@@ -284,6 +292,14 @@ class CloudComposerHook(GoogleBaseHook):
284
292
  class CloudComposerAsyncHook(GoogleBaseHook):
285
293
  """Hook for Google Cloud Composer async APIs."""
286
294
 
295
+ def __init__(self, **kwargs):
296
+ if kwargs.get("delegate_to") is not None:
297
+ raise RuntimeError(
298
+ "The `delegate_to` parameter has been deprecated before and finally removed in this version"
299
+ " of Google Provider. You MUST convert it to `impersonate_chain`"
300
+ )
301
+ super().__init__(**kwargs)
302
+
287
303
  client_options = ClientOptions(api_endpoint="composer.googleapis.com:443")
288
304
 
289
305
  def get_environment_client(self) -> EnvironmentsAsyncClient:
@@ -27,7 +27,6 @@ Hooks for Cloud Memorystore service.
27
27
  """
28
28
  from __future__ import annotations
29
29
 
30
- import warnings
31
30
  from typing import Sequence
32
31
 
33
32
  from google.api_core import path_template
@@ -58,9 +57,6 @@ class CloudMemorystoreHook(GoogleBaseHook):
58
57
  keyword arguments rather than positional.
59
58
 
60
59
  :param gcp_conn_id: The connection ID to use when fetching connection info.
61
- :param delegate_to: The account to impersonate using domain-wide delegation of authority,
62
- if any. For this to work, the service account making the request must have
63
- domain-wide delegation enabled.
64
60
  :param impersonation_chain: Optional service account to impersonate using short-term
65
61
  credentials, or chained list of accounts required to get the access_token
66
62
  of the last account in the list, which will be impersonated in the request.
@@ -74,16 +70,16 @@ class CloudMemorystoreHook(GoogleBaseHook):
74
70
  def __init__(
75
71
  self,
76
72
  gcp_conn_id: str = "google_cloud_default",
77
- delegate_to: str | None = None,
78
73
  impersonation_chain: str | Sequence[str] | None = None,
74
+ **kwargs,
79
75
  ) -> None:
80
- if delegate_to:
81
- warnings.warn(
82
- "'delegate_to' parameter is deprecated, please use 'impersonation_chain'", DeprecationWarning
76
+ if kwargs.get("delegate_to") is not None:
77
+ raise RuntimeError(
78
+ "The `delegate_to` parameter has been deprecated before and finally removed in this version"
79
+ " of Google Provider. You MUST convert it to `impersonate_chain`"
83
80
  )
84
81
  super().__init__(
85
82
  gcp_conn_id=gcp_conn_id,
86
- delegate_to=delegate_to,
87
83
  impersonation_chain=impersonation_chain,
88
84
  )
89
85
  self._client: CloudRedisClient | None = None
@@ -499,9 +495,6 @@ class CloudMemorystoreMemcachedHook(GoogleBaseHook):
499
495
  keyword arguments rather than positional.
500
496
 
501
497
  :param gcp_conn_id: The connection ID to use when fetching connection info.
502
- :param delegate_to: The account to impersonate using domain-wide delegation of authority,
503
- if any. For this to work, the service account making the request must have
504
- domain-wide delegation enabled.
505
498
  :param impersonation_chain: Optional service account to impersonate using short-term
506
499
  credentials, or chained list of accounts required to get the access_token
507
500
  of the last account in the list, which will be impersonated in the request.
@@ -515,12 +508,10 @@ class CloudMemorystoreMemcachedHook(GoogleBaseHook):
515
508
  def __init__(
516
509
  self,
517
510
  gcp_conn_id: str = "google_cloud_default",
518
- delegate_to: str | None = None,
519
511
  impersonation_chain: str | Sequence[str] | None = None,
520
512
  ) -> None:
521
513
  super().__init__(
522
514
  gcp_conn_id=gcp_conn_id,
523
- delegate_to=delegate_to,
524
515
  impersonation_chain=impersonation_chain,
525
516
  )
526
517
  self._client: CloudMemcacheClient | None = None
@@ -31,7 +31,6 @@ import string
31
31
  import subprocess
32
32
  import time
33
33
  import uuid
34
- import warnings
35
34
  from inspect import signature
36
35
  from pathlib import Path
37
36
  from subprocess import PIPE, Popen
@@ -80,7 +79,6 @@ class CloudSQLHook(GoogleBaseHook):
80
79
 
81
80
  :param api_version: This is the version of the api.
82
81
  :param gcp_conn_id: The Airflow connection used for GCP credentials.
83
- :param delegate_to: This performs a task on one host with reference to other hosts.
84
82
  :param impersonation_chain: This is the optional service account to impersonate using short term
85
83
  credentials.
86
84
  """
@@ -94,16 +92,16 @@ class CloudSQLHook(GoogleBaseHook):
94
92
  self,
95
93
  api_version: str,
96
94
  gcp_conn_id: str = default_conn_name,
97
- delegate_to: str | None = None,
98
95
  impersonation_chain: str | Sequence[str] | None = None,
96
+ **kwargs,
99
97
  ) -> None:
100
- if delegate_to:
101
- warnings.warn(
102
- "'delegate_to' parameter is deprecated, please use 'impersonation_chain'", DeprecationWarning
98
+ if kwargs.get("delegate_to") is not None:
99
+ raise RuntimeError(
100
+ "The `delegate_to` parameter has been deprecated before and finally removed in this version"
101
+ " of Google Provider. You MUST convert it to `impersonate_chain`"
103
102
  )
104
103
  super().__init__(
105
104
  gcp_conn_id=gcp_conn_id,
106
- delegate_to=delegate_to,
107
105
  impersonation_chain=impersonation_chain,
108
106
  )
109
107
  self.api_version = api_version
@@ -127,16 +127,16 @@ class CloudDataTransferServiceHook(GoogleBaseHook):
127
127
  self,
128
128
  api_version: str = "v1",
129
129
  gcp_conn_id: str = "google_cloud_default",
130
- delegate_to: str | None = None,
131
130
  impersonation_chain: str | Sequence[str] | None = None,
131
+ **kwargs,
132
132
  ) -> None:
133
- if delegate_to:
134
- warnings.warn(
135
- "'delegate_to' parameter is deprecated, please use 'impersonation_chain'", DeprecationWarning
133
+ if kwargs.get("delegate_to") is not None:
134
+ raise RuntimeError(
135
+ "The `delegate_to` parameter has been deprecated before and finally removed in this version"
136
+ " of Google Provider. You MUST convert it to `impersonate_chain`"
136
137
  )
137
138
  super().__init__(
138
139
  gcp_conn_id=gcp_conn_id,
139
- delegate_to=delegate_to,
140
140
  impersonation_chain=impersonation_chain,
141
141
  )
142
142
  self.api_version = api_version
@@ -19,7 +19,6 @@
19
19
  from __future__ import annotations
20
20
 
21
21
  import time
22
- import warnings
23
22
  from typing import Any, Sequence
24
23
 
25
24
  from google.api_core.retry import Retry
@@ -56,16 +55,16 @@ class ComputeEngineHook(GoogleBaseHook):
56
55
  self,
57
56
  api_version: str = "v1",
58
57
  gcp_conn_id: str = "google_cloud_default",
59
- delegate_to: str | None = None,
60
58
  impersonation_chain: str | Sequence[str] | None = None,
59
+ **kwargs,
61
60
  ) -> None:
62
- if delegate_to:
63
- warnings.warn(
64
- "'delegate_to' parameter is deprecated, please use 'impersonation_chain'", DeprecationWarning
61
+ if kwargs.get("delegate_to") is not None:
62
+ raise RuntimeError(
63
+ "The `delegate_to` parameter has been deprecated before and finally removed in this version"
64
+ " of Google Provider. You MUST convert it to `impersonate_chain`"
65
65
  )
66
66
  super().__init__(
67
67
  gcp_conn_id=gcp_conn_id,
68
- delegate_to=delegate_to,
69
68
  impersonation_chain=impersonation_chain,
70
69
  )
71
70
  self.api_version = api_version
@@ -18,7 +18,6 @@ from __future__ import annotations
18
18
 
19
19
  import shlex
20
20
  import time
21
- import warnings
22
21
  from io import StringIO
23
22
  from typing import Any
24
23
 
@@ -80,9 +79,6 @@ class ComputeEngineSSHHook(SSHHook):
80
79
  keys are managed using instance metadata
81
80
  :param expire_time: The maximum amount of time in seconds before the private key expires
82
81
  :param gcp_conn_id: The connection id to use when fetching connection information
83
- :param delegate_to: The account to impersonate, if any.
84
- For this to work, the service account making the request must have
85
- domain-wide delegation enabled.
86
82
  """
87
83
 
88
84
  conn_name_attr = "gcp_conn_id"
@@ -109,8 +105,13 @@ class ComputeEngineSSHHook(SSHHook):
109
105
  use_iap_tunnel: bool = False,
110
106
  use_oslogin: bool = True,
111
107
  expire_time: int = 300,
112
- delegate_to: str | None = None,
108
+ **kwargs,
113
109
  ) -> None:
110
+ if kwargs.get("delegate_to") is not None:
111
+ raise RuntimeError(
112
+ "The `delegate_to` parameter has been deprecated before and finally removed in this version"
113
+ " of Google Provider. You MUST convert it to `impersonate_chain`"
114
+ )
114
115
  # Ignore original constructor
115
116
  # super().__init__()
116
117
  self.instance_name = instance_name
@@ -123,20 +124,15 @@ class ComputeEngineSSHHook(SSHHook):
123
124
  self.use_oslogin = use_oslogin
124
125
  self.expire_time = expire_time
125
126
  self.gcp_conn_id = gcp_conn_id
126
- if delegate_to:
127
- warnings.warn(
128
- "'delegate_to' parameter is deprecated, please use 'impersonation_chain'", DeprecationWarning
129
- )
130
- self.delegate_to = delegate_to
131
127
  self._conn: Any | None = None
132
128
 
133
129
  @cached_property
134
130
  def _oslogin_hook(self) -> OSLoginHook:
135
- return OSLoginHook(gcp_conn_id=self.gcp_conn_id, delegate_to=self.delegate_to)
131
+ return OSLoginHook(gcp_conn_id=self.gcp_conn_id)
136
132
 
137
133
  @cached_property
138
134
  def _compute_hook(self) -> ComputeEngineHook:
139
- return ComputeEngineHook(gcp_conn_id=self.gcp_conn_id, delegate_to=self.delegate_to)
135
+ return ComputeEngineHook(gcp_conn_id=self.gcp_conn_id)
140
136
 
141
137
  def _load_connection_config(self):
142
138
  def _boolify(value):
@@ -16,7 +16,6 @@
16
16
  # under the License.
17
17
  from __future__ import annotations
18
18
 
19
- import warnings
20
19
  from typing import Sequence
21
20
 
22
21
  from google.api_core.gapic_v1.method import DEFAULT, _MethodDefault
@@ -44,9 +43,6 @@ class CloudDataCatalogHook(GoogleBaseHook):
44
43
  Hook for Google Cloud Data Catalog Service.
45
44
 
46
45
  :param gcp_conn_id: The connection ID to use when fetching connection info.
47
- :param delegate_to: The account to impersonate using domain-wide delegation of authority,
48
- if any. For this to work, the service account making the request must have
49
- domain-wide delegation enabled.
50
46
  :param impersonation_chain: Optional service account to impersonate using short-term
51
47
  credentials, or chained list of accounts required to get the access_token
52
48
  of the last account in the list, which will be impersonated in the request.
@@ -60,16 +56,16 @@ class CloudDataCatalogHook(GoogleBaseHook):
60
56
  def __init__(
61
57
  self,
62
58
  gcp_conn_id: str = "google_cloud_default",
63
- delegate_to: str | None = None,
64
59
  impersonation_chain: str | Sequence[str] | None = None,
60
+ **kwargs,
65
61
  ) -> None:
66
- if delegate_to:
67
- warnings.warn(
68
- "'delegate_to' parameter is deprecated, please use 'impersonation_chain'", DeprecationWarning
62
+ if kwargs.get("delegate_to") is not None:
63
+ raise RuntimeError(
64
+ "The `delegate_to` parameter has been deprecated before and finally removed in this version"
65
+ " of Google Provider. You MUST convert it to `impersonate_chain`"
69
66
  )
70
67
  super().__init__(
71
68
  gcp_conn_id=gcp_conn_id,
72
- delegate_to=delegate_to,
73
69
  impersonation_chain=impersonation_chain,
74
70
  )
75
71
  self._client: DataCatalogClient | None = None
@@ -516,26 +516,26 @@ class DataflowHook(GoogleBaseHook):
516
516
  def __init__(
517
517
  self,
518
518
  gcp_conn_id: str = "google_cloud_default",
519
- delegate_to: str | None = None,
520
519
  poll_sleep: int = 10,
521
520
  impersonation_chain: str | Sequence[str] | None = None,
522
521
  drain_pipeline: bool = False,
523
522
  cancel_timeout: int | None = 5 * 60,
524
523
  wait_until_finished: bool | None = None,
524
+ **kwargs,
525
525
  ) -> None:
526
+ if kwargs.get("delegate_to") is not None:
527
+ raise RuntimeError(
528
+ "The `delegate_to` parameter has been deprecated before and finally removed in this version"
529
+ " of Google Provider. You MUST convert it to `impersonate_chain`"
530
+ )
526
531
  self.poll_sleep = poll_sleep
527
532
  self.drain_pipeline = drain_pipeline
528
533
  self.cancel_timeout = cancel_timeout
529
534
  self.wait_until_finished = wait_until_finished
530
535
  self.job_id: str | None = None
531
536
  self.beam_hook = BeamHook(BeamRunnerType.DataflowRunner)
532
- if delegate_to:
533
- warnings.warn(
534
- "'delegate_to' parameter is deprecated, please use 'impersonation_chain'", DeprecationWarning
535
- )
536
537
  super().__init__(
537
538
  gcp_conn_id=gcp_conn_id,
538
- delegate_to=delegate_to,
539
539
  impersonation_chain=impersonation_chain,
540
540
  )
541
541
 
@@ -1189,6 +1189,14 @@ class AsyncDataflowHook(GoogleBaseAsyncHook):
1189
1189
 
1190
1190
  sync_hook_class = DataflowHook
1191
1191
 
1192
+ def __init__(self, **kwargs):
1193
+ if kwargs.get("delegate_to") is not None:
1194
+ raise RuntimeError(
1195
+ "The `delegate_to` parameter has been deprecated before and finally removed in this version"
1196
+ " of Google Provider. You MUST convert it to `impersonate_chain`"
1197
+ )
1198
+ super().__init__(**kwargs)
1199
+
1192
1200
  async def initialize_client(self, client_class):
1193
1201
  """
1194
1202
  Initialize object of the given class.
@@ -38,6 +38,14 @@ from airflow.providers.google.common.hooks.base_google import GoogleBaseHook
38
38
  class DataformHook(GoogleBaseHook):
39
39
  """Hook for Google Cloud DataForm APIs."""
40
40
 
41
+ def __init__(self, **kwargs):
42
+ if kwargs.get("delegate_to") is not None:
43
+ raise RuntimeError(
44
+ "The `delegate_to` parameter has been deprecated before and finally removed in this version"
45
+ " of Google Provider. You MUST convert it to `impersonate_chain`"
46
+ )
47
+ super().__init__(**kwargs)
48
+
41
49
  def get_dataform_client(self) -> DataformClient:
42
50
  """Retrieves client library object that allow access to Cloud Dataform service."""
43
51
  return DataformClient(credentials=self.get_credentials())
@@ -19,7 +19,6 @@ from __future__ import annotations
19
19
 
20
20
  import json
21
21
  import os
22
- import warnings
23
22
  from time import monotonic, sleep
24
23
  from typing import Any, Dict, Sequence
25
24
  from urllib.parse import quote, urlencode, urljoin
@@ -67,16 +66,16 @@ class DataFusionHook(GoogleBaseHook):
67
66
  self,
68
67
  api_version: str = "v1beta1",
69
68
  gcp_conn_id: str = "google_cloud_default",
70
- delegate_to: str | None = None,
71
69
  impersonation_chain: str | Sequence[str] | None = None,
70
+ **kwargs,
72
71
  ) -> None:
73
- if delegate_to:
74
- warnings.warn(
75
- "'delegate_to' parameter is deprecated, please use 'impersonation_chain'", DeprecationWarning
72
+ if kwargs.get("delegate_to") is not None:
73
+ raise RuntimeError(
74
+ "The `delegate_to` parameter has been deprecated before and finally removed in this version"
75
+ " of Google Provider. You MUST convert it to `impersonate_chain`"
76
76
  )
77
77
  super().__init__(
78
78
  gcp_conn_id=gcp_conn_id,
79
- delegate_to=delegate_to,
80
79
  impersonation_chain=impersonation_chain,
81
80
  )
82
81
  self.api_version = api_version
@@ -490,6 +489,14 @@ class DataFusionAsyncHook(GoogleBaseAsyncHook):
490
489
  sync_hook_class = DataFusionHook
491
490
  scopes = ["https://www.googleapis.com/auth/cloud-platform"]
492
491
 
492
+ def __init__(self, **kwargs):
493
+ if kwargs.get("delegate_to") is not None:
494
+ raise RuntimeError(
495
+ "The `delegate_to` parameter has been deprecated before and finally removed in this version"
496
+ " of Google Provider. You MUST convert it to `impersonate_chain`"
497
+ )
498
+ super().__init__(**kwargs)
499
+
493
500
  @staticmethod
494
501
  def _base_url(instance_url: str, namespace: str) -> str:
495
502
  return urljoin(f"{instance_url}/", f"v3/namespaces/{quote(namespace)}/apps/")
@@ -17,7 +17,6 @@
17
17
  """This module contains Google Dataplex hook."""
18
18
  from __future__ import annotations
19
19
 
20
- import warnings
21
20
  from typing import Any, Sequence
22
21
 
23
22
  from google.api_core.client_options import ClientOptions
@@ -39,8 +38,6 @@ class DataplexHook(GoogleBaseHook):
39
38
 
40
39
  :param api_version: The version of the api that will be requested for example 'v3'.
41
40
  :param gcp_conn_id: The connection ID to use when fetching connection info.
42
- :param delegate_to: The account to impersonate, if any. For this to work, the service accountmaking the
43
- request must have domain-wide delegation enabled.
44
41
  :param impersonation_chain: Optional service account to impersonate using short-term
45
42
  credentials, or chained list of accounts required to get the access_token
46
43
  of the last account in the list, which will be impersonated in the request.
@@ -57,16 +54,16 @@ class DataplexHook(GoogleBaseHook):
57
54
  self,
58
55
  api_version: str = "v1",
59
56
  gcp_conn_id: str = "google_cloud_default",
60
- delegate_to: str | None = None,
61
57
  impersonation_chain: str | Sequence[str] | None = None,
58
+ **kwargs,
62
59
  ) -> None:
63
- if delegate_to:
64
- warnings.warn(
65
- "'delegate_to' parameter is deprecated, please use 'impersonation_chain'", DeprecationWarning
60
+ if kwargs.get("delegate_to") is not None:
61
+ raise RuntimeError(
62
+ "The `delegate_to` parameter has been deprecated before and finally removed in this version"
63
+ " of Google Provider. You MUST convert it to `impersonate_chain`"
66
64
  )
67
65
  super().__init__(
68
66
  gcp_conn_id=gcp_conn_id,
69
- delegate_to=delegate_to,
70
67
  impersonation_chain=impersonation_chain,
71
68
  )
72
69
  self.api_version = api_version