From 5f40be369ebadcd8bfc59a86b4aa867289146363 Mon Sep 17 00:00:00 2001 From: scaleway-bot Date: Wed, 2 Sep 2026 13:18:35 +0000 Subject: [PATCH] feat(containers): add get private endpoint certificate authority --- .../scaleway_async/instance/v1/api.py | 10 +++++ .../instance/v2alpha1/__init__.py | 2 + .../scaleway_async/instance/v2alpha1/api.py | 37 ++++++++++++++++++- .../instance/v2alpha1/content.py | 2 + .../scaleway_async/instance/v2alpha1/types.py | 19 ++++++++++ .../key_manager/v1alpha1/types.py | 1 + scaleway/scaleway/instance/v1/api.py | 10 +++++ .../scaleway/instance/v2alpha1/__init__.py | 2 + scaleway/scaleway/instance/v2alpha1/api.py | 37 ++++++++++++++++++- .../scaleway/instance/v2alpha1/content.py | 2 + scaleway/scaleway/instance/v2alpha1/types.py | 19 ++++++++++ .../scaleway/key_manager/v1alpha1/types.py | 1 + 12 files changed, 138 insertions(+), 4 deletions(-) diff --git a/scaleway-async/scaleway_async/instance/v1/api.py b/scaleway-async/scaleway_async/instance/v1/api.py index 1059a909f..2e41ee299 100644 --- a/scaleway-async/scaleway_async/instance/v1/api.py +++ b/scaleway-async/scaleway_async/instance/v1/api.py @@ -3832,6 +3832,8 @@ async def list_private_ni_cs( """ List all private NICs. List all private NICs of a specified Instance. + Some private NICs, such as those in deleting, detaching, or in error state are + not listed. We strongly recommend migrating to v2alpha1 to retrieve all private NICs. :param server_id: Instance to which the private NIC is attached. :param zone: Zone to target. If none is passed will use default zone from the config. :param tags: Private NIC tags. @@ -3875,6 +3877,8 @@ async def list_private_ni_cs_all( """ List all private NICs. List all private NICs of a specified Instance. + Some private NICs, such as those in deleting, detaching, or in error state are + not listed. We strongly recommend migrating to v2alpha1 to retrieve all private NICs. :param server_id: Instance to which the private NIC is attached. :param zone: Zone to target. If none is passed will use default zone from the config. :param tags: Private NIC tags. @@ -3915,6 +3919,12 @@ async def create_private_nic( ) -> CreatePrivateNICResponse: """ Create a private NIC connecting an Instance to a Private Network. + Create a private NIC connecting an Instance to a Private Network. + Some private NICs, such as those in deleting, detaching, or in error state are + not listed in v1. + Therefore, you may encounter quota limits errors when creating a new private NIC, even if your visible + count is below the threshold. + We strongly recommend migrating to v2alpha1 to see all private NICs. :param server_id: UUID of the Instance the private NIC will be attached to. :param private_network_id: UUID of the private network where the private NIC will be attached. :param zone: Zone to target. If none is passed will use default zone from the config. diff --git a/scaleway-async/scaleway_async/instance/v2alpha1/__init__.py b/scaleway-async/scaleway_async/instance/v2alpha1/__init__.py index 1a0b7f0a7..c82818c9d 100644 --- a/scaleway-async/scaleway_async/instance/v2alpha1/__init__.py +++ b/scaleway-async/scaleway_async/instance/v2alpha1/__init__.py @@ -89,6 +89,7 @@ from .types import DeleteTemplateRequest from .types import DeleteTemplateUserDataRequest from .types import DeleteUserDataRequest +from .types import DetachAndDeletePrivateNetworkInterfaceRequest from .types import DetachServerFileSystemRequest from .types import DetachServerIPRequest from .types import DetachServerPrivateNetworkInterfaceRequest @@ -250,6 +251,7 @@ "DeleteTemplateRequest", "DeleteTemplateUserDataRequest", "DeleteUserDataRequest", + "DetachAndDeletePrivateNetworkInterfaceRequest", "DetachServerFileSystemRequest", "DetachServerIPRequest", "DetachServerPrivateNetworkInterfaceRequest", diff --git a/scaleway-async/scaleway_async/instance/v2alpha1/api.py b/scaleway-async/scaleway_async/instance/v2alpha1/api.py index 738927a09..98411ba59 100644 --- a/scaleway-async/scaleway_async/instance/v2alpha1/api.py +++ b/scaleway-async/scaleway_async/instance/v2alpha1/api.py @@ -493,9 +493,9 @@ async def delete_server( One-Of ('ips'): at most one of 'delete_all_ips', 'delete_ip_ids' could be set. :param delete_ip_ids: List of IP IDs to delete. One-Of ('ips'): at most one of 'delete_all_ips', 'delete_ip_ids' could be set. - :param delete_all_volumes: Whether to delete all volumes attached to the server. + :param delete_all_volumes: Whether to delete all volumes attached to the server. Deletion of SBS volumes is not supported yet. One-Of ('volumes'): at most one of 'delete_all_volumes', 'delete_volume_ids' could be set. - :param delete_volume_ids: List of volume IDs to delete. + :param delete_volume_ids: List of volume IDs to delete. Deletion of SBS volumes is not supported yet. One-Of ('volumes'): at most one of 'delete_all_volumes', 'delete_volume_ids' could be set. :param keep_all_private_nics: Whether to keep all private network interfaces. One-Of ('private_nics'): at most one of 'keep_all_private_nics', 'delete_private_nic_ids' could be set. @@ -1420,6 +1420,39 @@ async def delete_private_network_interface( self._throw_on_error(res) + async def detach_and_delete_private_network_interface( + self, + *, + private_network_interface_id: str, + zone: Optional[ScwZone] = None, + ) -> PrivateNetworkInterface: + """ + :param private_network_interface_id: ID of the private network interface to detach and delete. + :param zone: Zone to target. If none is passed will use default zone from the config. + :return: :class:`PrivateNetworkInterface ` + + Usage: + :: + + result = await api.detach_and_delete_private_network_interface( + private_network_interface_id="example", + ) + """ + + param_zone = validate_path_param("zone", zone or self.client.default_zone) + param_private_network_interface_id = validate_path_param( + "private_network_interface_id", private_network_interface_id + ) + + res = self._request( + "POST", + f"/instance/v2alpha1/zones/{param_zone}/private-network-interfaces/{param_private_network_interface_id}/detach-and-delete", + body={}, + ) + + self._throw_on_error(res) + return unmarshal_PrivateNetworkInterface(res.json()) + async def list_placement_groups( self, *, diff --git a/scaleway-async/scaleway_async/instance/v2alpha1/content.py b/scaleway-async/scaleway_async/instance/v2alpha1/content.py index 3cfdd6355..5452515ff 100644 --- a/scaleway-async/scaleway_async/instance/v2alpha1/content.py +++ b/scaleway-async/scaleway_async/instance/v2alpha1/content.py @@ -16,6 +16,7 @@ PrivateNetworkInterfaceStatus.ATTACHING, PrivateNetworkInterfaceStatus.DETACHING, PrivateNetworkInterfaceStatus.SYNCING, + PrivateNetworkInterfaceStatus.DELETING, ] """ Lists transient statutes of the enum :class:`PrivateNetworkInterfaceStatus `. @@ -39,6 +40,7 @@ ServerPrivateNetworkInterfaceStatus.ATTACHING, ServerPrivateNetworkInterfaceStatus.DETACHING, ServerPrivateNetworkInterfaceStatus.SYNCING, + ServerPrivateNetworkInterfaceStatus.DELETING, ] """ Lists transient statutes of the enum :class:`ServerPrivateNetworkInterfaceStatus `. diff --git a/scaleway-async/scaleway_async/instance/v2alpha1/types.py b/scaleway-async/scaleway_async/instance/v2alpha1/types.py index c42ca1929..759b30748 100644 --- a/scaleway-async/scaleway_async/instance/v2alpha1/types.py +++ b/scaleway-async/scaleway_async/instance/v2alpha1/types.py @@ -128,6 +128,9 @@ class PrivateNetworkInterfaceStatus(str, Enum, metaclass=StrEnumMeta): ATTACHING = "attaching" DETACHING = "detaching" SYNCING = "syncing" + DELETING = "deleting" + DETACH_ERROR = "detach_error" + DELETE_ERROR = "delete_error" def __str__(self) -> str: return str(self.value) @@ -208,6 +211,9 @@ class ServerPrivateNetworkInterfaceStatus(str, Enum, metaclass=StrEnumMeta): ATTACHING = "attaching" DETACHING = "detaching" SYNCING = "syncing" + DELETING = "deleting" + DETACH_ERROR = "detach_error" + DELETE_ERROR = "delete_error" def __str__(self) -> str: return str(self.value) @@ -1756,6 +1762,19 @@ class DeleteUserDataRequest: """ +@dataclass +class DetachAndDeletePrivateNetworkInterfaceRequest: + private_network_interface_id: str + """ + ID of the private network interface to detach and delete. + """ + + zone: Optional[ScwZone] = None + """ + Zone to target. If none is passed will use default zone from the config. + """ + + @dataclass class DetachServerFileSystemRequest: server_id: str diff --git a/scaleway-async/scaleway_async/key_manager/v1alpha1/types.py b/scaleway-async/scaleway_async/key_manager/v1alpha1/types.py index 9ecf8d4cf..6ecab53ee 100644 --- a/scaleway-async/scaleway_async/key_manager/v1alpha1/types.py +++ b/scaleway-async/scaleway_async/key_manager/v1alpha1/types.py @@ -48,6 +48,7 @@ class KeyAlgorithmAsymmetricSigning(str, Enum, metaclass=StrEnumMeta): ML_DSA_44 = "ml_dsa_44" ML_DSA_65 = "ml_dsa_65" ML_DSA_87 = "ml_dsa_87" + EC_SECP256K1_SHA256 = "ec_secp256k1_sha256" def __str__(self) -> str: return str(self.value) diff --git a/scaleway/scaleway/instance/v1/api.py b/scaleway/scaleway/instance/v1/api.py index 58a2eca6d..07812e67d 100644 --- a/scaleway/scaleway/instance/v1/api.py +++ b/scaleway/scaleway/instance/v1/api.py @@ -3832,6 +3832,8 @@ def list_private_ni_cs( """ List all private NICs. List all private NICs of a specified Instance. + Some private NICs, such as those in deleting, detaching, or in error state are + not listed. We strongly recommend migrating to v2alpha1 to retrieve all private NICs. :param server_id: Instance to which the private NIC is attached. :param zone: Zone to target. If none is passed will use default zone from the config. :param tags: Private NIC tags. @@ -3875,6 +3877,8 @@ def list_private_ni_cs_all( """ List all private NICs. List all private NICs of a specified Instance. + Some private NICs, such as those in deleting, detaching, or in error state are + not listed. We strongly recommend migrating to v2alpha1 to retrieve all private NICs. :param server_id: Instance to which the private NIC is attached. :param zone: Zone to target. If none is passed will use default zone from the config. :param tags: Private NIC tags. @@ -3915,6 +3919,12 @@ def create_private_nic( ) -> CreatePrivateNICResponse: """ Create a private NIC connecting an Instance to a Private Network. + Create a private NIC connecting an Instance to a Private Network. + Some private NICs, such as those in deleting, detaching, or in error state are + not listed in v1. + Therefore, you may encounter quota limits errors when creating a new private NIC, even if your visible + count is below the threshold. + We strongly recommend migrating to v2alpha1 to see all private NICs. :param server_id: UUID of the Instance the private NIC will be attached to. :param private_network_id: UUID of the private network where the private NIC will be attached. :param zone: Zone to target. If none is passed will use default zone from the config. diff --git a/scaleway/scaleway/instance/v2alpha1/__init__.py b/scaleway/scaleway/instance/v2alpha1/__init__.py index 1a0b7f0a7..c82818c9d 100644 --- a/scaleway/scaleway/instance/v2alpha1/__init__.py +++ b/scaleway/scaleway/instance/v2alpha1/__init__.py @@ -89,6 +89,7 @@ from .types import DeleteTemplateRequest from .types import DeleteTemplateUserDataRequest from .types import DeleteUserDataRequest +from .types import DetachAndDeletePrivateNetworkInterfaceRequest from .types import DetachServerFileSystemRequest from .types import DetachServerIPRequest from .types import DetachServerPrivateNetworkInterfaceRequest @@ -250,6 +251,7 @@ "DeleteTemplateRequest", "DeleteTemplateUserDataRequest", "DeleteUserDataRequest", + "DetachAndDeletePrivateNetworkInterfaceRequest", "DetachServerFileSystemRequest", "DetachServerIPRequest", "DetachServerPrivateNetworkInterfaceRequest", diff --git a/scaleway/scaleway/instance/v2alpha1/api.py b/scaleway/scaleway/instance/v2alpha1/api.py index 8af896750..34d16cafc 100644 --- a/scaleway/scaleway/instance/v2alpha1/api.py +++ b/scaleway/scaleway/instance/v2alpha1/api.py @@ -493,9 +493,9 @@ def delete_server( One-Of ('ips'): at most one of 'delete_all_ips', 'delete_ip_ids' could be set. :param delete_ip_ids: List of IP IDs to delete. One-Of ('ips'): at most one of 'delete_all_ips', 'delete_ip_ids' could be set. - :param delete_all_volumes: Whether to delete all volumes attached to the server. + :param delete_all_volumes: Whether to delete all volumes attached to the server. Deletion of SBS volumes is not supported yet. One-Of ('volumes'): at most one of 'delete_all_volumes', 'delete_volume_ids' could be set. - :param delete_volume_ids: List of volume IDs to delete. + :param delete_volume_ids: List of volume IDs to delete. Deletion of SBS volumes is not supported yet. One-Of ('volumes'): at most one of 'delete_all_volumes', 'delete_volume_ids' could be set. :param keep_all_private_nics: Whether to keep all private network interfaces. One-Of ('private_nics'): at most one of 'keep_all_private_nics', 'delete_private_nic_ids' could be set. @@ -1418,6 +1418,39 @@ def delete_private_network_interface( self._throw_on_error(res) + def detach_and_delete_private_network_interface( + self, + *, + private_network_interface_id: str, + zone: Optional[ScwZone] = None, + ) -> PrivateNetworkInterface: + """ + :param private_network_interface_id: ID of the private network interface to detach and delete. + :param zone: Zone to target. If none is passed will use default zone from the config. + :return: :class:`PrivateNetworkInterface ` + + Usage: + :: + + result = api.detach_and_delete_private_network_interface( + private_network_interface_id="example", + ) + """ + + param_zone = validate_path_param("zone", zone or self.client.default_zone) + param_private_network_interface_id = validate_path_param( + "private_network_interface_id", private_network_interface_id + ) + + res = self._request( + "POST", + f"/instance/v2alpha1/zones/{param_zone}/private-network-interfaces/{param_private_network_interface_id}/detach-and-delete", + body={}, + ) + + self._throw_on_error(res) + return unmarshal_PrivateNetworkInterface(res.json()) + def list_placement_groups( self, *, diff --git a/scaleway/scaleway/instance/v2alpha1/content.py b/scaleway/scaleway/instance/v2alpha1/content.py index 3cfdd6355..5452515ff 100644 --- a/scaleway/scaleway/instance/v2alpha1/content.py +++ b/scaleway/scaleway/instance/v2alpha1/content.py @@ -16,6 +16,7 @@ PrivateNetworkInterfaceStatus.ATTACHING, PrivateNetworkInterfaceStatus.DETACHING, PrivateNetworkInterfaceStatus.SYNCING, + PrivateNetworkInterfaceStatus.DELETING, ] """ Lists transient statutes of the enum :class:`PrivateNetworkInterfaceStatus `. @@ -39,6 +40,7 @@ ServerPrivateNetworkInterfaceStatus.ATTACHING, ServerPrivateNetworkInterfaceStatus.DETACHING, ServerPrivateNetworkInterfaceStatus.SYNCING, + ServerPrivateNetworkInterfaceStatus.DELETING, ] """ Lists transient statutes of the enum :class:`ServerPrivateNetworkInterfaceStatus `. diff --git a/scaleway/scaleway/instance/v2alpha1/types.py b/scaleway/scaleway/instance/v2alpha1/types.py index c42ca1929..759b30748 100644 --- a/scaleway/scaleway/instance/v2alpha1/types.py +++ b/scaleway/scaleway/instance/v2alpha1/types.py @@ -128,6 +128,9 @@ class PrivateNetworkInterfaceStatus(str, Enum, metaclass=StrEnumMeta): ATTACHING = "attaching" DETACHING = "detaching" SYNCING = "syncing" + DELETING = "deleting" + DETACH_ERROR = "detach_error" + DELETE_ERROR = "delete_error" def __str__(self) -> str: return str(self.value) @@ -208,6 +211,9 @@ class ServerPrivateNetworkInterfaceStatus(str, Enum, metaclass=StrEnumMeta): ATTACHING = "attaching" DETACHING = "detaching" SYNCING = "syncing" + DELETING = "deleting" + DETACH_ERROR = "detach_error" + DELETE_ERROR = "delete_error" def __str__(self) -> str: return str(self.value) @@ -1756,6 +1762,19 @@ class DeleteUserDataRequest: """ +@dataclass +class DetachAndDeletePrivateNetworkInterfaceRequest: + private_network_interface_id: str + """ + ID of the private network interface to detach and delete. + """ + + zone: Optional[ScwZone] = None + """ + Zone to target. If none is passed will use default zone from the config. + """ + + @dataclass class DetachServerFileSystemRequest: server_id: str diff --git a/scaleway/scaleway/key_manager/v1alpha1/types.py b/scaleway/scaleway/key_manager/v1alpha1/types.py index 9ecf8d4cf..6ecab53ee 100644 --- a/scaleway/scaleway/key_manager/v1alpha1/types.py +++ b/scaleway/scaleway/key_manager/v1alpha1/types.py @@ -48,6 +48,7 @@ class KeyAlgorithmAsymmetricSigning(str, Enum, metaclass=StrEnumMeta): ML_DSA_44 = "ml_dsa_44" ML_DSA_65 = "ml_dsa_65" ML_DSA_87 = "ml_dsa_87" + EC_SECP256K1_SHA256 = "ec_secp256k1_sha256" def __str__(self) -> str: return str(self.value)