From 9222b829554c5f7f189f7a24f6984e2ff3fdb4c5 Mon Sep 17 00:00:00 2001 From: scaleway-bot Date: Thu, 2 Oct 2025 14:55:41 +0000 Subject: [PATCH] feat: update generated APIs --- .../audit_trail/v1alpha1/__init__.py | 2 ++ .../audit_trail/v1alpha1/api.py | 32 +++++++++++++++++++ .../audit_trail/v1alpha1/types.py | 13 ++++++++ .../scaleway/audit_trail/v1alpha1/__init__.py | 2 ++ scaleway/scaleway/audit_trail/v1alpha1/api.py | 32 +++++++++++++++++++ .../scaleway/audit_trail/v1alpha1/types.py | 13 ++++++++ 6 files changed, 94 insertions(+) diff --git a/scaleway-async/scaleway_async/audit_trail/v1alpha1/__init__.py b/scaleway-async/scaleway_async/audit_trail/v1alpha1/__init__.py index d80c01fa..539e381d 100644 --- a/scaleway-async/scaleway_async/audit_trail/v1alpha1/__init__.py +++ b/scaleway-async/scaleway_async/audit_trail/v1alpha1/__init__.py @@ -42,6 +42,7 @@ from .types import ListCombinedEventsResponseCombinedEvent from .types import Product from .types import CreateExportJobRequest +from .types import DeleteExportJobRequest from .types import ExportJob from .types import ListAuthenticationEventsRequest from .types import ListAuthenticationEventsResponse @@ -96,6 +97,7 @@ "ListCombinedEventsResponseCombinedEvent", "Product", "CreateExportJobRequest", + "DeleteExportJobRequest", "ExportJob", "ListAuthenticationEventsRequest", "ListAuthenticationEventsResponse", diff --git a/scaleway-async/scaleway_async/audit_trail/v1alpha1/api.py b/scaleway-async/scaleway_async/audit_trail/v1alpha1/api.py index eb22c82a..4eec08ad 100644 --- a/scaleway-async/scaleway_async/audit_trail/v1alpha1/api.py +++ b/scaleway-async/scaleway_async/audit_trail/v1alpha1/api.py @@ -303,3 +303,35 @@ async def create_export_job( self._throw_on_error(res) return unmarshal_ExportJob(res.json()) + + async def delete_export_job( + self, + *, + export_job_id: str, + region: Optional[ScwRegion] = None, + ) -> None: + """ + Delete an export job. + Deletes an export job for a specified id. + :param export_job_id: ID of the export job. + :param region: Region to target. If none is passed will use default region from the config. + + Usage: + :: + + result = await api.delete_export_job( + export_job_id="example", + ) + """ + + param_region = validate_path_param( + "region", region or self.client.default_region + ) + param_export_job_id = validate_path_param("export_job_id", export_job_id) + + res = self._request( + "DELETE", + f"/audit-trail/v1alpha1/regions/{param_region}/export-jobs/{param_export_job_id}", + ) + + self._throw_on_error(res) diff --git a/scaleway-async/scaleway_async/audit_trail/v1alpha1/types.py b/scaleway-async/scaleway_async/audit_trail/v1alpha1/types.py index 829e5772..8332c240 100644 --- a/scaleway-async/scaleway_async/audit_trail/v1alpha1/types.py +++ b/scaleway-async/scaleway_async/audit_trail/v1alpha1/types.py @@ -559,6 +559,19 @@ class CreateExportJobRequest: s3: Optional[ExportJobS3] = None +@dataclass +class DeleteExportJobRequest: + export_job_id: str + """ + ID of the export job. + """ + + region: Optional[ScwRegion] = None + """ + Region to target. If none is passed will use default region from the config. + """ + + @dataclass class ExportJob: id: str diff --git a/scaleway/scaleway/audit_trail/v1alpha1/__init__.py b/scaleway/scaleway/audit_trail/v1alpha1/__init__.py index d80c01fa..539e381d 100644 --- a/scaleway/scaleway/audit_trail/v1alpha1/__init__.py +++ b/scaleway/scaleway/audit_trail/v1alpha1/__init__.py @@ -42,6 +42,7 @@ from .types import ListCombinedEventsResponseCombinedEvent from .types import Product from .types import CreateExportJobRequest +from .types import DeleteExportJobRequest from .types import ExportJob from .types import ListAuthenticationEventsRequest from .types import ListAuthenticationEventsResponse @@ -96,6 +97,7 @@ "ListCombinedEventsResponseCombinedEvent", "Product", "CreateExportJobRequest", + "DeleteExportJobRequest", "ExportJob", "ListAuthenticationEventsRequest", "ListAuthenticationEventsResponse", diff --git a/scaleway/scaleway/audit_trail/v1alpha1/api.py b/scaleway/scaleway/audit_trail/v1alpha1/api.py index d4c5e54e..04eb23fe 100644 --- a/scaleway/scaleway/audit_trail/v1alpha1/api.py +++ b/scaleway/scaleway/audit_trail/v1alpha1/api.py @@ -303,3 +303,35 @@ def create_export_job( self._throw_on_error(res) return unmarshal_ExportJob(res.json()) + + def delete_export_job( + self, + *, + export_job_id: str, + region: Optional[ScwRegion] = None, + ) -> None: + """ + Delete an export job. + Deletes an export job for a specified id. + :param export_job_id: ID of the export job. + :param region: Region to target. If none is passed will use default region from the config. + + Usage: + :: + + result = api.delete_export_job( + export_job_id="example", + ) + """ + + param_region = validate_path_param( + "region", region or self.client.default_region + ) + param_export_job_id = validate_path_param("export_job_id", export_job_id) + + res = self._request( + "DELETE", + f"/audit-trail/v1alpha1/regions/{param_region}/export-jobs/{param_export_job_id}", + ) + + self._throw_on_error(res) diff --git a/scaleway/scaleway/audit_trail/v1alpha1/types.py b/scaleway/scaleway/audit_trail/v1alpha1/types.py index 829e5772..8332c240 100644 --- a/scaleway/scaleway/audit_trail/v1alpha1/types.py +++ b/scaleway/scaleway/audit_trail/v1alpha1/types.py @@ -559,6 +559,19 @@ class CreateExportJobRequest: s3: Optional[ExportJobS3] = None +@dataclass +class DeleteExportJobRequest: + export_job_id: str + """ + ID of the export job. + """ + + region: Optional[ScwRegion] = None + """ + Region to target. If none is passed will use default region from the config. + """ + + @dataclass class ExportJob: id: str