getExportJobV2
Returns the details of a single findings export job, including its current Status, the Destination it writes to, the OutputConfiguration it was started with, and its StartedAt and EndedAt timestamps. Use this operation to poll an export job that you started with StartExportJobV2 until it reaches a terminal state (SUCCEEDED, FAILED, or CANCELLED).
If the job failed, the response includes a FailureCode and FailureMessage that describe the reason. Input values such as Scopes and Filters are echoed back as they were submitted, with relative date ranges returned unresolved. If no export job matches the ExportJobId that you provide, this operation returns a ResourceNotFoundException.
Samples
// The following example retrieves an export job that failed because Security Hub couldn t write to the
// destination. The FailureCode and FailureMessage explain the cause.
val resp = securityHubClient.getExportJobV2 {
exportJobId = "f6e5d4c3b2a1"
}Content copied to clipboard
// The following example retrieves an export job that has finished successfully. The output is
// available in the destination bucket.
val resp = securityHubClient.getExportJobV2 {
exportJobId = "a1b2c3d4e5f6"
}Content copied to clipboard