File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 2929from google .auth .transport .requests import Request
3030from google .cloud import resourcemanager_v3
3131import requests
32+ import logging
3233
33- _VERTEX_AI_ENDPOINT = "https://{location}-aiplatform.googleapis.com/v1beta1"
34+ _VERTEX_AI_ENDPOINT = (
35+ "https://staging-{location}-aiplatform.sandbox.googleapis.com/v1beta1"
36+ )
3437
3538
3639def check_adc () -> bool :
@@ -89,6 +92,7 @@ def _call_vertex_express_api(
8992 raise ValueError (f"Unsupported method: { method } " )
9093
9194 response .raise_for_status ()
95+ logging .info ("API Response: %s" , response .text )
9296 return response .json ()
9397
9498
@@ -126,7 +130,7 @@ def check_express_eligibility(
126130 result = _call_vertex_express_api (
127131 "GET" , "/Eligibility:check" , location = location
128132 )
129- return result .get ("eligibility" ) == "IN_SCOPE"
133+ return result .get ("eligibility" ) in [ "IN_SCOPE" , "ELIGIBLE" ]
130134 except (requests .exceptions .HTTPError , KeyError ) as e :
131135 return False
132136
You can’t perform that action at this time.
0 commit comments