DNS Provider::ModifyDNSZone

The ModifyDNSZone procedure allows you to modify a requested zone on a specified server. The changes you make with this method are temporary unless the CommitFlag default NOCOMMIT is overridden. In that case, the changes will be written to the zone file selection that applies after the changes (possibly to the zone file name) are made. The OldZoneFname parameter will be empty unless the zone file name is changed.

Note

Before using this procedure, security must be carfully considered. For detailed information about MPS DNS provider security, see DNS Provider Architecture.

Arguments

Input argument Required Description

ServerIdentifier

Yes

A string containing the dotted-quad IP address or the Fully Qualified Domain Nname (FQDN) of the server.

  • {Credentials} - Optional authentication credentials for the target DNS server.

ZoneName

Yes

A string containing the FQDN of the zone.

{ZoneType}

No

Values are: { PRIMARY | SECONDARY | FORWARD }.

{AdminEmail}

No

A string containing the new e-mail address of the administrator of the zone.

{CommitFlag}

No

Values are: { COMMIT | <NOCOMMIT> }.

{DebugLevel}

No

A string to control tracing and other debugging functionality. Values are: Logging = { HIGH | MEDIUM | LOW } Check-only = { ON | OFF }

{PropertyTree}

No

{recordCurrent}

No

Current properties of the resource record, which vary by resource record type.

  • {MasterServers} - A string containing the dotted-quad IP address of authoritative server if this zone is (or becomes) a secondary zone. This string is optional and ignored in other cases (current property).

  • {DataFile} - Optional new name for zone file - only acceptable if the default NOCOMMIT is explicitly overridden. The actual file name may be different for various reasons (current property).

  • {SecondaryServers} - An array of strings enumerating IP addresses of DNS servers allowed to receive this zone through zone replication (current property).

{recordUpdate}

No

Properties to update and any new values. Values vary by resource record type.

  • {MasterServers} - String containing dotted-quad IP address of authoritative server if this zone is (or becomes) a secondary zone. This string is optional and ignored in other cases (updated value).

  • {DataFile} - Optional new name for zone file - only acceptable if the default NOCOMMIT is explicitly overridden. The actual file name may be different for various reasons (updated value).

  • {SecondaryServers} - Array of strings enumerating IP addresses of DNS servers allowed to receive this zone through zone replication (updated value).

Output argument Description

OperationStatus

A string containing a success/failure indication, any error messages, and input parameter validity flags.

ZoneFileName

A string containing the distinguished name of the zone file. Empty if no zone file exists yet. Returns the actual name used for the zone file, regardless of the suggestion, and regardless of the CommitFlag setting.

OldZoneFname

A string containing the prior zone file name, if the name is successfully changed.

Remarks

For the ModifyDNSZone method, the following conditions apply:

  • If the call fails due to a noticeably incorrect input parameter, the associated validity flag is returned as set.

  • In the event of a partial failure, any zone files that were partially updated will be left as changed.

Sample Code

Example XML Request

Following is an example of an XML request for the ModifyDNSZone method of the DNS Provider:

<?xml version="1.0" encoding="iso-8859-1" ?> 
<request> 
 
  <data> 
 
            <serverIdentifier>100.100.100.125</serverIdentifier> 
 
                <userName>myuser</userName> 
 
         <password>password</password> 
 
               <zoneName>mydomain.com</zoneName> 
 
           <zoneType>primary</zoneType> 
 
                <adminEmail>admin@mydomain.com</adminEmail> 
 
         <commitFlag>COMMIT</commitFlag> 
 
             <debugLevel logging="high" check-only="on"/> 
 
              <properties> 
 
                      <recordCurrent> 
 
                           <property name="MasterServers"></property> 
 
                          <property name="DataFile">mydomain.com.dns</property> 
 
                               <property name="SecondaryServers>100.100.100.10</property> 
 
                  </recordCurrent> 
 
                  <recordUpdate> 
 
                            <property name="MasterServers"></property> 
 
                          <property name="DataFile">newmydomain.com.dns</property> 
 
                            <property name="SecondaryServers> 
 
                                 <value>100.100.100.10</value> 
 
                               </property> 
 
                       </recordUpdate> 
 
           </properties> 
 
     </data> 
 
   <procedure> 
 
               <execute namespace="DNS Provider" procedure="ModifyDNSZone"> 
 
                      <before source="data" destination="executeData" mode="merge"/> 
 
                    <before source="executeData" destination="data" mode="insert"/> 
 
           </execute> 
 
        </procedure> 
 
</request> 

Example XML Response

Following is an example of an XML response for the ModifyDNSZone method of the DNS Provider:

<?xml version="1.0" encoding="iso-8859-1" ?> 
  <response> 
 
        <data> 
 
            <operationStatus>Success</operationStatus> 
 
          <zoneFileName>c:\winnt\system32\dns\newmydomain.com.dns</zoneFileName> 
 
              <oldZoneFname>c:\winnt\system32\dns\mydomain.com.dns</oldZoneFname> 
 
 </data> 
 
</response> 

Applies To

DNS Provider API for:

  • Hosted Messaging and Collaboration version 4.5

  • Hosted Messaging and Collaboration version 4.0

  • Hosted Messaging and Collaboration version 3.5

  • Hosted Messaging and Collaboration version 3.0

  • Windows-based Hosting version 4.5

  • Windows-based Hosting version 4.0

  • Windows-based Hosting version 3.5

  • Windows-based Hosting for Applications version 1.0

See also

Tasks

DNS Provider::CreateDNSZone
DNS Provider::DeleteDNSZone
DNS Provider::GetDNSZone