From c1dfb3443186d5478f6ef02f9753f308cdd92e65 Mon Sep 17 00:00:00 2001 From: scaleway-bot Date: Wed, 26 Aug 2026 08:13:07 +0000 Subject: [PATCH] feat: update generated APIs --- .../scaleway_async/k8s/v1/__init__.py | 6 +++ scaleway-async/scaleway_async/k8s/v1/api.py | 44 ++++++++++++++- .../scaleway_async/k8s/v1/marshalling.py | 53 +++++++++++++++++++ scaleway-async/scaleway_async/k8s/v1/types.py | 51 +++++++++++++++++- .../scaleway_async/mongodb/v1/api.py | 2 +- .../scaleway_async/mongodb/v1/types.py | 4 ++ scaleway/scaleway/k8s/v1/__init__.py | 6 +++ scaleway/scaleway/k8s/v1/api.py | 44 ++++++++++++++- scaleway/scaleway/k8s/v1/marshalling.py | 53 +++++++++++++++++++ scaleway/scaleway/k8s/v1/types.py | 51 +++++++++++++++++- scaleway/scaleway/mongodb/v1/api.py | 2 +- scaleway/scaleway/mongodb/v1/types.py | 4 ++ 12 files changed, 314 insertions(+), 6 deletions(-) diff --git a/scaleway-async/scaleway_async/k8s/v1/__init__.py b/scaleway-async/scaleway_async/k8s/v1/__init__.py index b3e69abe7..ca21f17c4 100644 --- a/scaleway-async/scaleway_async/k8s/v1/__init__.py +++ b/scaleway-async/scaleway_async/k8s/v1/__init__.py @@ -38,6 +38,7 @@ from .types import Cluster from .types import Node from .types import Pool +from .types import UserDataSummary from .types import NodeMetadataCoreV1Taint from .types import UpdateClusterRequestAutoUpgrade from .types import UpdateClusterRequestAutoscalerConfig @@ -74,6 +75,8 @@ from .types import ListNodesResponse from .types import ListPoolsRequest from .types import ListPoolsResponse +from .types import ListUserDataRequest +from .types import ListUserDataResponse from .types import ListVersionsRequest from .types import ListVersionsResponse from .types import NodeMetadata @@ -131,6 +134,7 @@ "Cluster", "Node", "Pool", + "UserDataSummary", "NodeMetadataCoreV1Taint", "UpdateClusterRequestAutoUpgrade", "UpdateClusterRequestAutoscalerConfig", @@ -167,6 +171,8 @@ "ListNodesResponse", "ListPoolsRequest", "ListPoolsResponse", + "ListUserDataRequest", + "ListUserDataResponse", "ListVersionsRequest", "ListVersionsResponse", "NodeMetadata", diff --git a/scaleway-async/scaleway_async/k8s/v1/api.py b/scaleway-async/scaleway_async/k8s/v1/api.py index cb30c0ba1..9c9df90aa 100644 --- a/scaleway-async/scaleway_async/k8s/v1/api.py +++ b/scaleway-async/scaleway_async/k8s/v1/api.py @@ -49,6 +49,7 @@ ListClustersResponse, ListNodesResponse, ListPoolsResponse, + ListUserDataResponse, ListVersionsResponse, Node, NodeMetadata, @@ -88,6 +89,7 @@ unmarshal_ListClustersResponse, unmarshal_ListNodesResponse, unmarshal_ListPoolsResponse, + unmarshal_ListUserDataResponse, unmarshal_ListVersionsResponse, unmarshal_NodeMetadata, unmarshal_SetClusterACLRulesResponse, @@ -1068,6 +1070,7 @@ async def create_pool( startup_taints: Optional[list[CoreV1Taint]] = None, private_network_id: Optional[str] = None, user_data: Optional[dict[str, str]] = None, + max_termination_grace_period: Optional[str] = None, ) -> Pool: """ Create a new Pool in a Cluster. @@ -1099,6 +1102,7 @@ async def create_pool( :param startup_taints: Kubernetes taints applied at node creation but not reconciled afterwards. :param private_network_id: Private network where the nodes are attached. Should be member of the same VPC as the API Server. :param user_data: User data applied and reconciled with the pool. + :param max_termination_grace_period: Maximum amount of time before the API forces the drain and deletion of a `deleting` node. It overrides pods `PodDisruptionBudget` and `terminationGracePeriodSeconds`. Defaults to 15 minutes, up to 1 hour. :return: :class:`Pool ` Usage: @@ -1148,6 +1152,7 @@ async def create_pool( startup_taints=startup_taints, private_network_id=private_network_id, user_data=user_data, + max_termination_grace_period=max_termination_grace_period, ), self.client, ), @@ -1287,6 +1292,7 @@ async def update_pool( kubelet_args: Optional[dict[str, str]] = None, upgrade_policy: Optional[UpdatePoolRequestUpgradePolicy] = None, security_group_id: Optional[str] = None, + max_termination_grace_period: Optional[str] = None, ) -> Pool: """ Update a Pool in a Cluster. @@ -1302,6 +1308,7 @@ async def update_pool( :param kubelet_args: New Kubelet arguments to be used by this pool. Note that this feature is experimental. :param upgrade_policy: New upgrade policy for the pool. :param security_group_id: Security group ID in which all the nodes of the pool will be moved. + :param max_termination_grace_period: New maximum amount of time before the API forces the drain and deletion of a `deleting` node. :return: :class:`Pool ` Usage: @@ -1333,6 +1340,7 @@ async def update_pool( kubelet_args=kubelet_args, upgrade_policy=upgrade_policy, security_group_id=security_group_id, + max_termination_grace_period=max_termination_grace_period, ), self.client, ), @@ -1518,7 +1526,7 @@ async def get_user_data( Get a pool related user data. Retrieve specific user data content for a given pool. Tip: add `?dl=1` at the end of the URL to directly retrieve the base64 decoded content of your user data. - :param pool_id: Pool the user data will be attached to. + :param pool_id: Pool the user data are associated to. :param key: User data key to retrieved. :param region: Region to target. If none is passed will use default region from the config. :return: :class:`ScwFile ` @@ -1546,6 +1554,40 @@ async def get_user_data( self._throw_on_error(res) return unmarshal_ScwFile(res.json()) + async def list_user_data( + self, + *, + pool_id: str, + region: Optional[ScwRegion] = None, + ) -> ListUserDataResponse: + """ + List all user data related to a given pool. + This list only the user data key and not the content. + :param pool_id: Pool the user data are associated to. + :param region: Region to target. If none is passed will use default region from the config. + :return: :class:`ListUserDataResponse ` + + Usage: + :: + + result = await api.list_user_data( + pool_id="example", + ) + """ + + param_region = validate_path_param( + "region", region or self.client.default_region + ) + param_pool_id = validate_path_param("pool_id", pool_id) + + res = self._request( + "GET", + f"/k8s/v1/regions/{param_region}/pools/{param_pool_id}/user-data", + ) + + self._throw_on_error(res) + return unmarshal_ListUserDataResponse(res.json()) + async def get_node_metadata( self, *, diff --git a/scaleway-async/scaleway_async/k8s/v1/marshalling.py b/scaleway-async/scaleway_async/k8s/v1/marshalling.py index 5587b459e..cb05424d3 100644 --- a/scaleway-async/scaleway_async/k8s/v1/marshalling.py +++ b/scaleway-async/scaleway_async/k8s/v1/marshalling.py @@ -44,6 +44,8 @@ ListClustersResponse, ListNodesResponse, ListPoolsResponse, + UserDataSummary, + ListUserDataResponse, ListVersionsResponse, NodeMetadataCoreV1Taint, NodeMetadata, @@ -882,6 +884,12 @@ def unmarshal_Pool(data: Any) -> Pool: else: args["error_message"] = None + field = data.get("max_termination_grace_period", None) + if field is not None: + args["max_termination_grace_period"] = field + else: + args["max_termination_grace_period"] = None + return Pool(**args) @@ -1218,6 +1226,42 @@ def unmarshal_ListPoolsResponse(data: Any) -> ListPoolsResponse: return ListPoolsResponse(**args) +def unmarshal_UserDataSummary(data: Any) -> UserDataSummary: + if not isinstance(data, dict): + raise TypeError( + "Unmarshalling the type 'UserDataSummary' failed as data isn't a dictionary." + ) + + args: dict[str, Any] = {} + + field = data.get("key", None) + if field is not None: + args["key"] = field + else: + args["key"] = None + + return UserDataSummary(**args) + + +def unmarshal_ListUserDataResponse(data: Any) -> ListUserDataResponse: + if not isinstance(data, dict): + raise TypeError( + "Unmarshalling the type 'ListUserDataResponse' failed as data isn't a dictionary." + ) + + args: dict[str, Any] = {} + + field = data.get("user_data", None) + if field is not None: + args["user_data"] = ( + [unmarshal_UserDataSummary(v) for v in field] if field is not None else None + ) + else: + args["user_data"] = [] + + return ListUserDataResponse(**args) + + def unmarshal_ListVersionsResponse(data: Any) -> ListVersionsResponse: if not isinstance(data, dict): raise TypeError( @@ -1675,6 +1719,9 @@ def marshal_CreateClusterRequestPoolConfig( if request.private_network_id is not None: output["private_network_id"] = request.private_network_id + if request.max_termination_grace_period is not None: + output["max_termination_grace_period"] = request.max_termination_grace_period + return output @@ -1864,6 +1911,9 @@ def marshal_CreatePoolRequest( if request.user_data is not None: output["user_data"] = {key: value for key, value in request.user_data.items()} + if request.max_termination_grace_period is not None: + output["max_termination_grace_period"] = request.max_termination_grace_period + return output @@ -2123,6 +2173,9 @@ def marshal_UpdatePoolRequest( if request.security_group_id is not None: output["security_group_id"] = request.security_group_id + if request.max_termination_grace_period is not None: + output["max_termination_grace_period"] = request.max_termination_grace_period + return output diff --git a/scaleway-async/scaleway_async/k8s/v1/types.py b/scaleway-async/scaleway_async/k8s/v1/types.py index 6bb6affd0..96c5d8884 100644 --- a/scaleway-async/scaleway_async/k8s/v1/types.py +++ b/scaleway-async/scaleway_async/k8s/v1/types.py @@ -640,6 +640,11 @@ class CreateClusterRequestPoolConfig: Private network where the nodes are attached. Should be member of the same VPC as the API Server. """ + max_termination_grace_period: Optional[str] = None + """ + Maximum amount of time before the API forces the drain and deletion of a `deleting` node. It overrides pods `PodDisruptionBudget` and `terminationGracePeriodSeconds`. Defaults to 15 minutes, up to 1 hour. + """ + @dataclass class CreatePoolRequestUpgradePolicy: @@ -1141,6 +1146,19 @@ class Pool: Details of the error, if any occurred when managing the pool. """ + max_termination_grace_period: Optional[str] = None + """ + Maximum amount of time before the API forces the drain and deletion of a `deleting` node. It overrides pods `PodDisruptionBudget` and `terminationGracePeriodSeconds`. Defaults to 15 minutes, up to 1 hour. + """ + + +@dataclass +class UserDataSummary: + key: str + """ + Key name of a given user data. + """ + @dataclass class NodeMetadataCoreV1Taint: @@ -1537,6 +1555,11 @@ class CreatePoolRequest: User data applied and reconciled with the pool. """ + max_termination_grace_period: Optional[str] = None + """ + Maximum amount of time before the API forces the drain and deletion of a `deleting` node. It overrides pods `PodDisruptionBudget` and `terminationGracePeriodSeconds`. Defaults to 15 minutes, up to 1 hour. + """ + @dataclass class DeleteACLRuleRequest: @@ -1675,7 +1698,7 @@ class GetPoolRequest: class GetUserDataRequest: pool_id: str """ - Pool the user data will be attached to. + Pool the user data are associated to. """ key: str @@ -1996,6 +2019,27 @@ class ListPoolsResponse: """ +@dataclass +class ListUserDataRequest: + pool_id: str + """ + Pool the user data are associated to. + """ + + region: Optional[ScwRegion] = None + """ + Region to target. If none is passed will use default region from the config. + """ + + +@dataclass +class ListUserDataResponse: + user_data: list[UserDataSummary] + """ + User data information. + """ + + @dataclass class ListVersionsRequest: region: Optional[ScwRegion] = None @@ -2280,6 +2324,11 @@ class UpdatePoolRequest: Security group ID in which all the nodes of the pool will be moved. """ + max_termination_grace_period: Optional[str] = None + """ + New maximum amount of time before the API forces the drain and deletion of a `deleting` node. + """ + @dataclass class UpgradeClusterRequest: diff --git a/scaleway-async/scaleway_async/mongodb/v1/api.py b/scaleway-async/scaleway_async/mongodb/v1/api.py index b8413dbf8..2555c5f59 100644 --- a/scaleway-async/scaleway_async/mongodb/v1/api.py +++ b/scaleway-async/scaleway_async/mongodb/v1/api.py @@ -1612,7 +1612,7 @@ async def apply_maintenance( ) -> Maintenance: """ Apply a maintenance of a MongoDB® Database Instance. - :param maintenance_id: + :param maintenance_id: ID of the maintenance. :param region: Region to target. If none is passed will use default region from the config. :return: :class:`Maintenance ` diff --git a/scaleway-async/scaleway_async/mongodb/v1/types.py b/scaleway-async/scaleway_async/mongodb/v1/types.py index 13f1094d6..6064b29b7 100644 --- a/scaleway-async/scaleway_async/mongodb/v1/types.py +++ b/scaleway-async/scaleway_async/mongodb/v1/types.py @@ -589,6 +589,10 @@ class Version: @dataclass class ApplyMaintenanceRequest: maintenance_id: str + """ + ID of the maintenance. + """ + region: Optional[ScwRegion] = None """ Region to target. If none is passed will use default region from the config. diff --git a/scaleway/scaleway/k8s/v1/__init__.py b/scaleway/scaleway/k8s/v1/__init__.py index b3e69abe7..ca21f17c4 100644 --- a/scaleway/scaleway/k8s/v1/__init__.py +++ b/scaleway/scaleway/k8s/v1/__init__.py @@ -38,6 +38,7 @@ from .types import Cluster from .types import Node from .types import Pool +from .types import UserDataSummary from .types import NodeMetadataCoreV1Taint from .types import UpdateClusterRequestAutoUpgrade from .types import UpdateClusterRequestAutoscalerConfig @@ -74,6 +75,8 @@ from .types import ListNodesResponse from .types import ListPoolsRequest from .types import ListPoolsResponse +from .types import ListUserDataRequest +from .types import ListUserDataResponse from .types import ListVersionsRequest from .types import ListVersionsResponse from .types import NodeMetadata @@ -131,6 +134,7 @@ "Cluster", "Node", "Pool", + "UserDataSummary", "NodeMetadataCoreV1Taint", "UpdateClusterRequestAutoUpgrade", "UpdateClusterRequestAutoscalerConfig", @@ -167,6 +171,8 @@ "ListNodesResponse", "ListPoolsRequest", "ListPoolsResponse", + "ListUserDataRequest", + "ListUserDataResponse", "ListVersionsRequest", "ListVersionsResponse", "NodeMetadata", diff --git a/scaleway/scaleway/k8s/v1/api.py b/scaleway/scaleway/k8s/v1/api.py index a87f77f6c..532613e0b 100644 --- a/scaleway/scaleway/k8s/v1/api.py +++ b/scaleway/scaleway/k8s/v1/api.py @@ -49,6 +49,7 @@ ListClustersResponse, ListNodesResponse, ListPoolsResponse, + ListUserDataResponse, ListVersionsResponse, Node, NodeMetadata, @@ -88,6 +89,7 @@ unmarshal_ListClustersResponse, unmarshal_ListNodesResponse, unmarshal_ListPoolsResponse, + unmarshal_ListUserDataResponse, unmarshal_ListVersionsResponse, unmarshal_NodeMetadata, unmarshal_SetClusterACLRulesResponse, @@ -1068,6 +1070,7 @@ def create_pool( startup_taints: Optional[list[CoreV1Taint]] = None, private_network_id: Optional[str] = None, user_data: Optional[dict[str, str]] = None, + max_termination_grace_period: Optional[str] = None, ) -> Pool: """ Create a new Pool in a Cluster. @@ -1099,6 +1102,7 @@ def create_pool( :param startup_taints: Kubernetes taints applied at node creation but not reconciled afterwards. :param private_network_id: Private network where the nodes are attached. Should be member of the same VPC as the API Server. :param user_data: User data applied and reconciled with the pool. + :param max_termination_grace_period: Maximum amount of time before the API forces the drain and deletion of a `deleting` node. It overrides pods `PodDisruptionBudget` and `terminationGracePeriodSeconds`. Defaults to 15 minutes, up to 1 hour. :return: :class:`Pool ` Usage: @@ -1148,6 +1152,7 @@ def create_pool( startup_taints=startup_taints, private_network_id=private_network_id, user_data=user_data, + max_termination_grace_period=max_termination_grace_period, ), self.client, ), @@ -1287,6 +1292,7 @@ def update_pool( kubelet_args: Optional[dict[str, str]] = None, upgrade_policy: Optional[UpdatePoolRequestUpgradePolicy] = None, security_group_id: Optional[str] = None, + max_termination_grace_period: Optional[str] = None, ) -> Pool: """ Update a Pool in a Cluster. @@ -1302,6 +1308,7 @@ def update_pool( :param kubelet_args: New Kubelet arguments to be used by this pool. Note that this feature is experimental. :param upgrade_policy: New upgrade policy for the pool. :param security_group_id: Security group ID in which all the nodes of the pool will be moved. + :param max_termination_grace_period: New maximum amount of time before the API forces the drain and deletion of a `deleting` node. :return: :class:`Pool ` Usage: @@ -1333,6 +1340,7 @@ def update_pool( kubelet_args=kubelet_args, upgrade_policy=upgrade_policy, security_group_id=security_group_id, + max_termination_grace_period=max_termination_grace_period, ), self.client, ), @@ -1518,7 +1526,7 @@ def get_user_data( Get a pool related user data. Retrieve specific user data content for a given pool. Tip: add `?dl=1` at the end of the URL to directly retrieve the base64 decoded content of your user data. - :param pool_id: Pool the user data will be attached to. + :param pool_id: Pool the user data are associated to. :param key: User data key to retrieved. :param region: Region to target. If none is passed will use default region from the config. :return: :class:`ScwFile ` @@ -1546,6 +1554,40 @@ def get_user_data( self._throw_on_error(res) return unmarshal_ScwFile(res.json()) + def list_user_data( + self, + *, + pool_id: str, + region: Optional[ScwRegion] = None, + ) -> ListUserDataResponse: + """ + List all user data related to a given pool. + This list only the user data key and not the content. + :param pool_id: Pool the user data are associated to. + :param region: Region to target. If none is passed will use default region from the config. + :return: :class:`ListUserDataResponse ` + + Usage: + :: + + result = api.list_user_data( + pool_id="example", + ) + """ + + param_region = validate_path_param( + "region", region or self.client.default_region + ) + param_pool_id = validate_path_param("pool_id", pool_id) + + res = self._request( + "GET", + f"/k8s/v1/regions/{param_region}/pools/{param_pool_id}/user-data", + ) + + self._throw_on_error(res) + return unmarshal_ListUserDataResponse(res.json()) + def get_node_metadata( self, *, diff --git a/scaleway/scaleway/k8s/v1/marshalling.py b/scaleway/scaleway/k8s/v1/marshalling.py index 5587b459e..cb05424d3 100644 --- a/scaleway/scaleway/k8s/v1/marshalling.py +++ b/scaleway/scaleway/k8s/v1/marshalling.py @@ -44,6 +44,8 @@ ListClustersResponse, ListNodesResponse, ListPoolsResponse, + UserDataSummary, + ListUserDataResponse, ListVersionsResponse, NodeMetadataCoreV1Taint, NodeMetadata, @@ -882,6 +884,12 @@ def unmarshal_Pool(data: Any) -> Pool: else: args["error_message"] = None + field = data.get("max_termination_grace_period", None) + if field is not None: + args["max_termination_grace_period"] = field + else: + args["max_termination_grace_period"] = None + return Pool(**args) @@ -1218,6 +1226,42 @@ def unmarshal_ListPoolsResponse(data: Any) -> ListPoolsResponse: return ListPoolsResponse(**args) +def unmarshal_UserDataSummary(data: Any) -> UserDataSummary: + if not isinstance(data, dict): + raise TypeError( + "Unmarshalling the type 'UserDataSummary' failed as data isn't a dictionary." + ) + + args: dict[str, Any] = {} + + field = data.get("key", None) + if field is not None: + args["key"] = field + else: + args["key"] = None + + return UserDataSummary(**args) + + +def unmarshal_ListUserDataResponse(data: Any) -> ListUserDataResponse: + if not isinstance(data, dict): + raise TypeError( + "Unmarshalling the type 'ListUserDataResponse' failed as data isn't a dictionary." + ) + + args: dict[str, Any] = {} + + field = data.get("user_data", None) + if field is not None: + args["user_data"] = ( + [unmarshal_UserDataSummary(v) for v in field] if field is not None else None + ) + else: + args["user_data"] = [] + + return ListUserDataResponse(**args) + + def unmarshal_ListVersionsResponse(data: Any) -> ListVersionsResponse: if not isinstance(data, dict): raise TypeError( @@ -1675,6 +1719,9 @@ def marshal_CreateClusterRequestPoolConfig( if request.private_network_id is not None: output["private_network_id"] = request.private_network_id + if request.max_termination_grace_period is not None: + output["max_termination_grace_period"] = request.max_termination_grace_period + return output @@ -1864,6 +1911,9 @@ def marshal_CreatePoolRequest( if request.user_data is not None: output["user_data"] = {key: value for key, value in request.user_data.items()} + if request.max_termination_grace_period is not None: + output["max_termination_grace_period"] = request.max_termination_grace_period + return output @@ -2123,6 +2173,9 @@ def marshal_UpdatePoolRequest( if request.security_group_id is not None: output["security_group_id"] = request.security_group_id + if request.max_termination_grace_period is not None: + output["max_termination_grace_period"] = request.max_termination_grace_period + return output diff --git a/scaleway/scaleway/k8s/v1/types.py b/scaleway/scaleway/k8s/v1/types.py index 6bb6affd0..96c5d8884 100644 --- a/scaleway/scaleway/k8s/v1/types.py +++ b/scaleway/scaleway/k8s/v1/types.py @@ -640,6 +640,11 @@ class CreateClusterRequestPoolConfig: Private network where the nodes are attached. Should be member of the same VPC as the API Server. """ + max_termination_grace_period: Optional[str] = None + """ + Maximum amount of time before the API forces the drain and deletion of a `deleting` node. It overrides pods `PodDisruptionBudget` and `terminationGracePeriodSeconds`. Defaults to 15 minutes, up to 1 hour. + """ + @dataclass class CreatePoolRequestUpgradePolicy: @@ -1141,6 +1146,19 @@ class Pool: Details of the error, if any occurred when managing the pool. """ + max_termination_grace_period: Optional[str] = None + """ + Maximum amount of time before the API forces the drain and deletion of a `deleting` node. It overrides pods `PodDisruptionBudget` and `terminationGracePeriodSeconds`. Defaults to 15 minutes, up to 1 hour. + """ + + +@dataclass +class UserDataSummary: + key: str + """ + Key name of a given user data. + """ + @dataclass class NodeMetadataCoreV1Taint: @@ -1537,6 +1555,11 @@ class CreatePoolRequest: User data applied and reconciled with the pool. """ + max_termination_grace_period: Optional[str] = None + """ + Maximum amount of time before the API forces the drain and deletion of a `deleting` node. It overrides pods `PodDisruptionBudget` and `terminationGracePeriodSeconds`. Defaults to 15 minutes, up to 1 hour. + """ + @dataclass class DeleteACLRuleRequest: @@ -1675,7 +1698,7 @@ class GetPoolRequest: class GetUserDataRequest: pool_id: str """ - Pool the user data will be attached to. + Pool the user data are associated to. """ key: str @@ -1996,6 +2019,27 @@ class ListPoolsResponse: """ +@dataclass +class ListUserDataRequest: + pool_id: str + """ + Pool the user data are associated to. + """ + + region: Optional[ScwRegion] = None + """ + Region to target. If none is passed will use default region from the config. + """ + + +@dataclass +class ListUserDataResponse: + user_data: list[UserDataSummary] + """ + User data information. + """ + + @dataclass class ListVersionsRequest: region: Optional[ScwRegion] = None @@ -2280,6 +2324,11 @@ class UpdatePoolRequest: Security group ID in which all the nodes of the pool will be moved. """ + max_termination_grace_period: Optional[str] = None + """ + New maximum amount of time before the API forces the drain and deletion of a `deleting` node. + """ + @dataclass class UpgradeClusterRequest: diff --git a/scaleway/scaleway/mongodb/v1/api.py b/scaleway/scaleway/mongodb/v1/api.py index 787aa332e..e57170e4d 100644 --- a/scaleway/scaleway/mongodb/v1/api.py +++ b/scaleway/scaleway/mongodb/v1/api.py @@ -1606,7 +1606,7 @@ def apply_maintenance( ) -> Maintenance: """ Apply a maintenance of a MongoDB® Database Instance. - :param maintenance_id: + :param maintenance_id: ID of the maintenance. :param region: Region to target. If none is passed will use default region from the config. :return: :class:`Maintenance ` diff --git a/scaleway/scaleway/mongodb/v1/types.py b/scaleway/scaleway/mongodb/v1/types.py index 13f1094d6..6064b29b7 100644 --- a/scaleway/scaleway/mongodb/v1/types.py +++ b/scaleway/scaleway/mongodb/v1/types.py @@ -589,6 +589,10 @@ class Version: @dataclass class ApplyMaintenanceRequest: maintenance_id: str + """ + ID of the maintenance. + """ + region: Optional[ScwRegion] = None """ Region to target. If none is passed will use default region from the config.