getSuppressedDestination method
Retrieves information about a specific email address that's on the
suppression list for your account or for a specific tenant. To target a
tenant's suppression list, specify the TenantName parameter.
If you omit TenantName, the operation targets the
account-level suppression list.
May throw BadRequestException.
May throw NotFoundException.
May throw TooManyRequestsException.
Parameter emailAddress :
The email address that's on the suppression list for your account or for
the specified tenant.
Parameter tenantName :
The name of the tenant whose suppression list you want to query. If you
omit this parameter, the operation targets the account-level suppression
list.
Implementation
Future<GetSuppressedDestinationResponse> getSuppressedDestination({
required String emailAddress,
String? tenantName,
}) async {
final $query = <String, List<String>>{
if (tenantName != null) 'TenantName': [tenantName],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri:
'/v2/email/suppression/addresses/${Uri.encodeComponent(emailAddress)}',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return GetSuppressedDestinationResponse.fromJson(response);
}