createConditionalForwarder method

Future<void> createConditionalForwarder({
  1. required String directoryId,
  2. required List<String> dnsIpAddrs,
  3. required String remoteDomainName,
})

Creates a conditional forwarder associated with your AWS directory. Conditional forwarders are required in order to set up a trust relationship with another domain. The conditional forwarder points to the trusted domain.

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

Parameter directoryId : The directory ID of the AWS directory for which you are creating the conditional forwarder.

Parameter dnsIpAddrs : The IP addresses of the remote DNS server associated with RemoteDomainName.

Parameter remoteDomainName : The fully qualified domain name (FQDN) of the remote domain with which you will set up a trust relationship.

Implementation

Future<void> createConditionalForwarder({
  required String directoryId,
  required List<String> dnsIpAddrs,
  required String remoteDomainName,
}) async {
  ArgumentError.checkNotNull(directoryId, 'directoryId');
  ArgumentError.checkNotNull(dnsIpAddrs, 'dnsIpAddrs');
  ArgumentError.checkNotNull(remoteDomainName, 'remoteDomainName');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'DirectoryService_20150416.CreateConditionalForwarder'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'DirectoryId': directoryId,
      'DnsIpAddrs': dnsIpAddrs,
      'RemoteDomainName': remoteDomainName,
    },
  );
}