getAddressList method

Future<GetAddressListResponse> getAddressList({
  1. required String addressListId,
})

Fetch attributes of an address list.

May throw AccessDeniedException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter addressListId : The identifier of an existing address list resource to be retrieved.

Implementation

Future<GetAddressListResponse> getAddressList({
  required String addressListId,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'MailManagerSvc.GetAddressList'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'AddressListId': addressListId,
    },
  );

  return GetAddressListResponse.fromJson(jsonResponse.body);
}