Jump to Content

This API Documentation is now deprecated

We are excited to announce our new API Documentation.

Class DescribeExportTasksCommandProtected

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

Example

Use a bare-bones client and the command you need to make an API call.

import { CloudWatchLogsClient, DescribeExportTasksCommand } from "@aws-sdk/client-cloudwatch-logs"; // ES Modules import
// const { CloudWatchLogsClient, DescribeExportTasksCommand } = require("@aws-sdk/client-cloudwatch-logs"); // CommonJS import
const client = new CloudWatchLogsClient(config);
const input = { // DescribeExportTasksRequest
taskId: "STRING_VALUE",
statusCode: "CANCELLED" || "COMPLETED" || "FAILED" || "PENDING" || "PENDING_CANCEL" || "RUNNING",
nextToken: "STRING_VALUE",
limit: Number("int"),
};
const command = new DescribeExportTasksCommand(input);
const response = await client.send(command);
// { // DescribeExportTasksResponse
// exportTasks: [ // ExportTasks
// { // ExportTask
// taskId: "STRING_VALUE",
// taskName: "STRING_VALUE",
// logGroupName: "STRING_VALUE",
// from: Number("long"),
// to: Number("long"),
// destination: "STRING_VALUE",
// destinationPrefix: "STRING_VALUE",
// status: { // ExportTaskStatus
// code: "CANCELLED" || "COMPLETED" || "FAILED" || "PENDING" || "PENDING_CANCEL" || "RUNNING",
// message: "STRING_VALUE",
// },
// executionInfo: { // ExportTaskExecutionInfo
// creationTime: Number("long"),
// completionTime: Number("long"),
// },
// },
// ],
// nextToken: "STRING_VALUE",
// };

Param

DescribeExportTasksCommandInput

Returns

DescribeExportTasksCommandOutput

See

Throws

InvalidParameterException (client fault)

A parameter is specified incorrectly.

Throws

ServiceUnavailableException (server fault)

The service cannot complete the request.

Throws

CloudWatchLogsServiceException

Base exception class for all service exceptions from CloudWatchLogs service.

Hierarchy

Constructors

Properties

Methods

Constructors

Properties

Methods