CancelImportTask
Cancels an active import task and stops importing data from the CloudTrail Lake Event Data Store.
Request Syntax
{ "importId": "string" } Request Parameters
For information about the parameters that are common to all actions, see Common Parameters.
The request accepts the following data in JSON format.
- importId
-
The ID of the import task to cancel.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 256.
Pattern:
[\-a-zA-Z0-9]+Required: Yes
Response Syntax
{ "creationTime": number, "importId": "string", "importStatistics": { "bytesImported": number }, "importStatus": "string", "lastUpdatedTime": number } 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.
- creationTime
-
The timestamp when the import task was created, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.
Type: Long
Valid Range: Minimum value of 0.
- importId
-
The ID of the cancelled import task.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 256.
Pattern:
[\-a-zA-Z0-9]+ - importStatistics
-
Statistics about the import progress at the time of cancellation.
Type: ImportStatistics object
- importStatus
-
The final status of the import task. This will be set to CANCELLED.
Type: String
Valid Values:
IN_PROGRESS | CANCELLED | COMPLETED | FAILED - lastUpdatedTime
-
The timestamp when the import task was cancelled, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.
Type: Long
Valid Range: Minimum value of 0.
Errors
For information about the errors that are common to all actions, see Common Errors.
- AccessDeniedException
-
You don't have sufficient permissions to perform this action.
HTTP Status Code: 400
- InvalidOperationException
-
The operation is not valid on the specified resource.
HTTP Status Code: 400
- InvalidParameterException
-
A parameter is specified incorrectly.
HTTP Status Code: 400
- ResourceNotFoundException
-
The specified resource does not exist.
HTTP Status Code: 400
- ThrottlingException
-
The request was throttled because of quota limits.
HTTP Status Code: 400
Examples
To cancel an import task
The following example cancels an active import task and returns the final status.
Sample Request
POST / HTTP/1.1 Host: logs.<region>.<domain> X-Amz-Target: Logs_20140328.CancelImportTask { "importId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890" } Sample Response
HTTP/1.1 200 OK { "importId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "importStatistics": { "bytesImported": 524288 }, "importStatus": "CANCELLED", "creationTime": 1641168000000, "lastUpdatedTime": 1641175200000 } See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: