31
31
from google .cloud .alloydb .connector .lazy import LazyRefreshCache
32
32
from google .cloud .alloydb .connector .types import CacheTypes
33
33
from google .cloud .alloydb .connector .utils import generate_keys
34
+ from google .cloud .alloydb .connector .utils import strip_http_prefix
34
35
35
36
if TYPE_CHECKING :
36
37
from google .auth .credentials import Credentials
@@ -51,7 +52,7 @@ class AsyncConnector:
51
52
billing purposes.
52
53
Defaults to None, picking up project from environment.
53
54
alloydb_api_endpoint (str): Base URL to use when calling
54
- the AlloyDB API endpoint. Defaults to "https:// alloydb.googleapis.com".
55
+ the AlloyDB API endpoint. Defaults to "alloydb.googleapis.com".
55
56
enable_iam_auth (bool): Enables automatic IAM database authentication.
56
57
ip_type (str | IPTypes): Default IP type for all AlloyDB connections.
57
58
Defaults to IPTypes.PRIVATE ("PRIVATE") for private IP connections.
@@ -75,7 +76,7 @@ def __init__(
75
76
self ._cache : dict [str , CacheTypes ] = {}
76
77
# initialize default params
77
78
self ._quota_project = quota_project
78
- self ._alloydb_api_endpoint = alloydb_api_endpoint
79
+ self ._alloydb_api_endpoint = strip_http_prefix ( alloydb_api_endpoint )
79
80
self ._enable_iam_auth = enable_iam_auth
80
81
# if ip_type is str, convert to IPTypes enum
81
82
if isinstance (ip_type , str ):
0 commit comments