apache-airflow-providers-google 9.0.0rc2__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.
- airflow/providers/google/cloud/hooks/automl.py +5 -6
- airflow/providers/google/cloud/hooks/bigquery.py +5 -6
- airflow/providers/google/cloud/hooks/bigquery_dts.py +11 -8
- airflow/providers/google/cloud/hooks/bigtable.py +5 -6
- airflow/providers/google/cloud/hooks/cloud_build.py +14 -11
- airflow/providers/google/cloud/hooks/cloud_composer.py +16 -0
- airflow/providers/google/cloud/hooks/cloud_memorystore.py +5 -14
- airflow/providers/google/cloud/hooks/cloud_sql.py +5 -7
- airflow/providers/google/cloud/hooks/cloud_storage_transfer_service.py +5 -5
- airflow/providers/google/cloud/hooks/compute.py +5 -6
- airflow/providers/google/cloud/hooks/compute_ssh.py +8 -12
- airflow/providers/google/cloud/hooks/datacatalog.py +5 -9
- airflow/providers/google/cloud/hooks/dataflow.py +14 -6
- airflow/providers/google/cloud/hooks/dataform.py +8 -0
- airflow/providers/google/cloud/hooks/datafusion.py +13 -6
- airflow/providers/google/cloud/hooks/dataplex.py +5 -8
- airflow/providers/google/cloud/hooks/dataproc.py +13 -8
- airflow/providers/google/cloud/hooks/dataproc_metastore.py +8 -0
- airflow/providers/google/cloud/hooks/datastore.py +5 -6
- airflow/providers/google/cloud/hooks/dlp.py +5 -9
- airflow/providers/google/cloud/hooks/functions.py +5 -6
- airflow/providers/google/cloud/hooks/gcs.py +6 -6
- airflow/providers/google/cloud/hooks/gdm.py +5 -6
- airflow/providers/google/cloud/hooks/kms.py +5 -9
- airflow/providers/google/cloud/hooks/kubernetes_engine.py +6 -4
- airflow/providers/google/cloud/hooks/life_sciences.py +5 -9
- airflow/providers/google/cloud/hooks/mlengine.py +8 -0
- airflow/providers/google/cloud/hooks/natural_language.py +5 -9
- airflow/providers/google/cloud/hooks/os_login.py +5 -6
- airflow/providers/google/cloud/hooks/pubsub.py +5 -5
- airflow/providers/google/cloud/hooks/secret_manager.py +5 -9
- airflow/providers/google/cloud/hooks/spanner.py +5 -6
- airflow/providers/google/cloud/hooks/speech_to_text.py +5 -9
- airflow/providers/google/cloud/hooks/stackdriver.py +5 -6
- airflow/providers/google/cloud/hooks/tasks.py +5 -9
- airflow/providers/google/cloud/hooks/text_to_speech.py +5 -9
- airflow/providers/google/cloud/hooks/translate.py +5 -6
- airflow/providers/google/cloud/hooks/vertex_ai/auto_ml.py +5 -5
- airflow/providers/google/cloud/hooks/vertex_ai/batch_prediction_job.py +5 -6
- airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py +5 -6
- airflow/providers/google/cloud/hooks/vertex_ai/dataset.py +8 -0
- airflow/providers/google/cloud/hooks/vertex_ai/endpoint_service.py +8 -0
- airflow/providers/google/cloud/hooks/vertex_ai/hyperparameter_tuning_job.py +5 -6
- airflow/providers/google/cloud/hooks/vertex_ai/model_service.py +8 -0
- airflow/providers/google/cloud/hooks/video_intelligence.py +5 -9
- airflow/providers/google/cloud/hooks/vision.py +5 -6
- airflow/providers/google/cloud/hooks/workflows.py +8 -0
- airflow/providers/google/cloud/operators/bigquery.py +1 -148
- airflow/providers/google/cloud/operators/cloud_build.py +0 -13
- airflow/providers/google/cloud/operators/cloud_composer.py +2 -68
- airflow/providers/google/cloud/operators/cloud_storage_transfer_service.py +0 -21
- airflow/providers/google/cloud/operators/dataflow.py +2 -72
- airflow/providers/google/cloud/operators/dataform.py +5 -141
- airflow/providers/google/cloud/operators/datafusion.py +0 -102
- airflow/providers/google/cloud/operators/dataplex.py +3 -61
- airflow/providers/google/cloud/operators/dataproc.py +5 -13
- airflow/providers/google/cloud/operators/datastore.py +2 -86
- airflow/providers/google/cloud/operators/gcs.py +1 -43
- airflow/providers/google/cloud/operators/mlengine.py +1 -123
- airflow/providers/google/cloud/operators/pubsub.py +0 -61
- airflow/providers/google/cloud/operators/stackdriver.py +0 -101
- airflow/providers/google/cloud/operators/vertex_ai/auto_ml.py +0 -26
- airflow/providers/google/cloud/operators/vertex_ai/batch_prediction_job.py +0 -41
- airflow/providers/google/cloud/operators/vertex_ai/custom_job.py +0 -39
- airflow/providers/google/cloud/operators/vertex_ai/dataset.py +0 -71
- airflow/providers/google/cloud/operators/vertex_ai/endpoint_service.py +0 -71
- airflow/providers/google/cloud/operators/vertex_ai/hyperparameter_tuning_job.py +0 -35
- airflow/providers/google/cloud/operators/vertex_ai/model_service.py +0 -41
- airflow/providers/google/cloud/sensors/bigquery.py +0 -24
- airflow/providers/google/cloud/sensors/cloud_composer.py +0 -10
- airflow/providers/google/cloud/sensors/dataflow.py +0 -42
- airflow/providers/google/cloud/sensors/dataform.py +0 -12
- airflow/providers/google/cloud/sensors/datafusion.py +0 -11
- airflow/providers/google/cloud/sensors/dataplex.py +0 -10
- airflow/providers/google/cloud/sensors/gcs.py +0 -44
- airflow/providers/google/cloud/sensors/pubsub.py +0 -11
- airflow/providers/google/cloud/transfers/adls_to_gcs.py +0 -12
- airflow/providers/google/cloud/transfers/azure_fileshare_to_gcs.py +0 -12
- airflow/providers/google/cloud/transfers/bigquery_to_bigquery.py +0 -10
- airflow/providers/google/cloud/transfers/bigquery_to_gcs.py +0 -11
- airflow/providers/google/cloud/transfers/bigquery_to_mssql.py +0 -11
- airflow/providers/google/cloud/transfers/bigquery_to_mysql.py +0 -11
- airflow/providers/google/cloud/transfers/calendar_to_gcs.py +0 -12
- airflow/providers/google/cloud/transfers/cassandra_to_gcs.py +0 -11
- airflow/providers/google/cloud/transfers/gcs_to_bigquery.py +0 -13
- airflow/providers/google/cloud/transfers/gcs_to_gcs.py +0 -11
- airflow/providers/google/cloud/transfers/gcs_to_local.py +0 -11
- airflow/providers/google/cloud/transfers/gcs_to_sftp.py +0 -11
- airflow/providers/google/cloud/transfers/gdrive_to_gcs.py +0 -12
- airflow/providers/google/cloud/transfers/gdrive_to_local.py +0 -11
- airflow/providers/google/cloud/transfers/local_to_gcs.py +0 -9
- airflow/providers/google/cloud/transfers/s3_to_gcs.py +0 -11
- airflow/providers/google/cloud/transfers/sftp_to_gcs.py +0 -11
- airflow/providers/google/cloud/transfers/sheets_to_gcs.py +0 -12
- airflow/providers/google/cloud/transfers/sql_to_gcs.py +0 -11
- airflow/providers/google/cloud/triggers/bigquery_dts.py +0 -12
- airflow/providers/google/cloud/triggers/cloud_build.py +0 -11
- airflow/providers/google/cloud/triggers/cloud_composer.py +0 -9
- airflow/providers/google/cloud/triggers/dataflow.py +0 -7
- airflow/providers/google/cloud/triggers/datafusion.py +0 -11
- airflow/providers/google/cloud/triggers/dataproc.py +2 -8
- airflow/providers/google/cloud/triggers/kubernetes_engine.py +0 -4
- airflow/providers/google/cloud/triggers/mlengine.py +0 -3
- airflow/providers/google/common/hooks/discovery_api.py +0 -7
- airflow/providers/google/firebase/hooks/firestore.py +0 -10
- airflow/providers/google/get_provider_info.py +1 -0
- airflow/providers/google/marketing_platform/example_dags/example_display_video.py +0 -64
- airflow/providers/google/marketing_platform/hooks/campaign_manager.py +3 -3
- airflow/providers/google/marketing_platform/hooks/display_video.py +7 -38
- airflow/providers/google/marketing_platform/operators/campaign_manager.py +22 -22
- airflow/providers/google/marketing_platform/operators/display_video.py +0 -284
- airflow/providers/google/marketing_platform/sensors/campaign_manager.py +3 -3
- airflow/providers/google/marketing_platform/sensors/display_video.py +0 -65
- airflow/providers/google/suite/transfers/gcs_to_gdrive.py +0 -4
- airflow/providers/google/suite/transfers/gcs_to_sheets.py +0 -4
- {apache_airflow_providers_google-9.0.0rc2.dist-info → apache_airflow_providers_google-10.0.0rc1.dist-info}/METADATA +33 -4
- {apache_airflow_providers_google-9.0.0rc2.dist-info → apache_airflow_providers_google-10.0.0rc1.dist-info}/RECORD +122 -122
- {apache_airflow_providers_google-9.0.0rc2.dist-info → apache_airflow_providers_google-10.0.0rc1.dist-info}/LICENSE +0 -0
- {apache_airflow_providers_google-9.0.0rc2.dist-info → apache_airflow_providers_google-10.0.0rc1.dist-info}/NOTICE +0 -0
- {apache_airflow_providers_google-9.0.0rc2.dist-info → apache_airflow_providers_google-10.0.0rc1.dist-info}/WHEEL +0 -0
- {apache_airflow_providers_google-9.0.0rc2.dist-info → apache_airflow_providers_google-10.0.0rc1.dist-info}/entry_points.txt +0 -0
- {apache_airflow_providers_google-9.0.0rc2.dist-info → apache_airflow_providers_google-10.0.0rc1.dist-info}/top_level.txt +0 -0
@@ -145,9 +145,6 @@ class MLEngineStartBatchPredictionJobOperator(GoogleCloudBaseOperator):
|
|
145
145
|
(templated)
|
146
146
|
:param gcp_conn_id: The connection ID used for connection to Google
|
147
147
|
Cloud Platform.
|
148
|
-
:param delegate_to: The account to impersonate using domain-wide delegation of authority,
|
149
|
-
if any. For this to work, the service account making the request must have
|
150
|
-
domain-wide delegation enabled.
|
151
148
|
:param labels: a dictionary containing labels for the job; passed to BigQuery
|
152
149
|
:param impersonation_chain: Optional service account to impersonate using short-term
|
153
150
|
credentials, or chained list of accounts required to get the access_token
|
@@ -190,7 +187,6 @@ class MLEngineStartBatchPredictionJobOperator(GoogleCloudBaseOperator):
|
|
190
187
|
signature_name: str | None = None,
|
191
188
|
project_id: str | None = None,
|
192
189
|
gcp_conn_id: str = "google_cloud_default",
|
193
|
-
delegate_to: str | None = None,
|
194
190
|
labels: dict[str, str] | None = None,
|
195
191
|
impersonation_chain: str | Sequence[str] | None = None,
|
196
192
|
**kwargs,
|
@@ -210,11 +206,6 @@ class MLEngineStartBatchPredictionJobOperator(GoogleCloudBaseOperator):
|
|
210
206
|
self._runtime_version = runtime_version
|
211
207
|
self._signature_name = signature_name
|
212
208
|
self._gcp_conn_id = gcp_conn_id
|
213
|
-
if delegate_to:
|
214
|
-
warnings.warn(
|
215
|
-
"'delegate_to' parameter is deprecated, please use 'impersonation_chain'", DeprecationWarning
|
216
|
-
)
|
217
|
-
self._delegate_to = delegate_to
|
218
209
|
self._labels = labels
|
219
210
|
self._impersonation_chain = impersonation_chain
|
220
211
|
|
@@ -274,9 +265,7 @@ class MLEngineStartBatchPredictionJobOperator(GoogleCloudBaseOperator):
|
|
274
265
|
if self._signature_name:
|
275
266
|
prediction_request["predictionInput"]["signatureName"] = self._signature_name
|
276
267
|
|
277
|
-
hook = MLEngineHook(
|
278
|
-
self._gcp_conn_id, self._delegate_to, impersonation_chain=self._impersonation_chain
|
279
|
-
)
|
268
|
+
hook = MLEngineHook(gcp_conn_id=self._gcp_conn_id, impersonation_chain=self._impersonation_chain)
|
280
269
|
|
281
270
|
# Helper method to check if the existing job's prediction input is the
|
282
271
|
# same as the request we get here.
|
@@ -316,9 +305,6 @@ class MLEngineManageModelOperator(GoogleCloudBaseOperator):
|
|
316
305
|
If set to None or missing, the default project_id from the Google Cloud connection is used.
|
317
306
|
(templated)
|
318
307
|
:param gcp_conn_id: The connection ID to use when fetching connection info.
|
319
|
-
:param delegate_to: The account to impersonate using domain-wide delegation of authority,
|
320
|
-
if any. For this to work, the service account making the request must have
|
321
|
-
domain-wide delegation enabled.
|
322
308
|
:param impersonation_chain: Optional service account to impersonate using short-term
|
323
309
|
credentials, or chained list of accounts required to get the access_token
|
324
310
|
of the last account in the list, which will be impersonated in the request.
|
@@ -342,7 +328,6 @@ class MLEngineManageModelOperator(GoogleCloudBaseOperator):
|
|
342
328
|
operation: str = "create",
|
343
329
|
project_id: str | None = None,
|
344
330
|
gcp_conn_id: str = "google_cloud_default",
|
345
|
-
delegate_to: str | None = None,
|
346
331
|
impersonation_chain: str | Sequence[str] | None = None,
|
347
332
|
**kwargs,
|
348
333
|
) -> None:
|
@@ -359,17 +344,11 @@ class MLEngineManageModelOperator(GoogleCloudBaseOperator):
|
|
359
344
|
self._model = model
|
360
345
|
self._operation = operation
|
361
346
|
self._gcp_conn_id = gcp_conn_id
|
362
|
-
if delegate_to:
|
363
|
-
warnings.warn(
|
364
|
-
"'delegate_to' parameter is deprecated, please use 'impersonation_chain'", DeprecationWarning
|
365
|
-
)
|
366
|
-
self._delegate_to = delegate_to
|
367
347
|
self._impersonation_chain = impersonation_chain
|
368
348
|
|
369
349
|
def execute(self, context: Context):
|
370
350
|
hook = MLEngineHook(
|
371
351
|
gcp_conn_id=self._gcp_conn_id,
|
372
|
-
delegate_to=self._delegate_to,
|
373
352
|
impersonation_chain=self._impersonation_chain,
|
374
353
|
)
|
375
354
|
if self._operation == "create":
|
@@ -395,9 +374,6 @@ class MLEngineCreateModelOperator(GoogleCloudBaseOperator):
|
|
395
374
|
If set to None or missing, the default project_id from the Google Cloud connection is used.
|
396
375
|
(templated)
|
397
376
|
:param gcp_conn_id: The connection ID to use when fetching connection info.
|
398
|
-
:param delegate_to: The account to impersonate using domain-wide delegation of authority,
|
399
|
-
if any. For this to work, the service account making the request must have
|
400
|
-
domain-wide delegation enabled.
|
401
377
|
:param impersonation_chain: Optional service account to impersonate using short-term
|
402
378
|
credentials, or chained list of accounts required to get the access_token
|
403
379
|
of the last account in the list, which will be impersonated in the request.
|
@@ -421,7 +397,6 @@ class MLEngineCreateModelOperator(GoogleCloudBaseOperator):
|
|
421
397
|
model: dict,
|
422
398
|
project_id: str | None = None,
|
423
399
|
gcp_conn_id: str = "google_cloud_default",
|
424
|
-
delegate_to: str | None = None,
|
425
400
|
impersonation_chain: str | Sequence[str] | None = None,
|
426
401
|
**kwargs,
|
427
402
|
) -> None:
|
@@ -429,17 +404,11 @@ class MLEngineCreateModelOperator(GoogleCloudBaseOperator):
|
|
429
404
|
self._project_id = project_id
|
430
405
|
self._model = model
|
431
406
|
self._gcp_conn_id = gcp_conn_id
|
432
|
-
if delegate_to:
|
433
|
-
warnings.warn(
|
434
|
-
"'delegate_to' parameter is deprecated, please use 'impersonation_chain'", DeprecationWarning
|
435
|
-
)
|
436
|
-
self._delegate_to = delegate_to
|
437
407
|
self._impersonation_chain = impersonation_chain
|
438
408
|
|
439
409
|
def execute(self, context: Context):
|
440
410
|
hook = MLEngineHook(
|
441
411
|
gcp_conn_id=self._gcp_conn_id,
|
442
|
-
delegate_to=self._delegate_to,
|
443
412
|
impersonation_chain=self._impersonation_chain,
|
444
413
|
)
|
445
414
|
|
@@ -470,9 +439,6 @@ class MLEngineGetModelOperator(GoogleCloudBaseOperator):
|
|
470
439
|
If set to None or missing, the default project_id from the Google Cloud connection is used.
|
471
440
|
(templated)
|
472
441
|
:param gcp_conn_id: The connection ID to use when fetching connection info.
|
473
|
-
:param delegate_to: The account to impersonate using domain-wide delegation of authority,
|
474
|
-
if any. For this to work, the service account making the request must have
|
475
|
-
domain-wide delegation enabled.
|
476
442
|
:param impersonation_chain: Optional service account to impersonate using short-term
|
477
443
|
credentials, or chained list of accounts required to get the access_token
|
478
444
|
of the last account in the list, which will be impersonated in the request.
|
@@ -496,7 +462,6 @@ class MLEngineGetModelOperator(GoogleCloudBaseOperator):
|
|
496
462
|
model_name: str,
|
497
463
|
project_id: str | None = None,
|
498
464
|
gcp_conn_id: str = "google_cloud_default",
|
499
|
-
delegate_to: str | None = None,
|
500
465
|
impersonation_chain: str | Sequence[str] | None = None,
|
501
466
|
**kwargs,
|
502
467
|
) -> None:
|
@@ -504,17 +469,11 @@ class MLEngineGetModelOperator(GoogleCloudBaseOperator):
|
|
504
469
|
self._project_id = project_id
|
505
470
|
self._model_name = model_name
|
506
471
|
self._gcp_conn_id = gcp_conn_id
|
507
|
-
if delegate_to:
|
508
|
-
warnings.warn(
|
509
|
-
"'delegate_to' parameter is deprecated, please use 'impersonation_chain'", DeprecationWarning
|
510
|
-
)
|
511
|
-
self._delegate_to = delegate_to
|
512
472
|
self._impersonation_chain = impersonation_chain
|
513
473
|
|
514
474
|
def execute(self, context: Context):
|
515
475
|
hook = MLEngineHook(
|
516
476
|
gcp_conn_id=self._gcp_conn_id,
|
517
|
-
delegate_to=self._delegate_to,
|
518
477
|
impersonation_chain=self._impersonation_chain,
|
519
478
|
)
|
520
479
|
project_id = self._project_id or hook.project_id
|
@@ -547,9 +506,6 @@ class MLEngineDeleteModelOperator(GoogleCloudBaseOperator):
|
|
547
506
|
If set to None or missing, the default project_id from the Google Cloud connection is used.
|
548
507
|
(templated)
|
549
508
|
:param gcp_conn_id: The connection ID to use when fetching connection info.
|
550
|
-
:param delegate_to: The account to impersonate using domain-wide delegation of authority,
|
551
|
-
if any. For this to work, the service account making the request must have
|
552
|
-
domain-wide delegation enabled.
|
553
509
|
:param impersonation_chain: Optional service account to impersonate using short-term
|
554
510
|
credentials, or chained list of accounts required to get the access_token
|
555
511
|
of the last account in the list, which will be impersonated in the request.
|
@@ -574,7 +530,6 @@ class MLEngineDeleteModelOperator(GoogleCloudBaseOperator):
|
|
574
530
|
delete_contents: bool = False,
|
575
531
|
project_id: str | None = None,
|
576
532
|
gcp_conn_id: str = "google_cloud_default",
|
577
|
-
delegate_to: str | None = None,
|
578
533
|
impersonation_chain: str | Sequence[str] | None = None,
|
579
534
|
**kwargs,
|
580
535
|
) -> None:
|
@@ -583,17 +538,11 @@ class MLEngineDeleteModelOperator(GoogleCloudBaseOperator):
|
|
583
538
|
self._model_name = model_name
|
584
539
|
self._delete_contents = delete_contents
|
585
540
|
self._gcp_conn_id = gcp_conn_id
|
586
|
-
if delegate_to:
|
587
|
-
warnings.warn(
|
588
|
-
"'delegate_to' parameter is deprecated, please use 'impersonation_chain'", DeprecationWarning
|
589
|
-
)
|
590
|
-
self._delegate_to = delegate_to
|
591
541
|
self._impersonation_chain = impersonation_chain
|
592
542
|
|
593
543
|
def execute(self, context: Context):
|
594
544
|
hook = MLEngineHook(
|
595
545
|
gcp_conn_id=self._gcp_conn_id,
|
596
|
-
delegate_to=self._delegate_to,
|
597
546
|
impersonation_chain=self._impersonation_chain,
|
598
547
|
)
|
599
548
|
|
@@ -653,9 +602,6 @@ class MLEngineManageVersionOperator(GoogleCloudBaseOperator):
|
|
653
602
|
If set to None or missing, the default project_id from the Google Cloud connection is used.
|
654
603
|
(templated)
|
655
604
|
:param gcp_conn_id: The connection ID to use when fetching connection info.
|
656
|
-
:param delegate_to: The account to impersonate using domain-wide delegation of authority,
|
657
|
-
if any. For this to work, the service account making the request must have
|
658
|
-
domain-wide delegation enabled.
|
659
605
|
:param impersonation_chain: Optional service account to impersonate using short-term
|
660
606
|
credentials, or chained list of accounts required to get the access_token
|
661
607
|
of the last account in the list, which will be impersonated in the request.
|
@@ -683,7 +629,6 @@ class MLEngineManageVersionOperator(GoogleCloudBaseOperator):
|
|
683
629
|
operation: str = "create",
|
684
630
|
project_id: str | None = None,
|
685
631
|
gcp_conn_id: str = "google_cloud_default",
|
686
|
-
delegate_to: str | None = None,
|
687
632
|
impersonation_chain: str | Sequence[str] | None = None,
|
688
633
|
**kwargs,
|
689
634
|
) -> None:
|
@@ -694,11 +639,6 @@ class MLEngineManageVersionOperator(GoogleCloudBaseOperator):
|
|
694
639
|
self._version = version or {}
|
695
640
|
self._operation = operation
|
696
641
|
self._gcp_conn_id = gcp_conn_id
|
697
|
-
if delegate_to:
|
698
|
-
warnings.warn(
|
699
|
-
"'delegate_to' parameter is deprecated, please use 'impersonation_chain'", DeprecationWarning
|
700
|
-
)
|
701
|
-
self._delegate_to = delegate_to
|
702
642
|
self._impersonation_chain = impersonation_chain
|
703
643
|
|
704
644
|
warnings.warn(
|
@@ -714,7 +654,6 @@ class MLEngineManageVersionOperator(GoogleCloudBaseOperator):
|
|
714
654
|
|
715
655
|
hook = MLEngineHook(
|
716
656
|
gcp_conn_id=self._gcp_conn_id,
|
717
|
-
delegate_to=self._delegate_to,
|
718
657
|
impersonation_chain=self._impersonation_chain,
|
719
658
|
)
|
720
659
|
|
@@ -755,9 +694,6 @@ class MLEngineCreateVersionOperator(GoogleCloudBaseOperator):
|
|
755
694
|
If set to None or missing, the default project_id from the Google Cloud connection is used.
|
756
695
|
(templated)
|
757
696
|
:param gcp_conn_id: The connection ID to use when fetching connection info.
|
758
|
-
:param delegate_to: The account to impersonate using domain-wide delegation of authority,
|
759
|
-
if any. For this to work, the service account making the request must have
|
760
|
-
domain-wide delegation enabled.
|
761
697
|
:param impersonation_chain: Optional service account to impersonate using short-term
|
762
698
|
credentials, or chained list of accounts required to get the access_token
|
763
699
|
of the last account in the list, which will be impersonated in the request.
|
@@ -783,7 +719,6 @@ class MLEngineCreateVersionOperator(GoogleCloudBaseOperator):
|
|
783
719
|
version: dict,
|
784
720
|
project_id: str | None = None,
|
785
721
|
gcp_conn_id: str = "google_cloud_default",
|
786
|
-
delegate_to: str | None = None,
|
787
722
|
impersonation_chain: str | Sequence[str] | None = None,
|
788
723
|
**kwargs,
|
789
724
|
) -> None:
|
@@ -793,11 +728,6 @@ class MLEngineCreateVersionOperator(GoogleCloudBaseOperator):
|
|
793
728
|
self._model_name = model_name
|
794
729
|
self._version = version
|
795
730
|
self._gcp_conn_id = gcp_conn_id
|
796
|
-
if delegate_to:
|
797
|
-
warnings.warn(
|
798
|
-
"'delegate_to' parameter is deprecated, please use 'impersonation_chain'", DeprecationWarning
|
799
|
-
)
|
800
|
-
self._delegate_to = delegate_to
|
801
731
|
self._impersonation_chain = impersonation_chain
|
802
732
|
self._validate_inputs()
|
803
733
|
|
@@ -811,7 +741,6 @@ class MLEngineCreateVersionOperator(GoogleCloudBaseOperator):
|
|
811
741
|
def execute(self, context: Context):
|
812
742
|
hook = MLEngineHook(
|
813
743
|
gcp_conn_id=self._gcp_conn_id,
|
814
|
-
delegate_to=self._delegate_to,
|
815
744
|
impersonation_chain=self._impersonation_chain,
|
816
745
|
)
|
817
746
|
|
@@ -847,9 +776,6 @@ class MLEngineSetDefaultVersionOperator(GoogleCloudBaseOperator):
|
|
847
776
|
If set to None or missing, the default project_id from the Google Cloud connection is used.
|
848
777
|
(templated)
|
849
778
|
:param gcp_conn_id: The connection ID to use when fetching connection info.
|
850
|
-
:param delegate_to: The account to impersonate using domain-wide delegation of authority,
|
851
|
-
if any. For this to work, the service account making the request must have
|
852
|
-
domain-wide delegation enabled.
|
853
779
|
:param impersonation_chain: Optional service account to impersonate using short-term
|
854
780
|
credentials, or chained list of accounts required to get the access_token
|
855
781
|
of the last account in the list, which will be impersonated in the request.
|
@@ -875,7 +801,6 @@ class MLEngineSetDefaultVersionOperator(GoogleCloudBaseOperator):
|
|
875
801
|
version_name: str,
|
876
802
|
project_id: str | None = None,
|
877
803
|
gcp_conn_id: str = "google_cloud_default",
|
878
|
-
delegate_to: str | None = None,
|
879
804
|
impersonation_chain: str | Sequence[str] | None = None,
|
880
805
|
**kwargs,
|
881
806
|
) -> None:
|
@@ -885,11 +810,6 @@ class MLEngineSetDefaultVersionOperator(GoogleCloudBaseOperator):
|
|
885
810
|
self._model_name = model_name
|
886
811
|
self._version_name = version_name
|
887
812
|
self._gcp_conn_id = gcp_conn_id
|
888
|
-
if delegate_to:
|
889
|
-
warnings.warn(
|
890
|
-
"'delegate_to' parameter is deprecated, please use 'impersonation_chain'", DeprecationWarning
|
891
|
-
)
|
892
|
-
self._delegate_to = delegate_to
|
893
813
|
self._impersonation_chain = impersonation_chain
|
894
814
|
self._validate_inputs()
|
895
815
|
|
@@ -903,7 +823,6 @@ class MLEngineSetDefaultVersionOperator(GoogleCloudBaseOperator):
|
|
903
823
|
def execute(self, context: Context):
|
904
824
|
hook = MLEngineHook(
|
905
825
|
gcp_conn_id=self._gcp_conn_id,
|
906
|
-
delegate_to=self._delegate_to,
|
907
826
|
impersonation_chain=self._impersonation_chain,
|
908
827
|
)
|
909
828
|
|
@@ -938,9 +857,6 @@ class MLEngineListVersionsOperator(GoogleCloudBaseOperator):
|
|
938
857
|
:param project_id: The Google Cloud project name to which MLEngine model belongs.
|
939
858
|
If set to None or missing, the default project_id from the Google Cloud connection is used.
|
940
859
|
(templated)
|
941
|
-
:param delegate_to: The account to impersonate using domain-wide delegation of authority,
|
942
|
-
if any. For this to work, the service account making the request must have
|
943
|
-
domain-wide delegation enabled.
|
944
860
|
:param impersonation_chain: Optional service account to impersonate using short-term
|
945
861
|
credentials, or chained list of accounts required to get the access_token
|
946
862
|
of the last account in the list, which will be impersonated in the request.
|
@@ -964,7 +880,6 @@ class MLEngineListVersionsOperator(GoogleCloudBaseOperator):
|
|
964
880
|
model_name: str,
|
965
881
|
project_id: str | None = None,
|
966
882
|
gcp_conn_id: str = "google_cloud_default",
|
967
|
-
delegate_to: str | None = None,
|
968
883
|
impersonation_chain: str | Sequence[str] | None = None,
|
969
884
|
**kwargs,
|
970
885
|
) -> None:
|
@@ -973,11 +888,6 @@ class MLEngineListVersionsOperator(GoogleCloudBaseOperator):
|
|
973
888
|
self._project_id = project_id
|
974
889
|
self._model_name = model_name
|
975
890
|
self._gcp_conn_id = gcp_conn_id
|
976
|
-
if delegate_to:
|
977
|
-
warnings.warn(
|
978
|
-
"'delegate_to' parameter is deprecated, please use 'impersonation_chain'", DeprecationWarning
|
979
|
-
)
|
980
|
-
self._delegate_to = delegate_to
|
981
891
|
self._impersonation_chain = impersonation_chain
|
982
892
|
self._validate_inputs()
|
983
893
|
|
@@ -988,7 +898,6 @@ class MLEngineListVersionsOperator(GoogleCloudBaseOperator):
|
|
988
898
|
def execute(self, context: Context):
|
989
899
|
hook = MLEngineHook(
|
990
900
|
gcp_conn_id=self._gcp_conn_id,
|
991
|
-
delegate_to=self._delegate_to,
|
992
901
|
impersonation_chain=self._impersonation_chain,
|
993
902
|
)
|
994
903
|
|
@@ -1024,9 +933,6 @@ class MLEngineDeleteVersionOperator(GoogleCloudBaseOperator):
|
|
1024
933
|
:param project_id: The Google Cloud project name to which MLEngine
|
1025
934
|
model belongs.
|
1026
935
|
:param gcp_conn_id: The connection ID to use when fetching connection info.
|
1027
|
-
:param delegate_to: The account to impersonate using domain-wide delegation of authority,
|
1028
|
-
if any. For this to work, the service account making the request must have
|
1029
|
-
domain-wide delegation enabled.
|
1030
936
|
:param impersonation_chain: Optional service account to impersonate using short-term
|
1031
937
|
credentials, or chained list of accounts required to get the access_token
|
1032
938
|
of the last account in the list, which will be impersonated in the request.
|
@@ -1052,7 +958,6 @@ class MLEngineDeleteVersionOperator(GoogleCloudBaseOperator):
|
|
1052
958
|
version_name: str,
|
1053
959
|
project_id: str | None = None,
|
1054
960
|
gcp_conn_id: str = "google_cloud_default",
|
1055
|
-
delegate_to: str | None = None,
|
1056
961
|
impersonation_chain: str | Sequence[str] | None = None,
|
1057
962
|
**kwargs,
|
1058
963
|
) -> None:
|
@@ -1062,11 +967,6 @@ class MLEngineDeleteVersionOperator(GoogleCloudBaseOperator):
|
|
1062
967
|
self._model_name = model_name
|
1063
968
|
self._version_name = version_name
|
1064
969
|
self._gcp_conn_id = gcp_conn_id
|
1065
|
-
if delegate_to:
|
1066
|
-
warnings.warn(
|
1067
|
-
"'delegate_to' parameter is deprecated, please use 'impersonation_chain'", DeprecationWarning
|
1068
|
-
)
|
1069
|
-
self._delegate_to = delegate_to
|
1070
970
|
self._impersonation_chain = impersonation_chain
|
1071
971
|
self._validate_inputs()
|
1072
972
|
|
@@ -1080,7 +980,6 @@ class MLEngineDeleteVersionOperator(GoogleCloudBaseOperator):
|
|
1080
980
|
def execute(self, context: Context):
|
1081
981
|
hook = MLEngineHook(
|
1082
982
|
gcp_conn_id=self._gcp_conn_id,
|
1083
|
-
delegate_to=self._delegate_to,
|
1084
983
|
impersonation_chain=self._impersonation_chain,
|
1085
984
|
)
|
1086
985
|
|
@@ -1139,9 +1038,6 @@ class MLEngineStartTrainingJobOperator(GoogleCloudBaseOperator):
|
|
1139
1038
|
If set to None or missing, the Google-managed Cloud ML Engine service account will be used.
|
1140
1039
|
:param project_id: The Google Cloud project name within which MLEngine training job should run.
|
1141
1040
|
:param gcp_conn_id: The connection ID to use when fetching connection info.
|
1142
|
-
:param delegate_to: The account to impersonate using domain-wide delegation of authority,
|
1143
|
-
if any. For this to work, the service account making the request must have
|
1144
|
-
domain-wide delegation enabled.
|
1145
1041
|
:param mode: Can be one of 'DRY_RUN'/'CLOUD'. In 'DRY_RUN' mode, no real
|
1146
1042
|
training job will be launched, but the MLEngine training job request
|
1147
1043
|
will be printed out. In 'CLOUD' mode, a real MLEngine training job
|
@@ -1198,7 +1094,6 @@ class MLEngineStartTrainingJobOperator(GoogleCloudBaseOperator):
|
|
1198
1094
|
job_dir: str | None = None,
|
1199
1095
|
service_account: str | None = None,
|
1200
1096
|
gcp_conn_id: str = "google_cloud_default",
|
1201
|
-
delegate_to: str | None = None,
|
1202
1097
|
mode: str = "PRODUCTION",
|
1203
1098
|
labels: dict[str, str] | None = None,
|
1204
1099
|
impersonation_chain: str | Sequence[str] | None = None,
|
@@ -1222,11 +1117,6 @@ class MLEngineStartTrainingJobOperator(GoogleCloudBaseOperator):
|
|
1222
1117
|
self._job_dir = job_dir
|
1223
1118
|
self._service_account = service_account
|
1224
1119
|
self._gcp_conn_id = gcp_conn_id
|
1225
|
-
if delegate_to:
|
1226
|
-
warnings.warn(
|
1227
|
-
"'delegate_to' parameter is deprecated, please use 'impersonation_chain'", DeprecationWarning
|
1228
|
-
)
|
1229
|
-
self._delegate_to = delegate_to
|
1230
1120
|
self._mode = mode
|
1231
1121
|
self._labels = labels
|
1232
1122
|
self._hyperparameters = hyperparameters
|
@@ -1316,7 +1206,6 @@ class MLEngineStartTrainingJobOperator(GoogleCloudBaseOperator):
|
|
1316
1206
|
|
1317
1207
|
hook = MLEngineHook(
|
1318
1208
|
gcp_conn_id=self._gcp_conn_id,
|
1319
|
-
delegate_to=self._delegate_to,
|
1320
1209
|
impersonation_chain=self._impersonation_chain,
|
1321
1210
|
)
|
1322
1211
|
self.hook = hook
|
@@ -1363,7 +1252,6 @@ class MLEngineStartTrainingJobOperator(GoogleCloudBaseOperator):
|
|
1363
1252
|
labels=self._labels,
|
1364
1253
|
gcp_conn_id=self._gcp_conn_id,
|
1365
1254
|
impersonation_chain=self._impersonation_chain,
|
1366
|
-
delegate_to=self._delegate_to,
|
1367
1255
|
),
|
1368
1256
|
method_name="execute_complete",
|
1369
1257
|
)
|
@@ -1446,9 +1334,6 @@ class MLEngineTrainingCancelJobOperator(GoogleCloudBaseOperator):
|
|
1446
1334
|
If set to None or missing, the default project_id from the Google Cloud connection is used.
|
1447
1335
|
(templated)
|
1448
1336
|
:param gcp_conn_id: The connection ID to use when fetching connection info.
|
1449
|
-
:param delegate_to: The account to impersonate using domain-wide delegation of authority,
|
1450
|
-
if any. For this to work, the service account making the request must have
|
1451
|
-
domain-wide delegation enabled.
|
1452
1337
|
:param impersonation_chain: Optional service account to impersonate using short-term
|
1453
1338
|
credentials, or chained list of accounts required to get the access_token
|
1454
1339
|
of the last account in the list, which will be impersonated in the request.
|
@@ -1472,7 +1357,6 @@ class MLEngineTrainingCancelJobOperator(GoogleCloudBaseOperator):
|
|
1472
1357
|
job_id: str,
|
1473
1358
|
project_id: str | None = None,
|
1474
1359
|
gcp_conn_id: str = "google_cloud_default",
|
1475
|
-
delegate_to: str | None = None,
|
1476
1360
|
impersonation_chain: str | Sequence[str] | None = None,
|
1477
1361
|
**kwargs,
|
1478
1362
|
) -> None:
|
@@ -1480,11 +1364,6 @@ class MLEngineTrainingCancelJobOperator(GoogleCloudBaseOperator):
|
|
1480
1364
|
self._project_id = project_id
|
1481
1365
|
self._job_id = job_id
|
1482
1366
|
self._gcp_conn_id = gcp_conn_id
|
1483
|
-
if delegate_to:
|
1484
|
-
warnings.warn(
|
1485
|
-
"'delegate_to' parameter is deprecated, please use 'impersonation_chain'", DeprecationWarning
|
1486
|
-
)
|
1487
|
-
self._delegate_to = delegate_to
|
1488
1367
|
self._impersonation_chain = impersonation_chain
|
1489
1368
|
|
1490
1369
|
if not self._project_id:
|
@@ -1494,7 +1373,6 @@ class MLEngineTrainingCancelJobOperator(GoogleCloudBaseOperator):
|
|
1494
1373
|
|
1495
1374
|
hook = MLEngineHook(
|
1496
1375
|
gcp_conn_id=self._gcp_conn_id,
|
1497
|
-
delegate_to=self._delegate_to,
|
1498
1376
|
impersonation_chain=self._impersonation_chain,
|
1499
1377
|
)
|
1500
1378
|
|
@@ -24,7 +24,6 @@ This module contains Google PubSub operators.
|
|
24
24
|
"""
|
25
25
|
from __future__ import annotations
|
26
26
|
|
27
|
-
import warnings
|
28
27
|
from typing import TYPE_CHECKING, Any, Callable, Sequence
|
29
28
|
|
30
29
|
from google.api_core.gapic_v1.method import DEFAULT, _MethodDefault
|
@@ -85,9 +84,6 @@ class PubSubCreateTopicOperator(GoogleCloudBaseOperator):
|
|
85
84
|
``{topic}``. (templated)
|
86
85
|
:param gcp_conn_id: The connection ID to use connecting to
|
87
86
|
Google Cloud.
|
88
|
-
:param delegate_to: The account to impersonate using domain-wide delegation of authority,
|
89
|
-
if any. For this to work, the service account making the request must have
|
90
|
-
domain-wide delegation enabled.
|
91
87
|
:param labels: Client-assigned labels; see
|
92
88
|
https://cloud.google.com/pubsub/docs/labels
|
93
89
|
:param message_storage_policy: Policy constraining the set
|
@@ -130,7 +126,6 @@ class PubSubCreateTopicOperator(GoogleCloudBaseOperator):
|
|
130
126
|
project_id: str | None = None,
|
131
127
|
fail_if_exists: bool = False,
|
132
128
|
gcp_conn_id: str = "google_cloud_default",
|
133
|
-
delegate_to: str | None = None,
|
134
129
|
labels: dict[str, str] | None = None,
|
135
130
|
message_storage_policy: dict | MessageStoragePolicy = None,
|
136
131
|
kms_key_name: str | None = None,
|
@@ -146,11 +141,6 @@ class PubSubCreateTopicOperator(GoogleCloudBaseOperator):
|
|
146
141
|
self.topic = topic
|
147
142
|
self.fail_if_exists = fail_if_exists
|
148
143
|
self.gcp_conn_id = gcp_conn_id
|
149
|
-
if delegate_to:
|
150
|
-
warnings.warn(
|
151
|
-
"'delegate_to' parameter is deprecated, please use 'impersonation_chain'", DeprecationWarning
|
152
|
-
)
|
153
|
-
self.delegate_to = delegate_to
|
154
144
|
self.labels = labels
|
155
145
|
self.message_storage_policy = message_storage_policy
|
156
146
|
self.kms_key_name = kms_key_name
|
@@ -162,7 +152,6 @@ class PubSubCreateTopicOperator(GoogleCloudBaseOperator):
|
|
162
152
|
def execute(self, context: Context) -> None:
|
163
153
|
hook = PubSubHook(
|
164
154
|
gcp_conn_id=self.gcp_conn_id,
|
165
|
-
delegate_to=self.delegate_to,
|
166
155
|
impersonation_chain=self.impersonation_chain,
|
167
156
|
)
|
168
157
|
|
@@ -256,9 +245,6 @@ class PubSubCreateSubscriptionOperator(GoogleCloudBaseOperator):
|
|
256
245
|
acknowledge each message pulled from the subscription
|
257
246
|
:param gcp_conn_id: The connection ID to use connecting to
|
258
247
|
Google Cloud.
|
259
|
-
:param delegate_to: The account to impersonate using domain-wide delegation of authority,
|
260
|
-
if any. For this to work, the service account making the request must have
|
261
|
-
domain-wide delegation enabled.
|
262
248
|
:param push_config: If push delivery is used with this subscription,
|
263
249
|
this field is used to configure it. An empty ``pushConfig`` signifies
|
264
250
|
that the subscriber will pull and ack messages using API methods.
|
@@ -332,7 +318,6 @@ class PubSubCreateSubscriptionOperator(GoogleCloudBaseOperator):
|
|
332
318
|
ack_deadline_secs: int = 10,
|
333
319
|
fail_if_exists: bool = False,
|
334
320
|
gcp_conn_id: str = "google_cloud_default",
|
335
|
-
delegate_to: str | None = None,
|
336
321
|
push_config: dict | PushConfig | None = None,
|
337
322
|
retain_acked_messages: bool | None = None,
|
338
323
|
message_retention_duration: dict | Duration | None = None,
|
@@ -356,11 +341,6 @@ class PubSubCreateSubscriptionOperator(GoogleCloudBaseOperator):
|
|
356
341
|
self.ack_deadline_secs = ack_deadline_secs
|
357
342
|
self.fail_if_exists = fail_if_exists
|
358
343
|
self.gcp_conn_id = gcp_conn_id
|
359
|
-
if delegate_to:
|
360
|
-
warnings.warn(
|
361
|
-
"'delegate_to' parameter is deprecated, please use 'impersonation_chain'", DeprecationWarning
|
362
|
-
)
|
363
|
-
self.delegate_to = delegate_to
|
364
344
|
self.push_config = push_config
|
365
345
|
self.retain_acked_messages = retain_acked_messages
|
366
346
|
self.message_retention_duration = message_retention_duration
|
@@ -378,7 +358,6 @@ class PubSubCreateSubscriptionOperator(GoogleCloudBaseOperator):
|
|
378
358
|
def execute(self, context: Context) -> str:
|
379
359
|
hook = PubSubHook(
|
380
360
|
gcp_conn_id=self.gcp_conn_id,
|
381
|
-
delegate_to=self.delegate_to,
|
382
361
|
impersonation_chain=self.impersonation_chain,
|
383
362
|
)
|
384
363
|
|
@@ -446,9 +425,6 @@ class PubSubDeleteTopicOperator(GoogleCloudBaseOperator):
|
|
446
425
|
the task
|
447
426
|
:param gcp_conn_id: The connection ID to use connecting to
|
448
427
|
Google Cloud.
|
449
|
-
:param delegate_to: The account to impersonate using domain-wide delegation of authority,
|
450
|
-
if any. For this to work, the service account making the request must have
|
451
|
-
domain-wide delegation enabled.
|
452
428
|
:param retry: (Optional) A retry object used to retry requests.
|
453
429
|
If None is specified, requests will not be retried.
|
454
430
|
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
|
@@ -479,7 +455,6 @@ class PubSubDeleteTopicOperator(GoogleCloudBaseOperator):
|
|
479
455
|
project_id: str | None = None,
|
480
456
|
fail_if_not_exists: bool = False,
|
481
457
|
gcp_conn_id: str = "google_cloud_default",
|
482
|
-
delegate_to: str | None = None,
|
483
458
|
retry: Retry | _MethodDefault = DEFAULT,
|
484
459
|
timeout: float | None = None,
|
485
460
|
metadata: Sequence[tuple[str, str]] = (),
|
@@ -491,11 +466,6 @@ class PubSubDeleteTopicOperator(GoogleCloudBaseOperator):
|
|
491
466
|
self.topic = topic
|
492
467
|
self.fail_if_not_exists = fail_if_not_exists
|
493
468
|
self.gcp_conn_id = gcp_conn_id
|
494
|
-
if delegate_to:
|
495
|
-
warnings.warn(
|
496
|
-
"'delegate_to' parameter is deprecated, please use 'impersonation_chain'", DeprecationWarning
|
497
|
-
)
|
498
|
-
self.delegate_to = delegate_to
|
499
469
|
self.retry = retry
|
500
470
|
self.timeout = timeout
|
501
471
|
self.metadata = metadata
|
@@ -504,7 +474,6 @@ class PubSubDeleteTopicOperator(GoogleCloudBaseOperator):
|
|
504
474
|
def execute(self, context: Context) -> None:
|
505
475
|
hook = PubSubHook(
|
506
476
|
gcp_conn_id=self.gcp_conn_id,
|
507
|
-
delegate_to=self.delegate_to,
|
508
477
|
impersonation_chain=self.impersonation_chain,
|
509
478
|
)
|
510
479
|
|
@@ -554,9 +523,6 @@ class PubSubDeleteSubscriptionOperator(GoogleCloudBaseOperator):
|
|
554
523
|
fail the task
|
555
524
|
:param gcp_conn_id: The connection ID to use connecting to
|
556
525
|
Google Cloud.
|
557
|
-
:param delegate_to: The account to impersonate using domain-wide delegation of authority,
|
558
|
-
if any. For this to work, the service account making the request must have
|
559
|
-
domain-wide delegation enabled.
|
560
526
|
:param retry: (Optional) A retry object used to retry requests.
|
561
527
|
If None is specified, requests will not be retried.
|
562
528
|
:param timeout: (Optional) The amount of time, in seconds, to wait for the request
|
@@ -587,7 +553,6 @@ class PubSubDeleteSubscriptionOperator(GoogleCloudBaseOperator):
|
|
587
553
|
project_id: str | None = None,
|
588
554
|
fail_if_not_exists: bool = False,
|
589
555
|
gcp_conn_id: str = "google_cloud_default",
|
590
|
-
delegate_to: str | None = None,
|
591
556
|
retry: Retry | _MethodDefault = DEFAULT,
|
592
557
|
timeout: float | None = None,
|
593
558
|
metadata: Sequence[tuple[str, str]] = (),
|
@@ -599,11 +564,6 @@ class PubSubDeleteSubscriptionOperator(GoogleCloudBaseOperator):
|
|
599
564
|
self.subscription = subscription
|
600
565
|
self.fail_if_not_exists = fail_if_not_exists
|
601
566
|
self.gcp_conn_id = gcp_conn_id
|
602
|
-
if delegate_to:
|
603
|
-
warnings.warn(
|
604
|
-
"'delegate_to' parameter is deprecated, please use 'impersonation_chain'", DeprecationWarning
|
605
|
-
)
|
606
|
-
self.delegate_to = delegate_to
|
607
567
|
self.retry = retry
|
608
568
|
self.timeout = timeout
|
609
569
|
self.metadata = metadata
|
@@ -612,7 +572,6 @@ class PubSubDeleteSubscriptionOperator(GoogleCloudBaseOperator):
|
|
612
572
|
def execute(self, context: Context) -> None:
|
613
573
|
hook = PubSubHook(
|
614
574
|
gcp_conn_id=self.gcp_conn_id,
|
615
|
-
delegate_to=self.delegate_to,
|
616
575
|
impersonation_chain=self.impersonation_chain,
|
617
576
|
)
|
618
577
|
|
@@ -672,9 +631,6 @@ class PubSubPublishMessageOperator(GoogleCloudBaseOperator):
|
|
672
631
|
https://cloud.google.com/pubsub/docs/reference/rest/v1/PubsubMessage
|
673
632
|
:param gcp_conn_id: The connection ID to use connecting to
|
674
633
|
Google Cloud.
|
675
|
-
:param delegate_to: The account to impersonate using domain-wide delegation of authority,
|
676
|
-
if any. For this to work, the service account making the request must have
|
677
|
-
domain-wide delegation enabled.
|
678
634
|
:param impersonation_chain: Optional service account to impersonate using short-term
|
679
635
|
credentials, or chained list of accounts required to get the access_token
|
680
636
|
of the last account in the list, which will be impersonated in the request.
|
@@ -700,7 +656,6 @@ class PubSubPublishMessageOperator(GoogleCloudBaseOperator):
|
|
700
656
|
messages: list,
|
701
657
|
project_id: str | None = None,
|
702
658
|
gcp_conn_id: str = "google_cloud_default",
|
703
|
-
delegate_to: str | None = None,
|
704
659
|
impersonation_chain: str | Sequence[str] | None = None,
|
705
660
|
**kwargs,
|
706
661
|
) -> None:
|
@@ -709,17 +664,11 @@ class PubSubPublishMessageOperator(GoogleCloudBaseOperator):
|
|
709
664
|
self.topic = topic
|
710
665
|
self.messages = messages
|
711
666
|
self.gcp_conn_id = gcp_conn_id
|
712
|
-
if delegate_to:
|
713
|
-
warnings.warn(
|
714
|
-
"'delegate_to' parameter is deprecated, please use 'impersonation_chain'", DeprecationWarning
|
715
|
-
)
|
716
|
-
self.delegate_to = delegate_to
|
717
667
|
self.impersonation_chain = impersonation_chain
|
718
668
|
|
719
669
|
def execute(self, context: Context) -> None:
|
720
670
|
hook = PubSubHook(
|
721
671
|
gcp_conn_id=self.gcp_conn_id,
|
722
|
-
delegate_to=self.delegate_to,
|
723
672
|
impersonation_chain=self.impersonation_chain,
|
724
673
|
)
|
725
674
|
|
@@ -757,9 +706,6 @@ class PubSubPullOperator(GoogleCloudBaseOperator):
|
|
757
706
|
immediately rather than by any downstream tasks
|
758
707
|
:param gcp_conn_id: The connection ID to use connecting to
|
759
708
|
Google Cloud.
|
760
|
-
:param delegate_to: The account to impersonate using domain-wide delegation of authority,
|
761
|
-
if any. For this to work, the service account making the request must have
|
762
|
-
domain-wide delegation enabled.
|
763
709
|
:param messages_callback: (Optional) Callback to process received messages.
|
764
710
|
It's return value will be saved to XCom.
|
765
711
|
If you are pulling large messages, you probably want to provide a custom callback.
|
@@ -790,17 +736,11 @@ class PubSubPullOperator(GoogleCloudBaseOperator):
|
|
790
736
|
ack_messages: bool = False,
|
791
737
|
messages_callback: Callable[[list[ReceivedMessage], Context], Any] | None = None,
|
792
738
|
gcp_conn_id: str = "google_cloud_default",
|
793
|
-
delegate_to: str | None = None,
|
794
739
|
impersonation_chain: str | Sequence[str] | None = None,
|
795
740
|
**kwargs,
|
796
741
|
) -> None:
|
797
742
|
super().__init__(**kwargs)
|
798
743
|
self.gcp_conn_id = gcp_conn_id
|
799
|
-
if delegate_to:
|
800
|
-
warnings.warn(
|
801
|
-
"'delegate_to' parameter is deprecated, please use 'impersonation_chain'", DeprecationWarning
|
802
|
-
)
|
803
|
-
self.delegate_to = delegate_to
|
804
744
|
self.project_id = project_id
|
805
745
|
self.subscription = subscription
|
806
746
|
self.max_messages = max_messages
|
@@ -811,7 +751,6 @@ class PubSubPullOperator(GoogleCloudBaseOperator):
|
|
811
751
|
def execute(self, context: Context) -> list:
|
812
752
|
hook = PubSubHook(
|
813
753
|
gcp_conn_id=self.gcp_conn_id,
|
814
|
-
delegate_to=self.delegate_to,
|
815
754
|
impersonation_chain=self.impersonation_chain,
|
816
755
|
)
|
817
756
|
|