awswrangler.data_api.redshift.connect¶
- awswrangler.data_api.redshift.connect(cluster_id: str, database: str, secret_arn: str = '', db_user: str = '', boto3_session: Optional[Session] = None, **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.
boto3_session (boto3.Session(), optional) – The boto3 session. If None, the default boto3 session is used.
**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.