@@ -434,6 +434,7 @@ def connect(
434434 timeout : Optional [int ] = None ,
435435 max_prepared_statements : int = 1000 ,
436436 tcp_keepalive : bool = True ,
437+ ** kwargs : Any ,
437438) -> redshift_connector .Connection :
438439 """Return a redshift_connector connection from a Glue Catalog or Secret Manager.
439440
@@ -455,23 +456,23 @@ def connect(
455456
456457 Parameters
457458 ----------
458- connection : Optional[ str]
459+ connection : str, optional
459460 Glue Catalog Connection name.
460461 secret_id : Optional[str]:
461462 Specifies the secret containing the connection details that you want to retrieve.
462463 You can specify either the Amazon Resource Name (ARN) or the friendly name of the secret.
463464 catalog_id : str, optional
464465 The ID of the Data Catalog.
465466 If none is provided, the AWS account ID is used by default.
466- dbname : Optional[ str]
467+ dbname : str, optional
467468 Optional database name to overwrite the stored one.
468469 boto3_session : boto3.Session(), optional
469470 Boto3 Session. The default boto3 session will be used if boto3_session receive None.
470471 ssl : bool
471472 This governs SSL encryption for TCP/IP sockets.
472473 This parameter is forward to redshift_connector.
473474 https://github.com/aws/amazon-redshift-python-driver
474- timeout : Optional[ int]
475+ timeout : int, optional
475476 This is the time in seconds before the connection to the server will time out.
476477 The default is None which means no timeout.
477478 This parameter is forward to redshift_connector.
@@ -483,6 +484,9 @@ def connect(
483484 If True then use TCP keepalive. The default is True.
484485 This parameter is forward to redshift_connector.
485486 https://github.com/aws/amazon-redshift-python-driver
487+ **kwargs : Any
488+ Forwarded to redshift_connector.connect.
489+ e.g. is_serverless=True, serverless_acct_id='...', serverless_work_group='...'
486490
487491 Returns
488492 -------
@@ -527,6 +531,7 @@ def connect(
527531 timeout = timeout ,
528532 max_prepared_statements = max_prepared_statements ,
529533 tcp_keepalive = tcp_keepalive ,
534+ ** kwargs ,
530535 )
531536
532537
@@ -542,6 +547,7 @@ def connect_temp(
542547 timeout : Optional [int ] = None ,
543548 max_prepared_statements : int = 1000 ,
544549 tcp_keepalive : bool = True ,
550+ ** kwargs : Any ,
545551) -> redshift_connector .Connection :
546552 """Return a redshift_connector temporary connection (No password required).
547553
@@ -571,7 +577,7 @@ def connect_temp(
571577 This governs SSL encryption for TCP/IP sockets.
572578 This parameter is forward to redshift_connector.
573579 https://github.com/aws/amazon-redshift-python-driver
574- timeout : Optional[ int]
580+ timeout : int, optional
575581 This is the time in seconds before the connection to the server will time out.
576582 The default is None which means no timeout.
577583 This parameter is forward to redshift_connector.
@@ -583,6 +589,9 @@ def connect_temp(
583589 If True then use TCP keepalive. The default is True.
584590 This parameter is forward to redshift_connector.
585591 https://github.com/aws/amazon-redshift-python-driver
592+ **kwargs : Any
593+ Forwarded to redshift_connector.connect.
594+ e.g. is_serverless=True, serverless_acct_id='...', serverless_work_group='...'
586595
587596 Returns
588597 -------
@@ -623,6 +632,7 @@ def connect_temp(
623632 max_prepared_statements = max_prepared_statements ,
624633 tcp_keepalive = tcp_keepalive ,
625634 db_groups = db_groups ,
635+ ** kwargs ,
626636 )
627637
628638
0 commit comments