getImport method

Future<GetImportResponse> getImport({
  1. required String importId,
})

Returns information about a specific import.

May throw ImportNotFoundException. May throw InvalidParameterException. May throw OperationNotPermittedException. May throw UnsupportedOperationException.

Parameter importId : The ID for the import.

Implementation

Future<GetImportResponse> getImport({
  required String importId,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'CloudTrail_20131101.GetImport'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ImportId': importId,
    },
  );

  return GetImportResponse.fromJson(jsonResponse.body);
}