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
@@ -17,7 +17,6 @@
17
17
  # under the License.
18
18
  from __future__ import annotations
19
19
 
20
- import warnings
21
20
  from typing import TYPE_CHECKING, Sequence
22
21
 
23
22
  from google.api_core.exceptions import AlreadyExists
@@ -106,9 +105,6 @@ class CloudComposerCreateEnvironmentOperator(GoogleCloudBaseOperator):
106
105
  If set as a sequence, the identities from the list must grant
107
106
  Service Account Token Creator IAM role to the directly preceding identity, with first
108
107
  account from the list granting this role to the originating account (templated).
109
- :param delegate_to: The account to impersonate using domain-wide delegation of authority,
110
- if any. For this to work, the service account making the request must have
111
- domain-wide delegation enabled.
112
108
  :param retry: Designation of what errors, if any, should be retried.
113
109
  :param timeout: The timeout for this request.
114
110
  :param metadata: Strings which should be sent along with the request as metadata.
@@ -136,7 +132,6 @@ class CloudComposerCreateEnvironmentOperator(GoogleCloudBaseOperator):
136
132
  environment: Environment | dict,
137
133
  gcp_conn_id: str = "google_cloud_default",
138
134
  impersonation_chain: str | Sequence[str] | None = None,
139
- delegate_to: str | None = None,
140
135
  retry: Retry | _MethodDefault = DEFAULT,
141
136
  timeout: float | None = None,
142
137
  metadata: Sequence[tuple[str, str]] = (),
@@ -154,11 +149,6 @@ class CloudComposerCreateEnvironmentOperator(GoogleCloudBaseOperator):
154
149
  self.metadata = metadata
155
150
  self.gcp_conn_id = gcp_conn_id
156
151
  self.impersonation_chain = impersonation_chain
157
- if delegate_to:
158
- warnings.warn(
159
- "'delegate_to' parameter is deprecated, please use 'impersonation_chain'", DeprecationWarning
160
- )
161
- self.delegate_to = delegate_to
162
152
  self.deferrable = deferrable
163
153
  self.pooling_period_seconds = pooling_period_seconds
164
154
 
@@ -166,7 +156,6 @@ class CloudComposerCreateEnvironmentOperator(GoogleCloudBaseOperator):
166
156
  hook = CloudComposerHook(
167
157
  gcp_conn_id=self.gcp_conn_id,
168
158
  impersonation_chain=self.impersonation_chain,
169
- delegate_to=self.delegate_to,
170
159
  )
171
160
 
172
161
  name = hook.get_environment_name(self.project_id, self.region, self.environment_id)
@@ -198,7 +187,6 @@ class CloudComposerCreateEnvironmentOperator(GoogleCloudBaseOperator):
198
187
  operation_name=result.operation.name,
199
188
  gcp_conn_id=self.gcp_conn_id,
200
189
  impersonation_chain=self.impersonation_chain,
201
- delegate_to=self.delegate_to,
202
190
  pooling_period_seconds=self.pooling_period_seconds,
203
191
  ),
204
192
  method_name=GOOGLE_DEFAULT_DEFERRABLE_METHOD_NAME,
@@ -219,7 +207,6 @@ class CloudComposerCreateEnvironmentOperator(GoogleCloudBaseOperator):
219
207
  hook = CloudComposerHook(
220
208
  gcp_conn_id=self.gcp_conn_id,
221
209
  impersonation_chain=self.impersonation_chain,
222
- delegate_to=self.delegate_to,
223
210
  )
224
211
 
