|
36 | 36 | CreateClusterRequestPoolConfig, |
37 | 37 | CreatePoolRequestUpgradePolicy, |
38 | 38 | ExternalNode, |
| 39 | + ListClusterAvailableTypesResponse, |
39 | 40 | ListClusterAvailableVersionsResponse, |
40 | 41 | ListClusterTypesResponse, |
41 | 42 | ListClustersResponse, |
|
77 | 78 | unmarshal_Pool, |
78 | 79 | unmarshal_Version, |
79 | 80 | unmarshal_ExternalNode, |
| 81 | + unmarshal_ListClusterAvailableTypesResponse, |
80 | 82 | unmarshal_ListClusterAvailableVersionsResponse, |
81 | 83 | unmarshal_ListClusterTypesResponse, |
82 | 84 | unmarshal_ListClustersResponse, |
@@ -605,6 +607,38 @@ async def list_cluster_available_versions( |
605 | 607 | self._throw_on_error(res) |
606 | 608 | return unmarshal_ListClusterAvailableVersionsResponse(res.json()) |
607 | 609 |
|
| 610 | + async def list_cluster_available_types( |
| 611 | + self, |
| 612 | + *, |
| 613 | + cluster_id: str, |
| 614 | + region: Optional[Region] = None, |
| 615 | + ) -> ListClusterAvailableTypesResponse: |
| 616 | + """ |
| 617 | + List available cluster types for a cluster. |
| 618 | + List the cluster types that a specific Kubernetes cluster is allowed to switch to. |
| 619 | + :param region: Region to target. If none is passed will use default region from the config. |
| 620 | + :param cluster_id: Cluster ID for which the available Kubernetes types will be listed. |
| 621 | + :return: :class:`ListClusterAvailableTypesResponse <ListClusterAvailableTypesResponse>` |
| 622 | +
|
| 623 | + Usage: |
| 624 | + :: |
| 625 | +
|
| 626 | + result = await api.list_cluster_available_types(cluster_id="example") |
| 627 | + """ |
| 628 | + |
| 629 | + param_region = validate_path_param( |
| 630 | + "region", region or self.client.default_region |
| 631 | + ) |
| 632 | + param_cluster_id = validate_path_param("cluster_id", cluster_id) |
| 633 | + |
| 634 | + res = self._request( |
| 635 | + "GET", |
| 636 | + f"/k8s/v1/regions/{param_region}/clusters/{param_cluster_id}/available-types", |
| 637 | + ) |
| 638 | + |
| 639 | + self._throw_on_error(res) |
| 640 | + return unmarshal_ListClusterAvailableTypesResponse(res.json()) |
| 641 | + |
608 | 642 | async def _get_cluster_kube_config( |
609 | 643 | self, |
610 | 644 | *, |
|
0 commit comments