1- from typing import Any , Dict , Union
1+ from typing import Any , Dict , Optional , Union
22
33from linode_api4 .errors import UnexpectedResponseError
44from linode_api4 .groups import Group
1111 drop_null_keys ,
1212)
1313from linode_api4 .objects .base import _flatten_request_body_recursive
14+ from linode_api4 .paths import LKETier
1415
1516
1617class LKEGroup (Group ):
@@ -67,6 +68,7 @@ def cluster_create(
6768 LKEClusterControlPlaneOptions , Dict [str , Any ]
6869 ] = None ,
6970 apl_enabled : bool = False ,
71+ tier : Optional [str ] = None ,
7072 ** kwargs ,
7173 ):
7274 """
@@ -104,9 +106,13 @@ def cluster_create(
104106 :param control_plane: The control plane configuration of this LKE cluster.
105107 :type control_plane: Dict[str, Any] or LKEClusterControlPlaneRequest
106108 :param apl_enabled: Whether this cluster should use APL.
107- NOTE: This endpoint is in beta and may only
109+ NOTE: This field is in beta and may only
108110 function if base_url is set to `https://api.linode.com/v4beta`.
109111 :type apl_enabled: bool
112+ :param tier: The tier of LKE cluster to create.
113+ NOTE: This field is in beta and may only
114+ function if base_url is set to `https://api.linode.com/v4beta`.
115+ :type tier: str
110116 :param kwargs: Any other arguments to pass along to the API. See the API
111117 docs for possible values.
112118
@@ -122,6 +128,7 @@ def cluster_create(
122128 node_pools if isinstance (node_pools , list ) else [node_pools ]
123129 ),
124130 "control_plane" : control_plane ,
131+ "tier" : tier ,
125132 }
126133 params .update (kwargs )
127134
@@ -183,3 +190,16 @@ def types(self, *filters):
183190 return self .client ._get_and_filter (
184191 LKEType , * filters , endpoint = "/lke/types"
185192 )
193+
194+ def tier (self , id : str ) -> LKETier :
195+ """
196+ Returns an object representing the LKE tier API path.
197+
198+ :param id: The ID of the tier.
199+ :type id: str
200+
201+ :returns: An object representing the LKE tier API path.
202+ :rtype: LKETier
203+ """
204+
205+ return LKETier (self .client , id )
0 commit comments