describeConditionalForwarders method

Future<DescribeConditionalForwardersResult> describeConditionalForwarders({
  1. required String directoryId,
  2. List<String>? remoteDomainNames,
})

Obtains information about the conditional forwarders for this account.

If no input parameters are provided for RemoteDomainNames, this request describes all conditional forwarders for the specified directory ID.

May throw EntityDoesNotExistException. May throw DirectoryUnavailableException. May throw InvalidParameterException. May throw UnsupportedOperationException. May throw ClientException. May throw ServiceException.

Parameter directoryId : The directory ID for which to get the list of associated conditional forwarders.

Parameter remoteDomainNames : The fully qualified domain names (FQDN) of the remote domains for which to get the list of associated conditional forwarders. If this member is null, all conditional forwarders are returned.

Implementation

Future<DescribeConditionalForwardersResult> describeConditionalForwarders({
  required String directoryId,
  List<String>? remoteDomainNames,
}) async {
  ArgumentError.checkNotNull(directoryId, 'directoryId');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'DirectoryService_20150416.DescribeConditionalForwarders'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'DirectoryId': directoryId,
      if (remoteDomainNames != null) 'RemoteDomainNames': remoteDomainNames,
    },
  );

  return DescribeConditionalForwardersResult.fromJson(jsonResponse.body);
}