Update dns record

				
					StructOperationResponse domainZoneUpdate(string idSession, string domain, string subdomain, string type, string value, string newValue, StructOptionsZone options) 
			

Update a DNS record from the domain zonefile.

REQUIRED

  • idSession string (32)
    Session ID.
  • domain string (255)
    Domain name.
  • subdomain string (255)
    Sub domain.
  • type string
    Type of DNS record (A / AAAA / MX / CNAME / TXT / NS / SRV).
  • value string (150)
    Current value of the DNS record.
  • newValue string (150)
    New value of the DNS record.
OPTIONAL

  • options object (StructZoneParam)
    Custom settings of the new record as StructZoneParam object.

An Object of type StructOperationResponse

$clientSOAP = new SoapClient('https://URL.wsdl');

$domain = 'test.com';
$subdomain = 'www';
$type = 'A';
$value = '192.168.0.1';
$newValue = '127.0.0.1';
$structZoneParam = [
    'service' => null,
    'protocol' => null,
    'ttl' => '365',
    'ttlUnit' => 'S',
    'priority' => null,
    'weight' => null,
    'port' => null
];

try {
    $idSession = $clientSOAP->sessionOpen('XX000', 'xxxxxxxx');
    $structOperationResponse  = $clientSOAP->domainZoneUpdate($idSession, $domain, $subdomain, $type, $value, $newValue, $structZoneParam);
    print_r($structOperationResponse);

} catch (SoapFault $fault) {
    echo 'Exception : ' . $fault->getMessage() . "\n";
}

if (isset($idSession)) {
    $clientSOAP->sessionClose($idSession);
}