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