libZSservicesZSamazonka-cloudwatch-logsZSamazonka-cloudwatch-logs
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.CloudWatchLogs.CreateExportTask

Description

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

Creating a Request

data CreateExportTask Source #

See: newCreateExportTask smart constructor.

Constructors

CreateExportTask' 

Fields

  • destinationPrefix :: Maybe Text

    The prefix used as the start of the key for every object exported. If you don't specify a value, the default is exportedlogs.

  • taskName :: Maybe Text

    The name of the export task.

  • logStreamNamePrefix :: Maybe Text

    Export only log streams that match the provided prefix. If you don't specify a value, no prefix filter is applied.

  • logGroupName :: Text

    The name of the log group.

  • from :: Natural

    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.

  • to :: Natural

    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.

  • destination :: Text

    The name of S3 bucket for the exported log data. The bucket must be in the same Amazon Web Services region.

Instances

Instances details
Eq CreateExportTask Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.CreateExportTask

Read CreateExportTask Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.CreateExportTask

Show CreateExportTask Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.CreateExportTask

Generic CreateExportTask Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.CreateExportTask

Associated Types

type Rep CreateExportTask :: Type -> Type #

NFData CreateExportTask Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.CreateExportTask

Methods

rnf :: CreateExportTask -> () #

Hashable CreateExportTask Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.CreateExportTask

ToJSON CreateExportTask Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.CreateExportTask

AWSRequest CreateExportTask Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.CreateExportTask

Associated Types

type AWSResponse CreateExportTask #

ToHeaders CreateExportTask Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.CreateExportTask

ToPath CreateExportTask Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.CreateExportTask

ToQuery CreateExportTask Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.CreateExportTask

type Rep CreateExportTask Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.CreateExportTask

type Rep CreateExportTask = D1 ('MetaData "CreateExportTask" "Amazonka.CloudWatchLogs.CreateExportTask" "libZSservicesZSamazonka-cloudwatch-logsZSamazonka-cloudwatch-logs" 'False) (C1 ('MetaCons "CreateExportTask'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "destinationPrefix") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "taskName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "logStreamNamePrefix") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)))) :*: ((S1 ('MetaSel ('Just "logGroupName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "from") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Natural)) :*: (S1 ('MetaSel ('Just "to") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Natural) :*: S1 ('MetaSel ('Just "destination") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))))
type AWSResponse CreateExportTask Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.CreateExportTask

newCreateExportTask Source #

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_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_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.

Constructors

CreateExportTaskResponse' 

Fields

Instances

Instances details
Eq CreateExportTaskResponse Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.CreateExportTask

Read CreateExportTaskResponse Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.CreateExportTask

Show CreateExportTaskResponse Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.CreateExportTask

Generic CreateExportTaskResponse Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.CreateExportTask

Associated Types

type Rep CreateExportTaskResponse :: Type -> Type #

NFData CreateExportTaskResponse Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.CreateExportTask

type Rep CreateExportTaskResponse Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.CreateExportTask

type Rep CreateExportTaskResponse = D1 ('MetaData "CreateExportTaskResponse" "Amazonka.CloudWatchLogs.CreateExportTask" "libZSservicesZSamazonka-cloudwatch-logsZSamazonka-cloudwatch-logs" 'False) (C1 ('MetaCons "CreateExportTaskResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "taskId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

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