listImports method

Future<ListImportsOutput> listImports({
  1. String? nextToken,
  2. int? pageSize,
  3. String? tableArn,
})

Lists completed imports within the past 90 days.

May throw LimitExceededException.

Parameter nextToken : An optional string that, if supplied, must be copied from the output of a previous call to ListImports. When provided in this manner, the API fetches the next page of results.

Parameter pageSize : The number of ImportSummary objects returned in a single page.

Parameter tableArn : The Amazon Resource Name (ARN) associated with the table that was imported to.

Implementation

Future<ListImportsOutput> listImports({
  String? nextToken,
  int? pageSize,
  String? tableArn,
}) async {
  _s.validateNumRange(
    'pageSize',
    pageSize,
    1,
    25,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'DynamoDB_20120810.ListImports'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (nextToken != null) 'NextToken': nextToken,
      if (pageSize != null) 'PageSize': pageSize,
      if (tableArn != null) 'TableArn': tableArn,
    },
  );

  return ListImportsOutput.fromJson(jsonResponse.body);
}