@@ -85,7 +85,7 @@ def __init__(
85
85
self ._client = client if client else alloydb_v1beta .AlloyDBAdminAsyncClient (
86
86
credentials = credentials ,
87
87
client_options = ClientOptions (
88
- api_endpoint = alloydb_api_endpoint ,
88
+ api_endpoint = "alloydb.googleapis.com" ,
89
89
quota_project_id = quota_project ,
90
90
),
91
91
client_info = ClientInfo (
@@ -123,11 +123,10 @@ async def _get_metadata(
123
123
Returns:
124
124
dict: IP addresses of the AlloyDB instance.
125
125
"""
126
- parent = f"{ self . _alloydb_api_endpoint } / { API_VERSION } / projects/{ project } /locations/{ region } /clusters/{ cluster } /instances/{ name } "
126
+ parent = f"projects/{ project } /locations/{ region } /clusters/{ cluster } /instances/{ name } "
127
127
128
128
req = alloydb_v1beta .GetConnectionInfoRequest (parent = parent )
129
129
resp = await self ._client .get_connection_info (request = req )
130
- resp = await resp
131
130
# # try to get response json for better error message
132
131
# try:
133
132
# resp_dict = await resp.json()
@@ -178,7 +177,7 @@ async def _get_client_certificate(
178
177
tuple[str, list[str]]: tuple containing the CA certificate
179
178
and certificate chain for the AlloyDB instance.
180
179
"""
181
- parent = f"{ self . _alloydb_api_endpoint } / { API_VERSION } / projects/{ project } /locations/{ region } /clusters/{ cluster } "
180
+ parent = f"projects/{ project } /locations/{ region } /clusters/{ cluster } "
182
181
dur = duration_pb2 .Duration ()
183
182
dur .seconds = 3600
184
183
req = alloydb_v1beta .GenerateClientCertificateRequest (
@@ -188,7 +187,6 @@ async def _get_client_certificate(
188
187
use_metadata_exchange = self ._use_metadata ,
189
188
)
190
189
resp = await self ._client .generate_client_certificate (request = req )
191
- resp = await resp
192
190
# # try to get response json for better error message
193
191
# try:
194
192
# resp_dict = await resp.json()
0 commit comments