3.3.4.138 SetPreferredServerForZones

The SetPreferredServerForZones operation is used to set the preferred DNS server for DNS zones for the provisioned IPAM database.

 <wsdl:operation name="SetPreferredServerForZones">
   <wsdl:input wsaw:Action="http://Microsoft.Windows.Ipam/IIpamServer/SetPreferredServerForZones" message="ipam:IIpamServer_SetPreferredServerForZones_InputMessage" />
   <wsdl:output wsaw:Action="http://Microsoft.Windows.Ipam/IIpamServer/SetPreferredServerForZonesResponse" message="ipam:IIpamServer_SetPreferredServerForZones_OutputMessage" />
 </wsdl:operation>

The protocol client sends an IIpamServer_SetPreferredServerForZones_InputMessage request. The server then performs the following processing steps. When the operation completes successfully, the protocol server MUST respond with the IIpamServer_SetPreferredServerForZones_OutputMessage response. In the event of a failure, an appropriate SOAP fault MUST be sent to the client as specified in section 2.2.2.1:

  1. If SetPreferredServerForZones.zoneType is equal to ZoneLookupType.None, SetPreferredServerForZones.dnsServerId less than or equal to 0, or if any element in SetPreferredServerForZones.zoneIds less than 0, an appropriate SOAP fault MUST be generated.

  2. If the SetPreferredServerForZones.zoneType is DNSForwardLookupZone, iterate through the records in ADM_DNSServerForwardLookupZoneTable. If the DnsZoneId of the record is in SetPreferredServerForZones.zoneId and the ServerRecordId of the record is equal to SetPreferredServerForZones.dnsServerId, set the IsPreferredServer field of the record to TRUE. If the DnsZoneId of the record is in SetPreferredServerForZones.zoneId and the ServerRecordId of the record is not equal to SetPreferredServerForZones.dnsServerId, set the IsPreferredServer field of the record to FALSE.

  3. If the SetPreferredServerForZones.zoneType is DNSReverseLookupZone, iterate through the records in ADM_DNSServerReverseLookupZoneTable. If the DnsReverseZoneId of the record is in SetPreferredServerForZones.zoneId and the ServerRecordId of the record is equal to SetPreferredServerForZones.dnsServerId, set the IsPreferredServer field of the record to TRUE. If the DnsReverseZoneId of the record is in SetPreferredServerForZones.zoneId and the ServerRecordId of the record is not equal to SetPreferredServerForZones.dnsServerId, set the IsPreferredServer field of the record to FALSE.

  4. Send a response message to indicate the completion of the process.