update_dns_settings()
Update a DNS resource record.
Signature
update_dns_settings(array $parameters): mixedParameters
Pass these parameters as KasRequestParams. Every request also requires kas_login, kas_auth_type, and kas_auth_data, as shown in SOAP with PHP.
| Name | Description | Requirement |
|---|---|---|
record_id |
The ID of the resource record | Required |
record_name |
The NAME of the resource record | Optional |
record_data |
The DATA of the resource record | Optional |
record_aux |
The AUX value of the resource record | Optional |
PHP example
<?php
// $sessionToken is returned by KasAuth, see SOAP with PHP.
$parameters = [
'record_name' => 'sub',
'record_data' => 'target.example.com.',
'record_aux' => '0',
'record_id' => '123456',
];
try {
$client = new SoapClient('https://kasapi.kasserver.com/soap/wsdl/KasApi.wsdl');
$response = $client->KasApi(json_encode([
'kas_login' => 'w0123456',
'kas_auth_type' => 'session',
'kas_auth_data' => $sessionToken,
'kas_action' => 'update_dns_settings',
'KasRequestParams' => $parameters,
]));
print_r($response);
} catch (SoapFault $fault) {
echo 'Error: ' . $fault->faultstring;
}
Responses and error codes
-
TRUEthe action was carried out -
missing_parametera required parameter is missing -
in_progressthe KAS object is currently being processed -
nothing_to_donothing was changed -
dns_settings_not_allowed -
record_already_exists -
record_already_exists_as_cname -
record_already_exists_as_non_cname -
record_aux_syntax_incorrect -
record_has_ssl_certificate -
record_id_not_found -
record_id_syntax_incorrect -
record_identifier_not_changeablewithout DNS permission, the name and identifier (e.g. v=spf1, v=DMARC1;) must be kept -
record_is_not_changeable -
record_name_syntax_incorrect -
record_syntax_incorrect