@@ -417,17 +417,17 @@ def test_connection(
417
417
GCPTestConnectionError if an error occurs during the test connection
418
418
419
419
Usage:
420
- - Using static credentials:
420
+ - Using ADC credentials from `/Users/<user>/.config/gcloud/application_default_credentials.json` :
421
421
>>> GcpProvider.test_connection(
422
422
... client_id="client_id",
423
423
... client_secret="client_secret",
424
424
... refresh_token="refresh_token"
425
425
... )
426
- - Using a credentials file:
426
+ - Using a Service Account credentials file path :
427
427
>>> GcpProvider.test_connection(
428
428
... credentials_file="credentials_file"
429
429
... )
430
- - Using a service account to impersonate, authentication is required to impersonate a service account :
430
+ - Using ADC credentials with a Service Account to impersonate:
431
431
>>> GcpProvider.test_connection(
432
432
... client_id="client_id",
433
433
... client_secret="client_secret",
@@ -436,7 +436,7 @@ def test_connection(
436
436
... )
437
437
"""
438
438
try :
439
- # Set the GCP credentials using the provided client_id, client_secret and refresh_token
439
+ # Set the GCP credentials using the provided client_id, client_secret and refresh_token from ADC
440
440
gcp_credentials = None
441
441
if any ([client_id , client_secret , refresh_token ]):
442
442
gcp_credentials = GcpProvider .validate_static_arguments (
@@ -738,7 +738,7 @@ def validate_static_arguments(
738
738
client_id : str = None , client_secret : str = None , refresh_token : str = None
739
739
) -> dict :
740
740
"""
741
- Validate the static arguments client_id, client_secret and refresh_token
741
+ Validate the static arguments client_id, client_secret and refresh_token of ADC credentials
742
742
743
743
Args:
744
744
client_id: str
@@ -749,7 +749,7 @@ def validate_static_arguments(
749
749
dict
750
750
751
751
Raises:
752
- GCPStaticCredentialsError if any of the static arguments is missing
752
+ GCPStaticCredentialsError if any of the static arguments is missing from the ADC credentials
753
753
754
754
Usage:
755
755
>>> GcpProvider.validate_static_arguments(client_id, client_secret, refresh_token)
0 commit comments