SecurityHub / Client / cancel_export_job_v2
cancel_export_job_v2¶
- SecurityHub.Client.cancel_export_job_v2(**kwargs)¶
Cancels a findings export job that is in progress. Security Hub transitions a running job to the
CANCELLEDstate and returns theExportJobIdand its newStatus. Canceling a job that is already in theCANCELLEDstate succeeds and returns the same result, so you can safely retry a cancel request.You can’t cancel an export job that has already reached a terminal
SUCCEEDEDorFAILEDstate; in that case, this operation returns aConflictException. If no export job matches theExportJobIdthat you provide, this operation returns aResourceNotFoundException.The
Statusvalue returned by this operation reflects the cancellation immediately, even though the job can take a short time to stop completely.See also: AWS API Documentation
Request Syntax
response = client.cancel_export_job_v2( ExportJobId='string' )
- Parameters:
ExportJobId (string) –
[REQUIRED]
The unique identifier of the export job to cancel. This is the value returned by
StartExportJobV2.- Return type:
dict
- Returns:
Response Syntax
{ 'ExportJobId': 'string', 'Status': 'RUNNING'|'SUCCEEDED'|'FAILED'|'CANCELLED' }
Response Structure
(dict) –
ExportJobId (string) –
The unique identifier of the export job.
Status (string) –
The state of the export job after the cancel request.
Exceptions
SecurityHub.Client.exceptions.AccessDeniedExceptionSecurityHub.Client.exceptions.ConflictExceptionSecurityHub.Client.exceptions.InternalServerExceptionSecurityHub.Client.exceptions.ResourceNotFoundExceptionSecurityHub.Client.exceptions.ThrottlingExceptionSecurityHub.Client.exceptions.ValidationException