Skip to content

CloudWatchLogsClient.create_export_task

rboto-cloudwatch-logs==0.4.0 · Service index · Types

Model summary (excerpt): Creates an export task so that you can 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. Exporting log data to S3 buckets that are encrypted by KMS is supported. Exporting log data to Amazon S3 buckets that have S3 Object...

Install and imports

python -m pip install "rboto[cloudwatch-logs]==0.4.0"
from rboto import CloudWatchLogsClient
from rboto_cloudwatch_logs.types import (
    CreateExportTaskOutput,
)

Signature

async def create_export_task(
    *,
    log_group_name: str,
    from_: int,
    to: int,
    destination: str,
    task_name: str | None = None,
    log_stream_name_prefix: str | None = None,
    destination_prefix: str | None = None,
) -> CreateExportTaskOutput: ...

Arguments without defaults are required. None omits an optional request argument. Static types do not validate resource existence, permissions, lengths, ranges, or conditional service requirements.

Arguments

Argument Required Model notes (excerpt)
log_group_name Yes The name of the log group.
from_ Yes 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 Yes The end 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 later than this time are not exported. You must specify a time that is not earlier than when this log group was created.
destination Yes The name of S3 bucket for the exported log data. The bucket must be in the same Amazon Web Services Region.
task_name No The name of the export task.
log_stream_name_prefix No Export only log streams that match the provided prefix. If you don't specify a value, no prefix filter is applied.
destination_prefix No The prefix used as the start of the key for every object exported. If you don't specify a value, the default is exportedlogs . The length of this parameter must comply with the S3 object key name length limits. The object key name is a sequence of Unicode characters with UTF-8 encoding, and can be up to 1,024 bytes.

Output

CreateExportTaskOutput.

Read-only native attributes, accessed as response.field. Collection getters materialize Python values; to_dict() recursively materializes a mapping. Streams are consumed once.

Field Type Presence References
task_id str | None Always present —

| None means a value can be absent. Output mappings include every declared key; optional input keys may be omitted. Unknown output enum/union variants are not automatically valid inputs.

CreateExportTaskOutput

Follow these links for nested inputs and outputs; recursive types link back to the same type page.

Pagination and streaming

No generated paginator for this operation.

No output stream.

Errors

Import from rboto_cloudwatch_logs.exceptions:

InvalidParameterError, LimitExceededError, OperationAbortedError, ResourceAlreadyExistsError, ResourceNotFoundError, ServiceUnavailableError.

Other service failures use the service base error; credential, transport and timeout failures use shared errors.

Service guide · Pinned model