@@ -197,6 +197,7 @@ def deploy(
197197 gateway_name : str = "" ,
198198 gateway_service_name : str = "" ,
199199 gateway_upstream_name : str = "" ,
200+ auth_method : str = "none" ,
200201 use_adk_web : bool = False ,
201202 local_test : bool = False ,
202203 ) -> CloudApp :
@@ -210,6 +211,7 @@ def deploy(
210211 gateway_name (str, optional): Custom gateway resource name. Defaults to timestamped.
211212 gateway_service_name (str, optional): Custom service name. Defaults to timestamped.
212213 gateway_upstream_name (str, optional): Custom upstream name. Defaults to timestamped.
214+ auth_method (str, optional): Authentication for the agent. Defaults to none.
213215 use_adk_web (bool): Enable ADK Web configuration. Defaults to False.
214216 local_test (bool): Perform FastAPI server test before deploy. Defaults to False.
215217
@@ -232,6 +234,10 @@ def deploy(
232234 # prevent deepeval writing operations
233235 veadk_environments ["DEEPEVAL_TELEMETRY_OPT_OUT" ] = "YES"
234236
237+ enable_key_auth = False
238+ if auth_method == "api-key" :
239+ enable_key_auth = True
240+
235241 if use_adk_web :
236242 veadk_environments ["USE_ADK_WEB" ] = "True"
237243 else :
@@ -258,6 +264,7 @@ def deploy(
258264 gateway_name = gateway_name ,
259265 gateway_service_name = gateway_service_name ,
260266 gateway_upstream_name = gateway_upstream_name ,
267+ enable_key_auth = enable_key_auth ,
261268 )
262269 _ = function_id # for future use
263270
0 commit comments