225
212
  env = hook.get_environment(
@@ -254,12 +241,9 @@ class CloudComposerDeleteEnvironmentOperator(GoogleCloudBaseOperator):
254
241
  If set as a sequence, the identities from the list must grant
255
242
  Service Account Token Creator IAM role to the directly preceding identity, with first
256
243
  account from the list granting this role to the originating account (templated).
257
- :param delegate_to: The account to impersonate using domain-wide delegation of authority,
258
- if any. For this to work, the service account making the request must have
259
- domain-wide delegation enabled.
260
244
  :param deferrable: Run operator in the deferrable mode
261
245
  :param pooling_period_seconds: Optional: Control the rate of the poll for the result of deferrable run.
262
- By default the trigger will poll every 30 seconds.
246
+ By default, the trigger will poll every 30 seconds.
263
247
  """
264
248
 
265
249
  template_fields = (
@@ -280,7 +264,6 @@ class CloudComposerDeleteEnvironmentOperator(GoogleCloudBaseOperator):
280
264
  metadata: Sequence[tuple[str, str]] = (),
281
265
  gcp_conn_id: str = "google_cloud_default",
282
266
  impersonation_chain: str | Sequence[str] | None = None,
283
- delegate_to: str | None = None,
284
267
  deferrable: bool = False,
285
268
  pooling_period_seconds: int = 30,
286
269
  **kwargs,
@@ -294,11 +277,6 @@ class CloudComposerDeleteEnvironmentOperator(GoogleCloudBaseOperator):
294
277
  self.metadata = metadata
295
278
  self.gcp_conn_id = gcp_conn_id
296
279
  self.impersonation_chain = impersonation_chain
297
- if delegate_to:
298
- warnings.warn(
299
- "'delegate_to' parameter is deprecated, please use 'impersonation_chain'", DeprecationWarning
300
- )
301
- self.delegate_to = delegate_to
302
280
  self.deferrable = deferrable
303
281
  self.pooling_period_seconds = pooling_period_seconds
304
282
 
@@ -306,7 +284,6 @@ class CloudComposerDeleteEnvironmentOperator(GoogleCloudBaseOperator):
306
284
  hook = CloudComposerHook(
307
285
  gcp_conn_id=self.gcp_conn_id,
308
286
  impersonation_chain=self.impersonation_chain,
309
- delegate_to=self.delegate_to,
310
287
  )
311
288
  result = hook.delete_environment(
312
289
  project_id=self.project_id,
@@ -326,7 +303,6 @@ class CloudComposerDeleteEnvironmentOperator(GoogleCloudBaseOperator):
326
303
  operation_name=result.operation.name,
327
304
  gcp_conn_id=self.gcp_conn_id,
328
305
  impersonation_chain=self.impersonation_chain,
329
- delegate_to=self.delegate_to,
330
306
  pooling_period_seconds=self.pooling_period_seconds,
331
307
  ),
332
308
  method_name=GOOGLE_DEFAULT_DEFERRABLE_METHOD_NAME,
@@ -355,9 +331,6 @@ class CloudComposerGetEnvironmentOperator(GoogleCloudBaseOperator):
355
331
  If set as a sequence, the identities from the list must grant
356
332
  Service Account Token Creator IAM role to the directly preceding identity, with first
357
333
  account from the list granting this role to the originating account (templated).
358
- :param delegate_to: The account to impersonate using domain-wide delegation of authority,
359
- if any. For this to work, the service account making the request must have
360
- domain-wide delegation enabled.
361
334
  """
362
335
 
363
336
  template_fields = (
@@ -380,7 +353,6 @@ class CloudComposerGetEnvironmentOperator(GoogleCloudBaseOperator):
380
353
  metadata: Sequence[tuple[str, str]] = (),
381
354
  gcp_conn_id: str = "google_cloud_default",
382
355
  impersonation_chain: str | Sequence[str] | None = None,
383
- delegate_to: str | None = None,
384
356
  **kwargs,
385
357
  ) -> None:
386
358
  super().__init__(**kwargs)
@@ -392,17 +364,11 @@ class CloudComposerGetEnvironmentOperator(GoogleCloudBaseOperator):
392
364
  self.metadata = metadata
393
365
  self.gcp_conn_id = gcp_conn_id
394
366
  self.impersonation_chain = impersonation_chain
395
- if delegate_to:
396
- warnings.warn(
397
- "'delegate_to' parameter is deprecated, please use 'impersonation_chain'", DeprecationWarning
398
- )
399
- self.delegate_to = delegate_to
400
367
 
401
368
  def execute(self, context: Context):
402
369
  hook = CloudComposerHook(
403
370
  gcp_conn_id=self.gcp_conn_id,
404
371
  impersonation_chain=self.impersonation_chain,
405
- delegate_to=self.delegate_to,
406
372
  )
407
373
 
408
374
  result = hook.get_environment(
@@ -439,9 +405,6 @@ class CloudComposerListEnvironmentsOperator(GoogleCloudBaseOperator):
439
405
  If set as a sequence, the identities from the list must grant
440
406
  Service Account Token Creator IAM role to the directly preceding identity, with first
441
407
  account from the list granting this role to the originating account (templated).
442
- :param delegate_to: The account to impersonate using domain-wide delegation of authority,
443
- if any. For this to work, the service account making the request must have
444
- domain-wide delegation enabled.
445
408
  """
446
409
 
447
410
  template_fields = (
@@ -464,7 +427,6 @@ class CloudComposerListEnvironmentsOperator(GoogleCloudBaseOperator):
464
427
  metadata: Sequence[tuple[str, str]] = (),
465
428
  gcp_conn_id: str = "google_cloud_default",
466
429
  impersonation_chain: str | Sequence[str] | None = None,
467
- delegate_to: str | None = None,
468
430
  **kwargs,
469
431
  ) -> None:
470
432
  super().__init__(**kwargs)
@@ -477,17 +439,11 @@ class CloudComposerListEnvironmentsOperator(GoogleCloudBaseOperator):
477
439
  self.metadata = metadata
478
440
  self.gcp_conn_id = gcp_conn_id
479
441
  self.impersonation_chain = impersonation_chain
480
- if delegate_to:
481
- warnings.warn(
482
- "'delegate_to' parameter is deprecated, please use 'impersonation_chain'", DeprecationWarning
483
- )
484
- self.delegate_to = delegate_to
485
442
 
486
443
  def execute(self, context: Context):
487
444
  hook = CloudComposerHook(
488
445
  gcp_conn_id=self.gcp_conn_id,
489
446
  impersonation_chain=self.impersonation_chain,
490
- delegate_to=self.delegate_to,
491
447
  )
492
448
  CloudComposerEnvironmentsLink.persist(operator_instance=self, context=context)
493
449
  result = hook.list_environments(
@@ -526,12 +482,9 @@ class CloudComposerUpdateEnvironmentOperator(GoogleCloudBaseOperator):
526
482
  If set as a sequence, the identities from the list must grant
527
483
  Service Account Token Creator IAM role to the directly preceding identity, with first
528
484
  account from the list granting this role to the originating account (templated).
529
- :param delegate_to: The account to impersonate using domain-wide delegation of authority,
530
- if any. For this to work, the service account making the request must have
531
- domain-wide delegation enabled.
532
485
  :param deferrable: Run operator in the deferrable mode
533
486
  :param pooling_period_seconds: Optional: Control the rate of the poll for the result of deferrable run.
534
- By default the trigger will poll every 30 seconds.
487
+ By default, the trigger will poll every 30 seconds.
535
488
  """
536
489
 
537
490
  template_fields = (
@@ -556,7 +509,6 @@ class CloudComposerUpdateEnvironmentOperator(GoogleCloudBaseOperator):
556
509
  metadata: Sequence[tuple[str, str]] = (),
557
510
  gcp_conn_id: str = "google_cloud_default",
558
511
  impersonation_chain: str | Sequence[str] | None = None,
559
- delegate_to: str | None = None,
560
512
  deferrable: bool = False,
561
513
  pooling_period_seconds: int = 30,
562
514
  **kwargs,
@@ -572,11 +524,6 @@ class CloudComposerUpdateEnvironmentOperator(GoogleCloudBaseOperator):
572
524
  self.metadata = metadata
573
525
  self.gcp_conn_id = gcp_conn_id
574
526
  self.impersonation_chain = impersonation_chain
575
- if delegate_to:
576
- warnings.warn(
577
- "'delegate_to' parameter is deprecated, please use 'impersonation_chain'", DeprecationWarning
578
- )
579
- self.delegate_to = delegate_to
580
527
  self.deferrable = deferrable
581
528
  self.pooling_period_seconds = pooling_period_seconds
582
529
 
@@ -584,7 +531,6 @@ class CloudComposerUpdateEnvironmentOperator(GoogleCloudBaseOperator):
584
531
  hook = CloudComposerHook(
585
532
  gcp_conn_id=self.gcp_conn_id,
586
533
  impersonation_chain=self.impersonation_chain,
587
- delegate_to=self.delegate_to,
588
534
  )
589
535
 
590
536
  result = hook.update_environment(
@@ -610,7 +556,6 @@ class CloudComposerUpdateEnvironmentOperator(GoogleCloudBaseOperator):
610
556
  operation_name=result.operation.name,
611
557
  gcp_conn_id=self.gcp_conn_id,
612
558
  impersonation_chain=self.impersonation_chain,
613
- delegate_to=self.delegate_to,
614
559
  pooling_period_seconds=self.pooling_period_seconds,
615
560
  ),
616
561
  method_name=GOOGLE_DEFAULT_DEFERRABLE_METHOD_NAME,
@@ -621,7 +566,6 @@ class CloudComposerUpdateEnvironmentOperator(GoogleCloudBaseOperator):
621
566
  hook = CloudComposerHook(
622
567
  gcp_conn_id=self.gcp_conn_id,
623
568
  impersonation_chain=self.impersonation_chain,
624
- delegate_to=self.delegate_to,
625
569
  )
626
570
 
627
571
  env = hook.get_environment(
@@ -654,9 +598,6 @@ class CloudComposerListImageVersionsOperator(GoogleCloudBaseOperator):
654
598
  If set as a sequence, the identities from the list must grant
655
599
  Service Account Token Creator IAM role to the directly preceding identity, with first
656
600
  account from the list granting this role to the originating account (templated).
657
- :param delegate_to: The account to impersonate using domain-wide delegation of authority,
658
- if any. For this to work, the service account making the request must have
659
- domain-wide delegation enabled.
660
601
  """
661
602
 
662
603
  template_fields = (
@@ -678,7 +619,6 @@ class CloudComposerListImageVersionsOperator(GoogleCloudBaseOperator):
678
619
  metadata: Sequence[tuple[str, str]] = (),
679
620
  gcp_conn_id: str = "google_cloud_default",
680
621
  impersonation_chain: str | Sequence[str] | None = None,
681
- delegate_to: str | None = None,
682
622
  **kwargs,
683
623
  ) -> None:
684
624
  super().__init__(**kwargs)
@@ -692,17 +632,11 @@ class CloudComposerListImageVersionsOperator(GoogleCloudBaseOperator):
692
632
  self.metadata = metadata
693
633
  self.gcp_conn_id = gcp_conn_id
694
634
  self.impersonation_chain = impersonation_chain
695
- if delegate_to:
696
- warnings.warn(
697
- "'delegate_to' parameter is deprecated, please use 'impersonation_chain'", DeprecationWarning
698
- )
699
- self.delegate_to = delegate_to
700
635
 
701
636
  def execute(self, context: Context):
702
637
  hook = CloudComposerHook(
703
638
  gcp_conn_id=self.gcp_conn_id,
704
639
  impersonation_chain=self.impersonation_chain,
705
- delegate_to=self.delegate_to,
706
640
  )
707
641
  result = hook.list_image_versions(
708
642
  project_id=self.project_id,
@@ -18,7 +18,6 @@
18
18
  """This module contains Google Cloud Transfer operators."""
19
19
  from __future__ import annotations
20
20
 
21
- import warnings
22
21
  from copy import deepcopy
23
22
  from datetime import date, time
24
23
  from typing import TYPE_CHECKING, Sequence
@@ -795,9 +794,6 @@ class CloudDataTransferServiceS3ToGCSOperator(GoogleCloudBaseOperator):
795
794
  :param aws_conn_id: The source S3 connection
796
795
  :param gcp_conn_id: The destination connection ID to use
797
796
  when connecting to Google Cloud Storage.
798
- :param delegate_to: Google account to impersonate using domain-wide delegation of authority,
799
- if any. For this to work, the service account making the request must have
800
- domain-wide delegation enabled.
801
797
  :param description: Optional transfer service job description
802
798
  :param schedule: Optional transfer service schedule;
803
799
  If not set, run transfer job once as soon as the operator runs
@@ -849,7 +845,6 @@ class CloudDataTransferServiceS3ToGCSOperator(GoogleCloudBaseOperator):
849
845
  project_id: str | None = None,
850
846
  aws_conn_id: str = "aws_default",
851
847
  gcp_conn_id: str = "google_cloud_default",
852
- delegate_to: str | None = None,
853
848
  description: str | None = None,
854
849
  schedule: dict | None = None,
855
850
  object_conditions: dict | None = None,
@@ -869,11 +864,6 @@ class CloudDataTransferServiceS3ToGCSOperator(GoogleCloudBaseOperator):
869
864
  self.project_id = project_id
870
865
  self.aws_conn_id = aws_conn_id
871
866
  self.gcp_conn_id = gcp_conn_id
872
- if delegate_to:
873
- warnings.warn(
874
- "'delegate_to' parameter is deprecated, please use 'impersonation_chain'", DeprecationWarning
875
- )
876
- self.delegate_to = delegate_to
877
867
  self.description = description
878
868
  self.schedule = schedule
879
869
  self.object_conditions = object_conditions
@@ -891,7 +881,6 @@ class CloudDataTransferServiceS3ToGCSOperator(GoogleCloudBaseOperator):
891
881
  def execute(self, context: Context) -> None:
892
882
  hook = CloudDataTransferServiceHook(
893
883
  gcp_conn_id=self.gcp_conn_id,
894
- delegate_to=self.delegate_to,
895
884
  impersonation_chain=self.google_impersonation_chain,
896
885
  )
897
886
  body = self._create_body()
@@ -971,9 +960,6 @@ class CloudDataTransferServiceGCSToGCSOperator(GoogleCloudBaseOperator):
971
960
  owns the job
972
961
  :param gcp_conn_id: Optional connection ID to use when connecting to Google Cloud
973
962
  Storage.
974
- :param delegate_to: Google account to impersonate using domain-wide delegation of authority,
975
- if any. For this to work, the service account making the request must have
976
- domain-wide delegation enabled.
977
963
  :param description: Optional transfer service job description
978
964
  :param schedule: Optional transfer service schedule;
979
965
  If not set, run transfer job once as soon as the operator runs
@@ -1024,7 +1010,6 @@ class CloudDataTransferServiceGCSToGCSOperator(GoogleCloudBaseOperator):
1024
1010
  destination_path: str | None = None,
1025
1011
  project_id: str | None = None,
1026
1012
  gcp_conn_id: str = "google_cloud_default",
1027
- delegate_to: str | None = None,
1028
1013
  description: str | None = None,
1029
1014
  schedule: dict | None = None,
1030
1015
  object_conditions: dict | None = None,
@@ -1043,11 +1028,6 @@ class CloudDataTransferServiceGCSToGCSOperator(GoogleCloudBaseOperator):
1043
1028
  self.destination_path = destination_path
1044
1029
  self.project_id = project_id
1045
1030
  self.gcp_conn_id = gcp_conn_id
1046
- if delegate_to:
1047
- warnings.warn(
1048
- "'delegate_to' parameter is deprecated, please use 'impersonation_chain'", DeprecationWarning
1049
- )
1050
- self.delegate_to = delegate_to
1051
1031
  self.description = description
1052
1032
  self.schedule = schedule
1053
1033
  self.object_conditions = object_conditions
@@ -1065,7 +1045,6 @@ class CloudDataTransferServiceGCSToGCSOperator(GoogleCloudBaseOperator):
1065
1045
  def execute(self, context: Context) -> None:
1066
1046
  hook = CloudDataTransferServiceHook(
1067
1047
  gcp_conn_id=self.gcp_conn_id,
1068
- delegate_to=self.delegate_to,
1069
1048
  impersonation_chain=self.google_impersonation_chain,
1070
1049
  )
1071
1050
 
@@ -70,8 +70,6 @@ class DataflowConfiguration:
70
70
  If set to None or missing, the default project_id from the Google Cloud connection is used.
71
71
  :param location: Job location.
72
72
  :param gcp_conn_id: The connection ID to use connecting to Google Cloud.
73
- :param delegate_to: The account to impersonate using domain-wide delegation of authority, if any.
74
- For this to work, the service account making the request must have domain-wide delegation enabled.
75
73
  :param poll_sleep: The time in seconds to sleep between polling Google
76
74
  Cloud Platform for the dataflow job status while the job is in the
77
75
  JOB_STATE_RUNNING state.
@@ -140,7 +138,6 @@ class DataflowConfiguration:
140
138
  project_id: str | None = None,
141
139
  location: str | None = DEFAULT_DATAFLOW_LOCATION,
142
140
  gcp_conn_id: str = "google_cloud_default",
143
- delegate_to: str | None = None,
144
141
  poll_sleep: int = 10,
145
142
  impersonation_chain: str | Sequence[str] | None = None,
146
143
  drain_pipeline: bool = False,
@@ -155,11 +152,6 @@ class DataflowConfiguration:
155
152
  self.project_id = project_id
156
153
  self.location = location
157
154
  self.gcp_conn_id = gcp_conn_id
158
- if delegate_to:
159
- warnings.warn(
160
- "'delegate_to' parameter is deprecated, please use 'impersonation_chain'", DeprecationWarning
161
- )
162
- self.delegate_to = delegate_to
163
155
  self.poll_sleep = poll_sleep
164
156
  self.impersonation_chain = impersonation_chain
165
157
  self.drain_pipeline = drain_pipeline
@@ -243,9 +235,6 @@ class DataflowCreateJavaJobOperator(GoogleCloudBaseOperator):
243
235
  If set to None or missing, the default project_id from the Google Cloud connection is used.
244
236
  :param location: Job location.
245
237
  :param gcp_conn_id: The connection ID to use connecting to Google Cloud.
246
- :param delegate_to: The account to impersonate using domain-wide delegation of authority,
247
- if any. For this to work, the service account making the request must have
248
- domain-wide delegation enabled.
249
238
  :param poll_sleep: The time in seconds to sleep between polling Google
250
239
  Cloud Platform for the dataflow job status while the job is in the
251
240
  JOB_STATE_RUNNING state.
@@ -346,7 +335,6 @@ class DataflowCreateJavaJobOperator(GoogleCloudBaseOperator):
346
335
  project_id: str | None = None,
347
336
  location: str = DEFAULT_DATAFLOW_LOCATION,
348
337
  gcp_conn_id: str = "google_cloud_default",
349
- delegate_to: str | None = None,
350
338
  poll_sleep: int = 10,
351
339
  job_class: str | None = None,
352
340
  check_if_running: CheckJobRunning = CheckJobRunning.WaitForRun,
@@ -372,11 +360,6 @@ class DataflowCreateJavaJobOperator(GoogleCloudBaseOperator):
372
360
  self.project_id = project_id
373
361
  self.location = location
374
362
  self.gcp_conn_id = gcp_conn_id
375
- if delegate_to:
376
- warnings.warn(
377
- "'delegate_to' parameter is deprecated, please use 'impersonation_chain'", DeprecationWarning
378
- )
379
- self.delegate_to = delegate_to
380
363
  self.jar = jar
381
364
  self.multiple_jobs = multiple_jobs
382
365
  self.job_name = job_name
@@ -396,7 +379,6 @@ class DataflowCreateJavaJobOperator(GoogleCloudBaseOperator):
396
379
  self.beam_hook = BeamHook(runner=BeamRunnerType.DataflowRunner)
397
380
  self.dataflow_hook = DataflowHook(
398
381
  gcp_conn_id=self.gcp_conn_id,
399
- delegate_to=self.delegate_to,
400
382
  poll_sleep=self.poll_sleep,
401
383
  cancel_timeout=self.cancel_timeout,
402
384
  wait_until_finished=self.wait_until_finished,
@@ -422,7 +404,7 @@ class DataflowCreateJavaJobOperator(GoogleCloudBaseOperator):
422
404
 
423
405
  with ExitStack() as exit_stack:
424
406
  if self.jar.lower().startswith("gs://"):
425
- gcs_hook = GCSHook(self.gcp_conn_id, self.delegate_to)
407
+ gcs_hook = GCSHook(self.gcp_conn_id)
426
408
  tmp_gcs_file = exit_stack.enter_context(gcs_hook.provide_file(object_url=self.jar))
427
409
  self.jar = tmp_gcs_file.name
428
410
 
@@ -490,9 +472,6 @@ class DataflowTemplatedJobStartOperator(GoogleCloudBaseOperator):
490
472
  If set to None or missing, the default project_id from the Google Cloud connection is used.
491
473
  :param location: Job location.
492
474
  :param gcp_conn_id: The connection ID to use connecting to Google Cloud.
493
- :param delegate_to: The account to impersonate using domain-wide delegation of authority,
494
- if any. For this to work, the service account making the request must have
495
- domain-wide delegation enabled.
496
475
  :param poll_sleep: The time in seconds to sleep between polling Google
497
476
  Cloud Platform for the dataflow job status while the job is in the
498
477
  JOB_STATE_RUNNING state.
@@ -622,7 +601,6 @@ class DataflowTemplatedJobStartOperator(GoogleCloudBaseOperator):
622
601
  parameters: dict[str, str] | None = None,
623
602
  location: str = DEFAULT_DATAFLOW_LOCATION,
624
603
  gcp_conn_id: str = "google_cloud_default",
625
- delegate_to: str | None = None,
626
604
  poll_sleep: int = 10,
627
605
  impersonation_chain: str | Sequence[str] | None = None,
628
606
  environment: dict | None = None,
@@ -642,11 +620,6 @@ class DataflowTemplatedJobStartOperator(GoogleCloudBaseOperator):
642
620
  self.project_id = project_id
643
621
  self.location = location
644
622
  self.gcp_conn_id = gcp_conn_id
645
- if delegate_to:
646
- warnings.warn(
647
- "'delegate_to' parameter is deprecated, please use 'impersonation_chain'", DeprecationWarning
648
- )
649
- self.delegate_to = delegate_to
650
623
  self.poll_sleep = poll_sleep
651
624
  self.impersonation_chain = impersonation_chain
652
625
  self.environment = environment
@@ -674,7 +647,6 @@ class DataflowTemplatedJobStartOperator(GoogleCloudBaseOperator):
674
647
  def hook(self) -> DataflowHook:
675
648
  hook = DataflowHook(
676
649
  gcp_conn_id=self.gcp_conn_id,
677
- delegate_to=self.delegate_to,
678
650
  poll_sleep=self.poll_sleep,
679
651
  impersonation_chain=self.impersonation_chain,
680
652
  cancel_timeout=self.cancel_timeout,
@@ -719,7 +691,6 @@ class DataflowTemplatedJobStartOperator(GoogleCloudBaseOperator):
719
691
  job_id=job_id,
720
692
  location=self.location,
721
693
  gcp_conn_id=self.gcp_conn_id,
722
- delegate_to=self.delegate_to,
723
694
  poll_sleep=self.poll_sleep,
724
695
  impersonation_chain=self.impersonation_chain,
725
696
  cancel_timeout=self.cancel_timeout,
@@ -763,9 +734,6 @@ class DataflowStartFlexTemplateOperator(GoogleCloudBaseOperator):
763
734
  :param project_id: The ID of the GCP project that owns the job.
764
735
  :param gcp_conn_id: The connection ID to use connecting to Google Cloud
765
736
  Platform.
766
- :param delegate_to: The account to impersonate, if any.
767
- For this to work, the service account making the request must have
768
- domain-wide delegation enabled.
769
737
  :param drain_pipeline: Optional, set to True if want to stop streaming job by draining it
770
738
  instead of canceling during killing task instance. See:
771
739
  https://cloud.google.com/dataflow/docs/guides/stopping-a-pipeline
@@ -824,7 +792,6 @@ class DataflowStartFlexTemplateOperator(GoogleCloudBaseOperator):
824
792
  location: str,
825
793
  project_id: str | None = None,
826
794
  gcp_conn_id: str = "google_cloud_default",
827
- delegate_to: str | None = None,
828
795
  drain_pipeline: bool = False,
829
796
  cancel_timeout: int | None = 10 * 60,
830
797
  wait_until_finished: bool | None = None,
@@ -838,11 +805,6 @@ class DataflowStartFlexTemplateOperator(GoogleCloudBaseOperator):
838
805
  self.location = location
839
806
  self.project_id = project_id
840
807
  self.gcp_conn_id = gcp_conn_id
841
- if delegate_to:
842
- warnings.warn(
843
- "'delegate_to' parameter is deprecated, please use 'impersonation_chain'", DeprecationWarning
844
- )
845
- self.delegate_to = delegate_to
846
808
  self.drain_pipeline = drain_pipeline
847
809
  self.cancel_timeout = cancel_timeout
848
810
  self.wait_until_finished = wait_until_finished
@@ -867,7 +829,6 @@ class DataflowStartFlexTemplateOperator(GoogleCloudBaseOperator):
867
829
  def hook(self) -> DataflowHook:
868
830
  hook = DataflowHook(
869
831
  gcp_conn_id=self.gcp_conn_id,
870
- delegate_to=self.delegate_to,
871
832
  drain_pipeline=self.drain_pipeline,
872
833
  cancel_timeout=self.cancel_timeout,
873
834
  wait_until_finished=self.wait_until_finished,
@@ -904,7 +865,6 @@ class DataflowStartFlexTemplateOperator(GoogleCloudBaseOperator):
904
865
  job_id=job_id,
905
866
  location=self.location,
906
867
  gcp_conn_id=self.gcp_conn_id,
907
- delegate_to=self.delegate_to,
908
868
  impersonation_chain=self.impersonation_chain,
909
869
  cancel_timeout=self.cancel_timeout,
910
870
  ),
@@ -966,9 +926,6 @@ class DataflowStartSqlJobOperator(GoogleCloudBaseOperator):
966
926
  If set to ``None`` or missing, the default project_id from the GCP connection is used.
967
927
  :param gcp_conn_id: The connection ID to use connecting to Google Cloud
968
928
  Platform.
969
- :param delegate_to: The account to impersonate, if any.
970
- For this to work, the service account making the request must have
971
- domain-wide delegation enabled.
972
929
  :param drain_pipeline: Optional, set to True if want to stop streaming job by draining it
973
930
  instead of canceling during killing task instance. See:
974
931
  https://cloud.google.com/dataflow/docs/guides/stopping-a-pipeline
@@ -1000,7 +957,6 @@ class DataflowStartSqlJobOperator(GoogleCloudBaseOperator):
1000
957
  location: str = DEFAULT_DATAFLOW_LOCATION,
1001
958
  project_id: str | None = None,
1002
959
  gcp_conn_id: str = "google_cloud_default",
1003
- delegate_to: str | None = None,
1004
960
  drain_pipeline: bool = False,
1005
961
  impersonation_chain: str | Sequence[str] | None = None,
1006
962
  *args,
@@ -1013,11 +969,6 @@ class DataflowStartSqlJobOperator(GoogleCloudBaseOperator):
1013
969
  self.location = location
1014
970
  self.project_id = project_id
1015
971
  self.gcp_conn_id = gcp_conn_id
1016
- if delegate_to:
1017
- warnings.warn(
1018
- "'delegate_to' parameter is deprecated, please use 'impersonation_chain'", DeprecationWarning
1019
- )
1020
- self.delegate_to = delegate_to
1021
972
  self.drain_pipeline = drain_pipeline
1022
973
  self.impersonation_chain = impersonation_chain
1023
974
  self.job = None
@@ -1026,7 +977,6 @@ class DataflowStartSqlJobOperator(GoogleCloudBaseOperator):
1026
977
  def execute(self, context: Context):
1027
978
  self.hook = DataflowHook(
1028
979
  gcp_conn_id=self.gcp_conn_id,
1029
- delegate_to=self.delegate_to,
1030
980
  drain_pipeline=self.drain_pipeline,
1031
981
  impersonation_chain=self.impersonation_chain,
1032
982
  )
@@ -1111,9 +1061,6 @@ class DataflowCreatePythonJobOperator(GoogleCloudBaseOperator):
1111
1061
  :param project_id: Optional, the Google Cloud project ID in which to start a job.
1112
1062
  If set to None or missing, the default project_id from the Google Cloud connection is used.
1113
1063
  :param location: Job location.
1114
- :param delegate_to: The account to impersonate using domain-wide delegation of authority,
1115
- if any. For this to work, the service account making the request must have
1116
- domain-wide delegation enabled.
1117
1064
  :param poll_sleep: The time in seconds to sleep between polling Google
1118
1065
  Cloud Platform for the dataflow job status while the job is in the
1119
1066
  JOB_STATE_RUNNING state.
@@ -1173,7 +1120,6 @@ class DataflowCreatePythonJobOperator(GoogleCloudBaseOperator):
1173
1120
  project_id: str | None = None,
1174
1121
  location: str = DEFAULT_DATAFLOW_LOCATION,
1175
1122
  gcp_conn_id: str = "google_cloud_default",
1176
- delegate_to: str | None = None,
1177
1123
  poll_sleep: int = 10,
1178
1124
  drain_pipeline: bool = False,
1179
1125
  cancel_timeout: int | None = 10 * 60,
@@ -1203,11 +1149,6 @@ class DataflowCreatePythonJobOperator(GoogleCloudBaseOperator):
1203
1149
  self.project_id = project_id
1204
1150
  self.location = location
1205
1151
  self.gcp_conn_id = gcp_conn_id
1206
- if delegate_to:
1207
- warnings.warn(
1208
- "'delegate_to' parameter is deprecated, please use 'impersonation_chain'", DeprecationWarning
1209
- )
1210
- self.delegate_to = delegate_to
1211
1152
  self.poll_sleep = poll_sleep
1212
1153
  self.drain_pipeline = drain_pipeline
1213
1154
  self.cancel_timeout = cancel_timeout
@@ -1221,7 +1162,6 @@ class DataflowCreatePythonJobOperator(GoogleCloudBaseOperator):
1221
1162
  self.beam_hook = BeamHook(runner=BeamRunnerType.DataflowRunner)
1222
1163
  self.dataflow_hook = DataflowHook(
1223
1164
  gcp_conn_id=self.gcp_conn_id,
1224
- delegate_to=self.delegate_to,
1225
1165
  poll_sleep=self.poll_sleep,
1226
1166
  impersonation_chain=None,
1227
1167
  drain_pipeline=self.drain_pipeline,
@@ -1249,7 +1189,7 @@ class DataflowCreatePythonJobOperator(GoogleCloudBaseOperator):
1249
1189
 
1250
1190
  with ExitStack() as exit_stack:
1251
1191
  if self.py_file.lower().startswith("gs://"):
1252
- gcs_hook = GCSHook(self.gcp_conn_id, self.delegate_to)
1192
+ gcs_hook = GCSHook(self.gcp_conn_id)
1253
1193
  tmp_gcs_file = exit_stack.enter_context(gcs_hook.provide_file(object_url=self.py_file))
1254
1194
  self.py_file = tmp_gcs_file.name
1255
1195
 
@@ -1303,9 +1243,6 @@ class DataflowStopJobOperator(GoogleCloudBaseOperator):
1303
1243
  If set to None or missing, the default project_id from the Google Cloud connection is used.
1304
1244
  :param location: Optional, Job location. If set to None or missing, "us-central1" will be used.
1305
1245
  :param gcp_conn_id: The connection ID to use connecting to Google Cloud.
1306
- :param delegate_to: The account to impersonate using domain-wide delegation of authority,
1307
- if any. For this to work, the service account making the request must have
1308
- domain-wide delegation enabled.
1309
1246
  :param poll_sleep: The time in seconds to sleep between polling Google
1310
1247
  Cloud Platform for the dataflow job status to confirm it's stopped.
1311
1248
  :param impersonation_chain: Optional service account to impersonate using short-term
@@ -1328,7 +1265,6 @@ class DataflowStopJobOperator(GoogleCloudBaseOperator):
1328
1265
  project_id: str | None = None,
1329
1266
  location: str = DEFAULT_DATAFLOW_LOCATION,
1330
1267
  gcp_conn_id: str = "google_cloud_default",
1331
- delegate_to: str | None = None,
1332
1268
  poll_sleep: int = 10,
1333
1269
  impersonation_chain: str | Sequence[str] | None = None,
1334
1270
  stop_timeout: int | None = 10 * 60,
@@ -1343,11 +1279,6 @@ class DataflowStopJobOperator(GoogleCloudBaseOperator):
1343
1279
  self.project_id = project_id
1344
1280
  self.location = location
1345
1281
  self.gcp_conn_id = gcp_conn_id
1346
- if delegate_to:
1347
- warnings.warn(
1348
- "'delegate_to' parameter is deprecated, please use 'impersonation_chain'", DeprecationWarning
1349
- )
1350
- self.delegate_to = delegate_to
1351
1282
  self.impersonation_chain = impersonation_chain
1352
1283
  self.hook: DataflowHook | None = None
1353
1284
  self.drain_pipeline = drain_pipeline
@@ -1355,7 +1286,6 @@ class DataflowStopJobOperator(GoogleCloudBaseOperator):
1355
1286
  def execute(self, context: Context) -> None:
1356
1287
  self.dataflow_hook = DataflowHook(
1357
1288
  gcp_conn_id=self.gcp_conn_id,
1358
- delegate_to=self.delegate_to,
1359
1289
  poll_sleep=self.poll_sleep,
1360
1290
  impersonation_chain=self.impersonation_chain,
1361
1291
  cancel_timeout=self.stop_timeout,