Skip to content

Commit 3cab071

Browse files
Generator: Update SDK /services/ske (#2049)
Co-authored-by: Ruben Hoenle <Ruben.Hoenle@stackit.cloud>
1 parent 7b8cc08 commit 3cab071

File tree

4 files changed

+276
-1
lines changed

4 files changed

+276
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## Release (2025-XX-YY)
2+
- `ske`: [v1.1.0](services/ske/CHANGELOG.md#v110)
3+
- **Feature:** Add new methods to trigger the wake up of a cluster.
4+
15
## Release (2025-07-21)
26
- `alb`:
37
- [v0.4.0](services/alb/CHANGELOG.md#v040)

services/ske/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## v1.1.0
2+
- **Feature:** Add new methods to trigger the wake up of a cluster.
3+
14
## v1.0.0
25
- **Breaking Change:** The region is no longer specified within the client configuration. Instead, the region must be passed as a parameter to any region-specific request.
36
- **Breaking Change:** Renamed `Argus` model to `Observability`

services/ske/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "stackit-ske"
33

44
[tool.poetry]
55
name = "stackit-ske"
6-
version = "v1.0.0"
6+
version = "v1.1.0"
77
authors = [
88
"STACKIT Developer Tools <developer-tools@stackit.cloud>",
99
]

services/ske/src/stackit/ske/api/default_api.py

Lines changed: 268 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3230,3 +3230,271 @@ def _trigger_reconcile_serialize(
32303230
_host=_host,
32313231
_request_auth=_request_auth,
32323232
)
3233+
3234+
@validate_call
3235+
def trigger_wakeup(
3236+
self,
3237+
project_id: StrictStr,
3238+
region: StrictStr,
3239+
cluster_name: StrictStr,
3240+
_request_timeout: Union[
3241+
None,
3242+
Annotated[StrictFloat, Field(gt=0)],
3243+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
3244+
] = None,
3245+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
3246+
_content_type: Optional[StrictStr] = None,
3247+
_headers: Optional[Dict[StrictStr, Any]] = None,
3248+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3249+
) -> object:
3250+
"""Trigger cluster wakeup
3251+
3252+
Trigger immediate wake up of the cluster. If the cluster is already in running state, the method does nothing.
3253+
3254+
:param project_id: (required)
3255+
:type project_id: str
3256+
:param region: (required)
3257+
:type region: str
3258+
:param cluster_name: (required)
3259+
:type cluster_name: str
3260+
:param _request_timeout: timeout setting for this request. If one
3261+
number provided, it will be total request
3262+
timeout. It can also be a pair (tuple) of
3263+
(connection, read) timeouts.
3264+
:type _request_timeout: int, tuple(int, int), optional
3265+
:param _request_auth: set to override the auth_settings for an a single
3266+
request; this effectively ignores the
3267+
authentication in the spec for a single request.
3268+
:type _request_auth: dict, optional
3269+
:param _content_type: force content-type for the request.
3270+
:type _content_type: str, Optional
3271+
:param _headers: set to override the headers for a single
3272+
request; this effectively ignores the headers
3273+
in the spec for a single request.
3274+
:type _headers: dict, optional
3275+
:param _host_index: set to override the host_index for a single
3276+
request; this effectively ignores the host_index
3277+
in the spec for a single request.
3278+
:type _host_index: int, optional
3279+
:return: Returns the result object.
3280+
""" # noqa: E501
3281+
3282+
_param = self._trigger_wakeup_serialize(
3283+
project_id=project_id,
3284+
region=region,
3285+
cluster_name=cluster_name,
3286+
_request_auth=_request_auth,
3287+
_content_type=_content_type,
3288+
_headers=_headers,
3289+
_host_index=_host_index,
3290+
)
3291+
3292+
_response_types_map: Dict[str, Optional[str]] = {
3293+
"200": "object",
3294+
"202": "object",
3295+
"400": "object",
3296+
"401": "object",
3297+
"404": "object",
3298+
}
3299+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
3300+
response_data.read()
3301+
return self.api_client.response_deserialize(
3302+
response_data=response_data,
3303+
response_types_map=_response_types_map,
3304+
).data
3305+
3306+
@validate_call
3307+
def trigger_wakeup_with_http_info(
3308+
self,
3309+
project_id: StrictStr,
3310+
region: StrictStr,
3311+
cluster_name: StrictStr,
3312+
_request_timeout: Union[
3313+
None,
3314+
Annotated[StrictFloat, Field(gt=0)],
3315+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
3316+
] = None,
3317+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
3318+
_content_type: Optional[StrictStr] = None,
3319+
_headers: Optional[Dict[StrictStr, Any]] = None,
3320+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3321+
) -> ApiResponse[object]:
3322+
"""Trigger cluster wakeup
3323+
3324+
Trigger immediate wake up of the cluster. If the cluster is already in running state, the method does nothing.
3325+
3326+
:param project_id: (required)
3327+
:type project_id: str
3328+
:param region: (required)
3329+
:type region: str
3330+
:param cluster_name: (required)
3331+
:type cluster_name: str
3332+
:param _request_timeout: timeout setting for this request. If one
3333+
number provided, it will be total request
3334+
timeout. It can also be a pair (tuple) of
3335+
(connection, read) timeouts.
3336+
:type _request_timeout: int, tuple(int, int), optional
3337+
:param _request_auth: set to override the auth_settings for an a single
3338+
request; this effectively ignores the
3339+
authentication in the spec for a single request.
3340+
:type _request_auth: dict, optional
3341+
:param _content_type: force content-type for the request.
3342+
:type _content_type: str, Optional
3343+
:param _headers: set to override the headers for a single
3344+
request; this effectively ignores the headers
3345+
in the spec for a single request.
3346+
:type _headers: dict, optional
3347+
:param _host_index: set to override the host_index for a single
3348+
request; this effectively ignores the host_index
3349+
in the spec for a single request.
3350+
:type _host_index: int, optional
3351+
:return: Returns the result object.
3352+
""" # noqa: E501
3353+
3354+
_param = self._trigger_wakeup_serialize(
3355+
project_id=project_id,
3356+
region=region,
3357+
cluster_name=cluster_name,
3358+
_request_auth=_request_auth,
3359+
_content_type=_content_type,
3360+
_headers=_headers,
3361+
_host_index=_host_index,
3362+
)
3363+
3364+
_response_types_map: Dict[str, Optional[str]] = {
3365+
"200": "object",
3366+
"202": "object",
3367+
"400": "object",
3368+
"401": "object",
3369+
"404": "object",
3370+
}
3371+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
3372+
response_data.read()
3373+
return self.api_client.response_deserialize(
3374+
response_data=response_data,
3375+
response_types_map=_response_types_map,
3376+
)
3377+
3378+
@validate_call
3379+
def trigger_wakeup_without_preload_content(
3380+
self,
3381+
project_id: StrictStr,
3382+
region: StrictStr,
3383+
cluster_name: StrictStr,
3384+
_request_timeout: Union[
3385+
None,
3386+
Annotated[StrictFloat, Field(gt=0)],
3387+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
3388+
] = None,
3389+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
3390+
_content_type: Optional[StrictStr] = None,
3391+
_headers: Optional[Dict[StrictStr, Any]] = None,
3392+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3393+
) -> RESTResponseType:
3394+
"""Trigger cluster wakeup
3395+
3396+
Trigger immediate wake up of the cluster. If the cluster is already in running state, the method does nothing.
3397+
3398+
:param project_id: (required)
3399+
:type project_id: str
3400+
:param region: (required)
3401+
:type region: str
3402+
:param cluster_name: (required)
3403+
:type cluster_name: str
3404+
:param _request_timeout: timeout setting for this request. If one
3405+
number provided, it will be total request
3406+
timeout. It can also be a pair (tuple) of
3407+
(connection, read) timeouts.
3408+
:type _request_timeout: int, tuple(int, int), optional
3409+
:param _request_auth: set to override the auth_settings for an a single
3410+
request; this effectively ignores the
3411+
authentication in the spec for a single request.
3412+
:type _request_auth: dict, optional
3413+
:param _content_type: force content-type for the request.
3414+
:type _content_type: str, Optional
3415+
:param _headers: set to override the headers for a single
3416+
request; this effectively ignores the headers
3417+
in the spec for a single request.
3418+
:type _headers: dict, optional
3419+
:param _host_index: set to override the host_index for a single
3420+
request; this effectively ignores the host_index
3421+
in the spec for a single request.
3422+
:type _host_index: int, optional
3423+
:return: Returns the result object.
3424+
""" # noqa: E501
3425+
3426+
_param = self._trigger_wakeup_serialize(
3427+
project_id=project_id,
3428+
region=region,
3429+
cluster_name=cluster_name,
3430+
_request_auth=_request_auth,
3431+
_content_type=_content_type,
3432+
_headers=_headers,
3433+
_host_index=_host_index,
3434+
)
3435+
3436+
_response_types_map: Dict[str, Optional[str]] = {
3437+
"200": "object",
3438+
"202": "object",
3439+
"400": "object",
3440+
"401": "object",
3441+
"404": "object",
3442+
}
3443+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
3444+
return response_data.response
3445+
3446+
def _trigger_wakeup_serialize(
3447+
self,
3448+
project_id,
3449+
region,
3450+
cluster_name,
3451+
_request_auth,
3452+
_content_type,
3453+
_headers,
3454+
_host_index,
3455+
) -> RequestSerialized:
3456+
3457+
_host = None
3458+
3459+
_collection_formats: Dict[str, str] = {}
3460+
3461+
_path_params: Dict[str, str] = {}
3462+
_query_params: List[Tuple[str, str]] = []
3463+
_header_params: Dict[str, Optional[str]] = _headers or {}
3464+
_form_params: List[Tuple[str, str]] = []
3465+
_files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
3466+
_body_params: Optional[bytes] = None
3467+
3468+
# process the path parameters
3469+
if project_id is not None:
3470+
_path_params["projectId"] = project_id
3471+
if region is not None:
3472+
_path_params["region"] = region
3473+
if cluster_name is not None:
3474+
_path_params["clusterName"] = cluster_name
3475+
# process the query parameters
3476+
# process the header parameters
3477+
# process the form parameters
3478+
# process the body parameter
3479+
3480+
# set the HTTP header `Accept`
3481+
if "Accept" not in _header_params:
3482+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
3483+
3484+
# authentication setting
3485+
_auth_settings: List[str] = []
3486+
3487+
return self.api_client.param_serialize(
3488+
method="POST",
3489+
resource_path="/v2/projects/{projectId}/regions/{region}/clusters/{clusterName}/wakeup",
3490+
path_params=_path_params,
3491+
query_params=_query_params,
3492+
header_params=_header_params,
3493+
body=_body_params,
3494+
post_params=_form_params,
3495+
files=_files,
3496+
auth_settings=_auth_settings,
3497+
collection_formats=_collection_formats,
3498+
_host=_host,
3499+
_request_auth=_request_auth,
3500+
)

0 commit comments

Comments
 (0)