|
9 | 9 |
|
10 | 10 | from ads.aqua.common.decorator import handle_exceptions |
11 | 11 | from ads.aqua.common.enums import Tags |
| 12 | +from ads.aqua.constants import PRIVATE_ENDPOINT_TYPE |
12 | 13 | from ads.aqua.extension.base_handler import AquaAPIhandler |
13 | 14 | from ads.aqua.extension.errors import Errors |
14 | 15 | from ads.aqua.extension.utils import validate_function_parameters |
@@ -71,6 +72,8 @@ def get(self, id=""): |
71 | 72 | return self.list_vcn() |
72 | 73 | elif paths.startswith("aqua/subnets"): |
73 | 74 | return self.list_subnets() |
| 75 | + elif paths.startswith("aqua/privateendpoints"): |
| 76 | + return self.list_private_endpoints() |
74 | 77 | elif paths.startswith("aqua/shapes/limit"): |
75 | 78 | return self.get_shape_availability() |
76 | 79 | elif paths.startswith("aqua/bucket/versioning"): |
@@ -174,6 +177,18 @@ def list_subnets(self, **kwargs): |
174 | 177 | ) |
175 | 178 | ) |
176 | 179 |
|
| 180 | + def list_private_endpoints(self, **kwargs): |
| 181 | + """Lists the private endpoints in the specified compartment.""" |
| 182 | + compartment_id = self.get_argument("compartment_id", default=COMPARTMENT_OCID) |
| 183 | + resource_type = self.get_argument( |
| 184 | + "resource_type", default=PRIVATE_ENDPOINT_TYPE |
| 185 | + ) |
| 186 | + return self.finish( |
| 187 | + AquaUIApp().list_private_endpoints( |
| 188 | + compartment_id=compartment_id, resource_type=resource_type, **kwargs |
| 189 | + ) |
| 190 | + ) |
| 191 | + |
177 | 192 | def get_shape_availability(self, **kwargs): |
178 | 193 | """For a given compartmentId, resource limit name, and scope, returns the number of available resources associated |
179 | 194 | with the given limit.""" |
@@ -247,6 +262,7 @@ def post(self, *args, **kwargs): |
247 | 262 | ("job/shapes/?([^/]*)", AquaUIHandler), |
248 | 263 | ("vcn/?([^/]*)", AquaUIHandler), |
249 | 264 | ("subnets/?([^/]*)", AquaUIHandler), |
| 265 | + ("privateendpoints/?([^/]*)", AquaUIHandler), |
250 | 266 | ("shapes/limit/?([^/]*)", AquaUIHandler), |
251 | 267 | ("bucket/versioning/?([^/]*)", AquaUIHandler), |
252 | 268 | ("containers/?([^/]*)", AquaUIHandler), |
|
0 commit comments