CreateExportJob
Creates an export job for a data source and destination.
Export jobs run asynchronously. This operation returns a JobId. Call
GetExportJob with that ID until JobStatus is
COMPLETED, FAILED, or CANCELLED. When the
status is COMPLETED, download the export file from the pre-signed URL in
ExportDestination.S3Url. When the status is FAILED, see
FailureInfo. To store a copy in your own bucket, upload the downloaded
file to your bucket. Do not include S3Url in the request.
You can execute this operation no more than once per second.
Request Syntax
POST /v2/email/export-jobs HTTP/1.1
Content-type: application/json
{
"ExportDataSource": {
"MessageInsightsDataSource": {
"EndDate": number,
"Exclude": {
"Destination": [ "string" ],
"FromEmailAddress": [ "string" ],
"Isp": [ "string" ],
"LastDeliveryEvent": [ "string" ],
"LastEngagementEvent": [ "string" ],
"Subject": [ "string" ],
"TenantName": [ "string" ]
},
"Include": {
"Destination": [ "string" ],
"FromEmailAddress": [ "string" ],
"Isp": [ "string" ],
"LastDeliveryEvent": [ "string" ],
"LastEngagementEvent": [ "string" ],
"Subject": [ "string" ],
"TenantName": [ "string" ]
},
"MaxResults": number,
"StartDate": number
},
"MetricsDataSource": {
"Dimensions": {
"string" : [ "string" ]
},
"EndDate": number,
"Metrics": [
{
"Aggregation": "string",
"Name": "string"
}
],
"Namespace": "string",
"StartDate": number
}
},
"ExportDestination": {
"DataFormat": "string",
"S3Url": "string"
}
}
URI Request Parameters
The request does not use any URI parameters.
Request Body
The request accepts the following data in JSON format.
- ExportDataSource
-
The data source for the export job.
Type: ExportDataSource object
Required: Yes
- ExportDestination
-
The destination for the export job. Specify only
DataFormat. Do not includeS3Urlin this request. SES writes the export file to a location that it manages and returns the download URL inGetExportJob.Type: ExportDestination object
Required: Yes
Response Syntax
HTTP/1.1 200
Content-type: application/json
{
"JobId": "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.
- JobId
-
A string that represents the export job ID.
Type: String
Length Constraints: Minimum length of 1.
Errors
For information about the errors that are common to all actions, see Common Error Types.
- BadRequestException
-
The input you provided is invalid.
HTTP Status Code: 400
- LimitExceededException
-
There are too many instances of the specified resource type.
HTTP Status Code: 400
- NotFoundException
-
The resource you attempted to access doesn't exist.
HTTP Status Code: 404
- TooManyRequestsException
-
Too many requests have been made to the operation.
HTTP Status Code: 429
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: