@@ -362,36 +362,60 @@ async def create_async_connector(
362362 timeout : int = 30 ,
363363 credentials : Optional [Credentials ] = None ,
364364 loop : Optional [asyncio .AbstractEventLoop ] = None ,
365+ quota_project : Optional [str ] = None ,
366+ sqladmin_api_endpoint : str = "https://sqladmin.googleapis.com" ,
367+ user_agent : Optional [str ] = None ,
365368) -> Connector :
366369 """
367- Create Connector object for asyncio connections that can auto-detect
368- and use current thread's running event loop.
370+ Create Connector object for asyncio connections that can auto-detect
371+ and use current thread's running event loop.
369372
370373 :type ip_type: IPTypes
371- :param ip_type
372- The IP type (public or private) used to connect. IP types
373- can be either IPTypes.PUBLIC or IPTypes.PRIVATE.
374-
375- :type enable_iam_auth: bool
376- :param enable_iam_auth
377- Enables automatic IAM database authentication for Postgres or MySQL
378- instances.
379-
380- :type timeout: int
381- :param timeout
382- The time limit for a connection before raising a TimeoutError.
383-
384- :type credentials: google.auth.credentials.Credentials
385- :param credentials
386- Credentials object used to authenticate connections to Cloud SQL server.
387- If not specified, Application Default Credentials are used.
388-
389- :type loop: asyncio.AbstractEventLoop
390- :param loop
391- Event loop to run asyncio tasks, if not specified, defaults
392- to current thread's running event loop.
374+ :param ip_type
375+ The IP type (public or private) used to connect. IP types
376+ can be either IPTypes.PUBLIC or IPTypes.PRIVATE.
377+
378+ :type enable_iam_auth: bool
379+ :param enable_iam_auth
380+ Enables automatic IAM database authentication for Postgres or MySQL
381+ instances.
382+
383+ :type timeout: int
384+ :param timeout
385+ The time limit for a connection before raising a TimeoutError.
386+
387+ :type credentials: google.auth.credentials.Credentials
388+ :param credentials
389+ Credentials object used to authenticate connections to Cloud SQL server.
390+ If not specified, Application Default Credentials are used.
391+
392+ :type quota_project: str
393+ :param quota_project
394+ The Project ID for an existing Google Cloud project. The project specified
395+ is used for quota and billing purposes. If not specified, defaults to
396+ project sourced from environment.
397+
398+ :type loop: asyncio.AbstractEventLoop
399+ :param loop
400+ Event loop to run asyncio tasks, if not specified, defaults to
401+ creating new event loop on background thread.
402+
403+ :type sqladmin_api_endpoint: str
404+ :param sqladmin_api_endpoint:
405+ Base URL to use when calling the Cloud SQL Admin API endpoint.
406+ Defaults to "https://sqladmin.googleapis.com", this argument should
407+ only be used in development.
393408 """
394409 # if no loop given, automatically detect running event loop
395410 if loop is None :
396411 loop = asyncio .get_running_loop ()
397- return Connector (ip_type , enable_iam_auth , timeout , credentials , loop )
412+ return Connector (
413+ ip_type = ip_type ,
414+ enable_iam_auth = enable_iam_auth ,
415+ timeout = timeout ,
416+ credentials = credentials ,
417+ loop = loop ,
418+ quota_project = quota_project ,
419+ sqladmin_api_endpoint = sqladmin_api_endpoint ,
420+ user_agent = user_agent ,
421+ )
0 commit comments