createConditionalForwarder method
Creates a conditional forwarder associated with your Amazon Web Services 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 ClientException.
May throw DirectoryUnavailableException.
May throw EntityAlreadyExistsException.
May throw EntityDoesNotExistException.
May throw InvalidParameterException.
May throw ServiceException.
May throw UnsupportedOperationException.
Parameter directoryId :
The directory ID of the Amazon Web Services directory for which you are
creating the conditional forwarder.
Parameter remoteDomainName :
The fully qualified domain name (FQDN) of the remote domain with which you
will set up a trust relationship.
Parameter dnsIpAddrs :
The IP addresses of the remote DNS server associated with
RemoteDomainName.
Parameter dnsIpv6Addrs :
The IPv6 addresses of the remote DNS server associated with
RemoteDomainName.
Implementation
Future<void> createConditionalForwarder({
required String directoryId,
required String remoteDomainName,
List<String>? dnsIpAddrs,
List<String>? dnsIpv6Addrs,
}) async {
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,
'RemoteDomainName': remoteDomainName,
if (dnsIpAddrs != null) 'DnsIpAddrs': dnsIpAddrs,
if (dnsIpv6Addrs != null) 'DnsIpv6Addrs': dnsIpv6Addrs,
},
);
}