listImports method
Returns information on all imports, or a select set of imports by
ImportStatus or Destination.
May throw EventDataStoreARNInvalidException.
May throw InvalidNextTokenException.
May throw InvalidParameterException.
May throw OperationNotPermittedException.
May throw UnsupportedOperationException.
Parameter destination :
The ARN of the destination event data store.
Parameter importStatus :
The status of the import.
Parameter maxResults :
The maximum number of imports to display on a single page.
Parameter nextToken :
A token you can use to get the next page of import results.
Implementation
Future<ListImportsResponse> listImports({
String? destination,
ImportStatus? importStatus,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
1000,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'CloudTrail_20131101.ListImports'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (destination != null) 'Destination': destination,
if (importStatus != null) 'ImportStatus': importStatus.value,
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
},
);
return ListImportsResponse.fromJson(jsonResponse.body);
}