|
14 | 14 | # See the License for the specific language governing permissions and |
15 | 15 | # limitations under the License. |
16 | 16 |
|
17 | | -# IBM OpenAPI SDK Code Generator Version: 3.64.0-959a5845-20230112-195144 |
| 17 | +# IBM OpenAPI SDK Code Generator Version: 3.66.0-d6c2d7e0-20230215-221247 |
18 | 18 |
|
19 | 19 | """ |
20 | 20 | REST API for Code Engine |
@@ -232,6 +232,41 @@ def delete_project(self, id: str, **kwargs) -> DetailedResponse: |
232 | 232 | response = self.send(request, **kwargs) |
233 | 233 | return response |
234 | 234 |
|
| 235 | + def get_project_egress_ips(self, project_id: str, **kwargs) -> DetailedResponse: |
| 236 | + """ |
| 237 | + List egress IP addresses. |
| 238 | +
|
| 239 | + Lists all egress IP addresses (public and private) that are used by components |
| 240 | + running in this project. |
| 241 | +
|
| 242 | + :param str project_id: The ID of the project. |
| 243 | + :param dict headers: A `dict` containing the request headers |
| 244 | + :return: A `DetailedResponse` containing the result, headers and HTTP status code. |
| 245 | + :rtype: DetailedResponse with `dict` result representing a `ProjectEgressIPAddresses` object |
| 246 | + """ |
| 247 | + |
| 248 | + if not project_id: |
| 249 | + raise ValueError('project_id must be provided') |
| 250 | + headers = {} |
| 251 | + sdk_headers = get_sdk_headers( |
| 252 | + service_name=self.DEFAULT_SERVICE_NAME, service_version='V2', operation_id='get_project_egress_ips' |
| 253 | + ) |
| 254 | + headers.update(sdk_headers) |
| 255 | + |
| 256 | + if 'headers' in kwargs: |
| 257 | + headers.update(kwargs.get('headers')) |
| 258 | + del kwargs['headers'] |
| 259 | + headers['Accept'] = 'application/json' |
| 260 | + |
| 261 | + path_param_keys = ['project_id'] |
| 262 | + path_param_values = self.encode_path_vars(project_id) |
| 263 | + path_param_dict = dict(zip(path_param_keys, path_param_values)) |
| 264 | + url = '/projects/{project_id}/egress_ips'.format(**path_param_dict) |
| 265 | + request = self.prepare_request(method='GET', url=url, headers=headers) |
| 266 | + |
| 267 | + response = self.send(request, **kwargs) |
| 268 | + return response |
| 269 | + |
235 | 270 | ######################### |
236 | 271 | # Applications |
237 | 272 | ######################### |
@@ -7257,6 +7292,68 @@ class StatusEnum(str, Enum): |
7257 | 7292 | CREATION_FAILED = 'creation_failed' |
7258 | 7293 |
|
7259 | 7294 |
|
| 7295 | +class ProjectEgressIPAddresses: |
| 7296 | + """ |
| 7297 | + Describes the model of egress IP addresses. |
| 7298 | +
|
| 7299 | + :attr List[str] private: (optional) List of IBM private network IP addresses. |
| 7300 | + :attr List[str] public: (optional) List of public IP addresses. |
| 7301 | + """ |
| 7302 | + |
| 7303 | + def __init__(self, *, private: List[str] = None, public: List[str] = None) -> None: |
| 7304 | + """ |
| 7305 | + Initialize a ProjectEgressIPAddresses object. |
| 7306 | +
|
| 7307 | + :param List[str] private: (optional) List of IBM private network IP |
| 7308 | + addresses. |
| 7309 | + :param List[str] public: (optional) List of public IP addresses. |
| 7310 | + """ |
| 7311 | + self.private = private |
| 7312 | + self.public = public |
| 7313 | + |
| 7314 | + @classmethod |
| 7315 | + def from_dict(cls, _dict: Dict) -> 'ProjectEgressIPAddresses': |
| 7316 | + """Initialize a ProjectEgressIPAddresses object from a json dictionary.""" |
| 7317 | + args = {} |
| 7318 | + if 'private' in _dict: |
| 7319 | + args['private'] = _dict.get('private') |
| 7320 | + if 'public' in _dict: |
| 7321 | + args['public'] = _dict.get('public') |
| 7322 | + return cls(**args) |
| 7323 | + |
| 7324 | + @classmethod |
| 7325 | + def _from_dict(cls, _dict): |
| 7326 | + """Initialize a ProjectEgressIPAddresses object from a json dictionary.""" |
| 7327 | + return cls.from_dict(_dict) |
| 7328 | + |
| 7329 | + def to_dict(self) -> Dict: |
| 7330 | + """Return a json dictionary representing this model.""" |
| 7331 | + _dict = {} |
| 7332 | + if hasattr(self, 'private') and self.private is not None: |
| 7333 | + _dict['private'] = self.private |
| 7334 | + if hasattr(self, 'public') and self.public is not None: |
| 7335 | + _dict['public'] = self.public |
| 7336 | + return _dict |
| 7337 | + |
| 7338 | + def _to_dict(self): |
| 7339 | + """Return a json dictionary representing this model.""" |
| 7340 | + return self.to_dict() |
| 7341 | + |
| 7342 | + def __str__(self) -> str: |
| 7343 | + """Return a `str` version of this ProjectEgressIPAddresses object.""" |
| 7344 | + return json.dumps(self.to_dict(), indent=2) |
| 7345 | + |
| 7346 | + def __eq__(self, other: 'ProjectEgressIPAddresses') -> bool: |
| 7347 | + """Return `true` when self and other are equal, false otherwise.""" |
| 7348 | + if not isinstance(other, self.__class__): |
| 7349 | + return False |
| 7350 | + return self.__dict__ == other.__dict__ |
| 7351 | + |
| 7352 | + def __ne__(self, other: 'ProjectEgressIPAddresses') -> bool: |
| 7353 | + """Return `true` when self and other are not equal, false otherwise.""" |
| 7354 | + return not self == other |
| 7355 | + |
| 7356 | + |
7260 | 7357 | class ProjectList: |
7261 | 7358 | """ |
7262 | 7359 | Contains a list of projects and pagination information. |
|
0 commit comments