Skip to content

describe_export_tasks async

describe_export_tasks(
    *,
    config_overrides: Optional[AsyncCloudWatchLogsClientConfig] = None,
    task_id: Optional[ExportTaskId] = None,
    status_code: Optional[ExportTaskStatusCode] = None,
    next_token: Optional[NextToken] = None,
    limit: Optional[DescribeLimit] = None,
) -> DescribeExportTasksResponse

Lists the specified export tasks. You can list all your export tasks or filter the results based on task ID or task status.

Parameters:

  • task_id (Optional[ExportTaskId], default: None ) –

    The ID of the export task. Specifying a task ID filters the results to one or zero export tasks.

  • status_code (Optional[ExportTaskStatusCode], default: None ) –

    The status code of the export task. Specifying a status code filters the results to zero or more export tasks.

  • next_token (Optional[NextToken], default: None ) –

    The token for the next set of items to return. (You received this token from a previous call.)

  • limit (Optional[DescribeLimit], default: None ) –

    The maximum number of items returned. If you don't specify a value, the default is up to 50 items.

Raises:

Source code in docs_src/capo_cloudwatch_logs/_services/async_cloud_watch_logs.py
async def describe_export_tasks(
    self,
    *,
    config_overrides: Optional[AsyncCloudWatchLogsClientConfig] = None,
    task_id: Optional[
        "capo_cloudwatch_logs.types.export_task_id.ExportTaskId"
    ] = None,
    status_code: Optional[
        "capo_cloudwatch_logs.types.export_task_status_code.ExportTaskStatusCode"
    ] = None,
    next_token: Optional["capo_cloudwatch_logs.types.next_token.NextToken"] = None,
    limit: Optional[
        "capo_cloudwatch_logs.types.describe_limit.DescribeLimit"
    ] = None,
) -> "capo_cloudwatch_logs.types.describe_export_tasks_response.DescribeExportTasksResponse":
    """<p>Lists the specified export tasks. You can list all your export tasks or filter the results based on task ID or task status.</p>

    Args:
        task_id: <p>The ID of the export task. Specifying a task ID filters the results to one or zero export tasks.</p>
        status_code: <p>The status code of the export task. Specifying a status code filters the results to zero or more export tasks.</p>
        next_token: <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
        limit: <p>The maximum number of items returned. If you don't specify a value, the default is up to 50 items.</p>

    Raises:
        capo_cloudwatch_logs.errors.invalid_parameter_exception.InvalidParameterException: <p>A parameter is specified incorrectly.</p>
        capo_cloudwatch_logs.errors.service_unavailable_exception.ServiceUnavailableException: <p>The service cannot complete the request.</p>
        capo_cloudwatch_logs.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_cloudwatch_logs.types.describe_export_tasks_request.DescribeExportTasksRequest]",
    ) -> AsyncOperationResponse[
        "capo_cloudwatch_logs.types.describe_export_tasks_response.DescribeExportTasksResponse"
    ]:
        import capo_cloudwatch_logs._operations.logs_20140328.describe_export_tasks

        (
            output,
            http_response,
        ) = await capo_cloudwatch_logs._operations.logs_20140328.describe_export_tasks.async_describe_export_tasks(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeExportTasks")
    )
    input_: capo_cloudwatch_logs.types.describe_export_tasks_request.DescribeExportTasksRequest = {}
    if task_id is not None:
        input_["task_id"] = task_id
    if status_code is not None:
        input_["status_code"] = status_code
    if next_token is not None:
        input_["next_token"] = next_token
    if limit is not None:
        input_["limit"] = limit

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output