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.
Request Syntax
GET /exportjobsv2/ExportJobId HTTP/1.1
URI Request Parameters
The request uses the following URI parameters.
- ExportJobId
-
The unique identifier of the export job to retrieve. This is the value returned by
StartExportJobV2.Length Constraints: Minimum length of 1. Maximum length of 64.
Pattern:
^[a-z0-9]+$Required: Yes
Request Body
The request does not have a request body.
Response Syntax
HTTP/1.1 200
Content-type: application/json
{
"DataType": "string",
"Destination": { ... },
"EndedAt": "string",
"ExportJobId": "string",
"FailureCode": "string",
"FailureMessage": "string",
"Name": "string",
"OutputConfiguration": { ... },
"Scopes": {
"AwsOrganizations": [
{
"OrganizationalUnitId": "string",
"OrganizationId": "string"
}
]
},
"StartedAt": "string",
"Status": "string"
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
- DataType
-
The category of data that the export job produces.
Type: String
Valid Values:
FINDINGS - Destination
-
The destination that the export job writes to.
Type: ExportDestination object
Note: This object is a Union. Only one member of this object can be specified or returned.
- EndedAt
-
The time when the export job reached a terminal state (
SUCCEEDED,FAILED, orCANCELLED). This parameter is absent while the job isRUNNING.For more information about the validation and formatting of timestamp fields in Security Hub, see Timestamps.
Type: Timestamp
- ExportJobId
-
The unique identifier of the export job.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 64.
Pattern:
^[a-z0-9]+$ - FailureCode
-
A code that classifies why the export job failed. Present only when
StatusisFAILED.Type: String
Valid Values:
ACCESS_DENIED | RESOURCE_NOT_FOUND | INTERNAL_ERROR - FailureMessage
-
A human-readable message that provides more detail about why the export job failed. Present only when
StatusisFAILED.Type: String
Pattern:
.*\S.* - Name
-
The user-provided name of the export job, if one was specified when the job was started.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 256.
- OutputConfiguration
-
The output configuration that the export job was started with, including the format and any filters or selected fields.
Type: ExportOutput object
Note: This object is a Union. Only one member of this object can be specified or returned.
- Scopes
-
The organization scopes that the export job was started with, echoed verbatim. This parameter is absent if the caller didn't supply
Scopes. It contains only the organization or organizational unit (OU) identifiers that the caller submitted; it never contains resolved member-account identifiers.Type: ExportScopes object
- StartedAt
-
The time when the export job was created.
For more information about the validation and formatting of timestamp fields in Security Hub, see Timestamps.
Type: Timestamp
- Status
-
The current state of the export job.
Type: String
Valid Values:
RUNNING | SUCCEEDED | FAILED | CANCELLED
Errors
For information about the errors that are common to all actions, see Common Error Types.
- AccessDeniedException
-
You don't have permission to perform the action specified in the request.
HTTP Status Code: 403
- InternalServerException
-
The request has failed due to an internal failure of the service.
HTTP Status Code: 500
- ResourceNotFoundException
-
The request was rejected because we can't find the specified resource.
HTTP Status Code: 404
- ThrottlingException
-
The limit on the number of requests per second was exceeded.
HTTP Status Code: 429
- ValidationException
-
The request has failed validation because it's missing required fields or has invalid inputs.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: