prefect_gcp.credentials
Module handling GCP credentials.
Classes
ClientType
GcpCredentials
Block used to manage authentication with GCP. Google authentication is
handled via the google.oauth2 module or through the CLI.
Specify either one of service account_file or service_account_info; if both
are not specified, the client will try to detect the credentials following Google’s
Application Default Credentials.
See Google’s Authentication documentation
for details on inference and recommended authentication patterns.
Attributes:
service_account_file: Path to the service account JSON keyfile.service_account_info: The contents of the keyfile as a dict.
block_initialization
get_access_token
get_bigquery_client
project: Name of the project to use; overrides the base class’s project if provided.location: Location to use.
- An authenticated BigQuery client.
get_client
client_type: The name of the client to get.**get_client_kwargs: Additional keyword arguments to pass to theget_*_clientmethod.
- An authenticated client.
ValueError: if the client is not supported.
get_cloud_storage_client
project: Name of the project to use; overrides the base class’s project if provided.
- An authenticated Cloud Storage client.
get_credentials_from_service_account
get_job_service_async_client
- An authenticated Job Service async client.
get_job_service_client
- An authenticated Job Service client.
get_secret_manager_client
- An authenticated Secret Manager Service client.