awswrangler.data_api.redshift.connect

awswrangler.data_api.redshift.connect(cluster_id: str, database: str, secret_arn: str = '', db_user: str = '', **kwargs: Any) RedshiftDataApi

Create a Redshift Data API connection.

Parameters
  • cluster_id (str) – Id for the target Redshift cluster.

  • database (str) – Target database name.

  • secret_arn (str) – The ARN for the secret to be used for authentication - only required if db_user not provided.

  • db_user (str) – The database user to generate temporary credentials for - only required if secret_arn not provided.

  • **kwargs – Any additional kwargs are passed to the underlying RedshiftDataApi class.

Return type

A RedshiftDataApi connection instance that can be used with wr.redshift.data_api.read_sql_query.