createAddressListImportJob method
Creates an import job for an address list.
May throw AccessDeniedException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter addressListId :
The unique identifier of the address list for importing addresses to.
Parameter importDataFormat :
The format of the input for an import job.
Parameter name :
A user-friendly name for the import job.
Parameter clientToken :
A unique token that Amazon SES uses to recognize subsequent retries of the
same request.
Implementation
Future<CreateAddressListImportJobResponse> createAddressListImportJob({
required String addressListId,
required ImportDataFormat importDataFormat,
required String name,
String? clientToken,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'MailManagerSvc.CreateAddressListImportJob'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'AddressListId': addressListId,
'ImportDataFormat': importDataFormat,
'Name': name,
'ClientToken': clientToken ?? _s.generateIdempotencyToken(),
},
);
return CreateAddressListImportJobResponse.fromJson(jsonResponse.body);
}