|
29 | 29 | PoolVolumeType, |
30 | 30 | Runtime, |
31 | 31 | Cluster, |
| 32 | + ClusterType, |
32 | 33 | CreateClusterRequestAutoUpgrade, |
33 | 34 | CreateClusterRequestAutoscalerConfig, |
34 | 35 | CreateClusterRequestOpenIDConnectConfig, |
35 | 36 | CreateClusterRequestPoolConfig, |
36 | 37 | CreatePoolRequestUpgradePolicy, |
37 | 38 | ExternalNode, |
38 | 39 | ListClusterAvailableVersionsResponse, |
| 40 | + ListClusterTypesResponse, |
39 | 41 | ListClustersResponse, |
40 | 42 | ListNodesResponse, |
41 | 43 | ListPoolsResponse, |
|
76 | 78 | unmarshal_Version, |
77 | 79 | unmarshal_ExternalNode, |
78 | 80 | unmarshal_ListClusterAvailableVersionsResponse, |
| 81 | + unmarshal_ListClusterTypesResponse, |
79 | 82 | unmarshal_ListClustersResponse, |
80 | 83 | unmarshal_ListNodesResponse, |
81 | 84 | unmarshal_ListPoolsResponse, |
@@ -1471,3 +1474,72 @@ async def get_version( |
1471 | 1474 |
|
1472 | 1475 | self._throw_on_error(res) |
1473 | 1476 | return unmarshal_Version(res.json()) |
| 1477 | + |
| 1478 | + async def list_cluster_types( |
| 1479 | + self, |
| 1480 | + *, |
| 1481 | + region: Optional[Region] = None, |
| 1482 | + page: Optional[int] = None, |
| 1483 | + page_size: Optional[int] = None, |
| 1484 | + ) -> ListClusterTypesResponse: |
| 1485 | + """ |
| 1486 | + List cluster types. |
| 1487 | + List available cluster types and their technical details. |
| 1488 | + :param region: Region to target. If none is passed will use default region from the config. |
| 1489 | + :param page: Page number, from the paginated results, to return for cluster-types. |
| 1490 | + :param page_size: Maximum number of clusters per page. |
| 1491 | + :return: :class:`ListClusterTypesResponse <ListClusterTypesResponse>` |
| 1492 | +
|
| 1493 | + Usage: |
| 1494 | + :: |
| 1495 | +
|
| 1496 | + result = await api.list_cluster_types() |
| 1497 | + """ |
| 1498 | + |
| 1499 | + param_region = validate_path_param( |
| 1500 | + "region", region or self.client.default_region |
| 1501 | + ) |
| 1502 | + |
| 1503 | + res = self._request( |
| 1504 | + "GET", |
| 1505 | + f"/k8s/v1/regions/{param_region}/cluster-types", |
| 1506 | + params={ |
| 1507 | + "page": page, |
| 1508 | + "page_size": page_size or self.client.default_page_size, |
| 1509 | + }, |
| 1510 | + ) |
| 1511 | + |
| 1512 | + self._throw_on_error(res) |
| 1513 | + return unmarshal_ListClusterTypesResponse(res.json()) |
| 1514 | + |
| 1515 | + async def list_cluster_types_all( |
| 1516 | + self, |
| 1517 | + *, |
| 1518 | + region: Optional[Region] = None, |
| 1519 | + page: Optional[int] = None, |
| 1520 | + page_size: Optional[int] = None, |
| 1521 | + ) -> List[ClusterType]: |
| 1522 | + """ |
| 1523 | + List cluster types. |
| 1524 | + List available cluster types and their technical details. |
| 1525 | + :param region: Region to target. If none is passed will use default region from the config. |
| 1526 | + :param page: Page number, from the paginated results, to return for cluster-types. |
| 1527 | + :param page_size: Maximum number of clusters per page. |
| 1528 | + :return: :class:`List[ListClusterTypesResponse] <List[ListClusterTypesResponse]>` |
| 1529 | +
|
| 1530 | + Usage: |
| 1531 | + :: |
| 1532 | +
|
| 1533 | + result = await api.list_cluster_types_all() |
| 1534 | + """ |
| 1535 | + |
| 1536 | + return await fetch_all_pages_async( |
| 1537 | + type=ListClusterTypesResponse, |
| 1538 | + key="cluster_types", |
| 1539 | + fetcher=self.list_cluster_types, |
| 1540 | + args={ |
| 1541 | + "region": region, |
| 1542 | + "page": page, |
| 1543 | + "page_size": page_size, |
| 1544 | + }, |
| 1545 | + ) |
0 commit comments