DNS Provider::ModifyResourceRecord
The ModifyResourceRecord procedure allows you to modify the specified resource record according to the properties present in the property tree. The modified resource record is temporary (not written to the zone file) unless the default value for CommitFlag (NOCOMMIT) is explicitly overridden.
Note
Before using this procedure, security must be carfully considered. For detailed information about MPS DNS provider security, see DNS Provider Architecture.
Note
The description under resource record name - the record to be modified - must be uniquely identifiable from the property tree, or the tree must indicate that the modification applies to all targets with the indicated name and type.
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} |
No |
Optional authentication credentials for the target DNS server. |
ZoneName |
Yes |
A string containing the FQDN of the zone. |
RRtype |
Yes |
A string containing the resource record type. |
RRname |
Yes |
A string containing the name of the resource record to be modified. If more than one record with this type/name combination exists, additional information must exist in the PropertyTree to distinguish the record to be changed. If no distinguishing information is supplied, or not enough is supplied to either make the target unique or to select all targets with the same name, the operation FAILS. It is normal, for example, for a multiple-home computer to have several "A" records with the same name. |
{CommitFlag} |
No |
Values are: { COMMIT | <NOCOMMIT> }. |
{DebugLevel} |
No |
A string to control tracing and other debugging functionality. Values are:
|
PropertyTree |
Yes |
Properties vary by resource record type. Refer to DNS WMI Provider in the DNS SDK on MSDN for the properties required as input parameters to the ModifyResourceRecord method (see "Online Links").
|
Output argument | Description |
---|---|
OperationStatus |
String containing success/failure indication, any error messages, and input parameter validity flags. |
PropertyTree |
Returns the fully populated property tree, with post-modification values. |
Remarks
For the ModifyResourceRecord method, the following applies:
If a property is used to identify a unique record, it is passed in as an attribute of an element - if used to specify the modified value as an element of the tree.
For example, assuming the resource recordtype is "A" and the resource recordname is "www", the following code would request changing the "www."
<IPaddress current="10.0.0.230"> "10.0.0.254" </IPaddress>
A record that originally referred to "230" would now point to "254". All other A records named "www" are unchanged.
Sample Code
Example XML Request
The following is an example of an XML request for the ModifyResourceRecord 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>
<rrType>MX</rrType>
<rrName>mail</rrName>
<commitFlag>COMMIT</commitFlag>
<debugLevel logging="high" check-only="on"/>
<properties>
<recordCurrent></recordCurrent>
<recordUpdate></recordUpdate>
</properties>
</data>
<procedure>
<execute namespace="DNS Provider" procedure="ModifyResourceRecord">
<before source="data" destination="executeData" mode="merge"/>
<before source="executeData" destination="data" mode="insert"/>
</execute>
</procedure>
</request>
Example XML Response
The following is an example of an XML response for the ModifyResourceRecord method of the DNS Provider:
<?xml version="1.0" encoding="iso-8859-1" ?>
<response>
<data>
<operationStatus>Success</operationStatus>
<properties>
<property name="ipAddress">100.100.100.10</property>
<property name="rrType">A</property>
<property name="rrName">mydomainA</property>
</properties>
</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::CreateResourceRecord
DNS Provider::DeleteResourceRecord
DNS Provider::GetResourceRecord