File tree Expand file tree Collapse file tree 6 files changed +94
-0
lines changed
scaleway-async/scaleway_async/audit_trail/v1alpha1
scaleway/scaleway/audit_trail/v1alpha1 Expand file tree Collapse file tree 6 files changed +94
-0
lines changed Original file line number Diff line number Diff line change 4242from .types import ListCombinedEventsResponseCombinedEvent
4343from .types import Product
4444from .types import CreateExportJobRequest
45+ from .types import DeleteExportJobRequest
4546from .types import ExportJob
4647from .types import ListAuthenticationEventsRequest
4748from .types import ListAuthenticationEventsResponse
9697 "ListCombinedEventsResponseCombinedEvent" ,
9798 "Product" ,
9899 "CreateExportJobRequest" ,
100+ "DeleteExportJobRequest" ,
99101 "ExportJob" ,
100102 "ListAuthenticationEventsRequest" ,
101103 "ListAuthenticationEventsResponse" ,
Original file line number Diff line number Diff line change @@ -303,3 +303,35 @@ async def create_export_job(
303303
304304 self ._throw_on_error (res )
305305 return unmarshal_ExportJob (res .json ())
306+
307+ async def delete_export_job (
308+ self ,
309+ * ,
310+ export_job_id : str ,
311+ region : Optional [ScwRegion ] = None ,
312+ ) -> None :
313+ """
314+ Delete an export job.
315+ Deletes an export job for a specified id.
316+ :param export_job_id: ID of the export job.
317+ :param region: Region to target. If none is passed will use default region from the config.
318+
319+ Usage:
320+ ::
321+
322+ result = await api.delete_export_job(
323+ export_job_id="example",
324+ )
325+ """
326+
327+ param_region = validate_path_param (
328+ "region" , region or self .client .default_region
329+ )
330+ param_export_job_id = validate_path_param ("export_job_id" , export_job_id )
331+
332+ res = self ._request (
333+ "DELETE" ,
334+ f"/audit-trail/v1alpha1/regions/{ param_region } /export-jobs/{ param_export_job_id } " ,
335+ )
336+
337+ self ._throw_on_error (res )
Original file line number Diff line number Diff line change @@ -559,6 +559,19 @@ class CreateExportJobRequest:
559559 s3 : Optional [ExportJobS3 ] = None
560560
561561
562+ @dataclass
563+ class DeleteExportJobRequest :
564+ export_job_id : str
565+ """
566+ ID of the export job.
567+ """
568+
569+ region : Optional [ScwRegion ] = None
570+ """
571+ Region to target. If none is passed will use default region from the config.
572+ """
573+
574+
562575@dataclass
563576class ExportJob :
564577 id : str
Original file line number Diff line number Diff line change 4242from .types import ListCombinedEventsResponseCombinedEvent
4343from .types import Product
4444from .types import CreateExportJobRequest
45+ from .types import DeleteExportJobRequest
4546from .types import ExportJob
4647from .types import ListAuthenticationEventsRequest
4748from .types import ListAuthenticationEventsResponse
9697 "ListCombinedEventsResponseCombinedEvent" ,
9798 "Product" ,
9899 "CreateExportJobRequest" ,
100+ "DeleteExportJobRequest" ,
99101 "ExportJob" ,
100102 "ListAuthenticationEventsRequest" ,
101103 "ListAuthenticationEventsResponse" ,
Original file line number Diff line number Diff line change @@ -303,3 +303,35 @@ def create_export_job(
303303
304304 self ._throw_on_error (res )
305305 return unmarshal_ExportJob (res .json ())
306+
307+ def delete_export_job (
308+ self ,
309+ * ,
310+ export_job_id : str ,
311+ region : Optional [ScwRegion ] = None ,
312+ ) -> None :
313+ """
314+ Delete an export job.
315+ Deletes an export job for a specified id.
316+ :param export_job_id: ID of the export job.
317+ :param region: Region to target. If none is passed will use default region from the config.
318+
319+ Usage:
320+ ::
321+
322+ result = api.delete_export_job(
323+ export_job_id="example",
324+ )
325+ """
326+
327+ param_region = validate_path_param (
328+ "region" , region or self .client .default_region
329+ )
330+ param_export_job_id = validate_path_param ("export_job_id" , export_job_id )
331+
332+ res = self ._request (
333+ "DELETE" ,
334+ f"/audit-trail/v1alpha1/regions/{ param_region } /export-jobs/{ param_export_job_id } " ,
335+ )
336+
337+ self ._throw_on_error (res )
Original file line number Diff line number Diff line change @@ -559,6 +559,19 @@ class CreateExportJobRequest:
559559 s3 : Optional [ExportJobS3 ] = None
560560
561561
562+ @dataclass
563+ class DeleteExportJobRequest :
564+ export_job_id : str
565+ """
566+ ID of the export job.
567+ """
568+
569+ region : Optional [ScwRegion ] = None
570+ """
571+ Region to target. If none is passed will use default region from the config.
572+ """
573+
574+
562575@dataclass
563576class ExportJob :
564577 id : str
You can’t perform that action at this time.
0 commit comments