Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Creates an export task, which allows you to efficiently export data from
a log group to an Amazon S3 bucket. When you perform a
CreateExportTask
operation, you must use credentials that have
permission to write to the S3 bucket that you specify as the
destination.
This is an asynchronous call. If all the required information is
provided, this operation initiates an export task and responds with the
ID of the task. After the task has started, you can use
DescribeExportTasks
to get the status of the export task. Each account can only have one
active (RUNNING
or PENDING
) export task at a time. To cancel an
export task, use
CancelExportTask.
You can export logs from multiple log groups or multiple time ranges to the same S3 bucket. To separate out log data for each export task, you can specify a prefix to be used as the Amazon S3 key prefix for all exported objects.
Exporting to S3 buckets that are encrypted with AES-256 is supported. Exporting to S3 buckets encrypted with SSE-KMS is not supported.
Synopsis
- data CreateExportTask = CreateExportTask' {
- destinationPrefix :: Maybe Text
- taskName :: Maybe Text
- logStreamNamePrefix :: Maybe Text
- logGroupName :: Text
- from :: Natural
- to :: Natural
- destination :: Text
- newCreateExportTask :: Text -> Natural -> Natural -> Text -> CreateExportTask
- createExportTask_destinationPrefix :: Lens' CreateExportTask (Maybe Text)
- createExportTask_taskName :: Lens' CreateExportTask (Maybe Text)
- createExportTask_logStreamNamePrefix :: Lens' CreateExportTask (Maybe Text)
- createExportTask_logGroupName :: Lens' CreateExportTask Text
- createExportTask_from :: Lens' CreateExportTask Natural
- createExportTask_to :: Lens' CreateExportTask Natural
- createExportTask_destination :: Lens' CreateExportTask Text
- data CreateExportTaskResponse = CreateExportTaskResponse' {
- taskId :: Maybe Text
- httpStatus :: Int
- newCreateExportTaskResponse :: Int -> CreateExportTaskResponse
- createExportTaskResponse_taskId :: Lens' CreateExportTaskResponse (Maybe Text)
- createExportTaskResponse_httpStatus :: Lens' CreateExportTaskResponse Int
Creating a Request
data CreateExportTask Source #
See: newCreateExportTask
smart constructor.
CreateExportTask' | |
|
Instances
:: Text | |
-> Natural | |
-> Natural | |
-> Text | |
-> CreateExportTask |
Create a value of CreateExportTask
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:destinationPrefix:CreateExportTask'
, createExportTask_destinationPrefix
- The prefix used as the start of the key for every object exported. If
you don't specify a value, the default is exportedlogs
.
$sel:taskName:CreateExportTask'
, createExportTask_taskName
- The name of the export task.
$sel:logStreamNamePrefix:CreateExportTask'
, createExportTask_logStreamNamePrefix
- Export only log streams that match the provided prefix. If you don't
specify a value, no prefix filter is applied.
$sel:logGroupName:CreateExportTask'
, createExportTask_logGroupName
- The name of the log group.
$sel:from:CreateExportTask'
, createExportTask_from
- The start time of the range for the request, expressed as the number of
milliseconds after Jan 1, 1970 00:00:00 UTC. Events with a timestamp
earlier than this time are not exported.
$sel:to:CreateExportTask'
, createExportTask_to
- The end time of the range for the request, expreswatchlogsdocused as the
number of milliseconds after Jan 1, 1970 00:00:00 UTC. Events with a
timestamp later than this time are not exported.
$sel:destination:CreateExportTask'
, createExportTask_destination
- The name of S3 bucket for the exported log data. The bucket must be in
the same Amazon Web Services region.
Request Lenses
createExportTask_destinationPrefix :: Lens' CreateExportTask (Maybe Text) Source #
The prefix used as the start of the key for every object exported. If
you don't specify a value, the default is exportedlogs
.
createExportTask_taskName :: Lens' CreateExportTask (Maybe Text) Source #
The name of the export task.
createExportTask_logStreamNamePrefix :: Lens' CreateExportTask (Maybe Text) Source #
Export only log streams that match the provided prefix. If you don't specify a value, no prefix filter is applied.
createExportTask_logGroupName :: Lens' CreateExportTask Text Source #
The name of the log group.
createExportTask_from :: Lens' CreateExportTask Natural Source #
The start time of the range for the request, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC. Events with a timestamp earlier than this time are not exported.
createExportTask_to :: Lens' CreateExportTask Natural Source #
The end time of the range for the request, expreswatchlogsdocused as the number of milliseconds after Jan 1, 1970 00:00:00 UTC. Events with a timestamp later than this time are not exported.
createExportTask_destination :: Lens' CreateExportTask Text Source #
The name of S3 bucket for the exported log data. The bucket must be in the same Amazon Web Services region.
Destructuring the Response
data CreateExportTaskResponse Source #
See: newCreateExportTaskResponse
smart constructor.
CreateExportTaskResponse' | |
|
Instances
newCreateExportTaskResponse Source #
Create a value of CreateExportTaskResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:taskId:CreateExportTaskResponse'
, createExportTaskResponse_taskId
- The ID of the export task.
$sel:httpStatus:CreateExportTaskResponse'
, createExportTaskResponse_httpStatus
- The response's http status code.
Response Lenses
createExportTaskResponse_taskId :: Lens' CreateExportTaskResponse (Maybe Text) Source #
The ID of the export task.
createExportTaskResponse_httpStatus :: Lens' CreateExportTaskResponse Int Source #
The response's http status code.