describeExportTasks method

Future<DescribeExportTasksResponse> describeExportTasks({
  1. int? limit,
  2. String? nextToken,
  3. ExportTaskStatusCode? statusCode,
  4. String? taskId,
})

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

May throw InvalidParameterException. May throw ServiceUnavailableException.

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

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

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

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

Implementation

Future<DescribeExportTasksResponse> describeExportTasks({
  int? limit,
  String? nextToken,
  ExportTaskStatusCode? statusCode,
  String? taskId,
}) async {
  _s.validateNumRange(
    'limit',
    limit,
    1,
    50,
  );
  _s.validateStringLength(
    'nextToken',
    nextToken,
    1,
    1152921504606846976,
  );
  _s.validateStringLength(
    'taskId',
    taskId,
    1,
    512,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'Logs_20140328.DescribeExportTasks'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (limit != null) 'limit': limit,
      if (nextToken != null) 'nextToken': nextToken,
      if (statusCode != null) 'statusCode': statusCode.toValue(),
      if (taskId != null) 'taskId': taskId,
    },
  );

  return DescribeExportTasksResponse.fromJson(jsonResponse.body);
}