Edit the PTR record for a single IP address.
Description
setPtrRecordForIpAddress() sets a single reverse DNS record for a single IP address and returns the newly created or edited
SoftLayer_Dns_Domain_ResourceRecord record. Currently this method only supports IPv4 addresses and performs no operation when given an IPv6 address.
Parameters
Name |
Type |
Description |
ipAddress |
string |
The IP address whose PTR record you wish to set. |
ptrRecord |
string |
The PTR record you wish to set. |
ttl |
int |
The time-to-live value of the PTR record. |
Required Headers
Optional Headers
Return Values
Error Handling
- Throw the exception “Please provide an IP address.” if the ipAddress parameter is empty.
- Throw the exception “Please provide a PTR address.” if the ptrRecord parameter is empty.
- Throw the exception “Please provide a valid IP address.” if the ipAddress parameter is not a valid IPv4 or IPv6 address.
- Throw the exception “Please provide a TTL value between 60 and 604800.” if the ttl parameter is less than 60 (one minute) or greater than 604800 (one week).
- Throw the exception “Access denied.” if the user making the method call does not have access to the IP address they wish to set a PTR record for.
- Throw the exception “Unable to save PTR record.” if the SoftLayer is unable to set your PTR record.
curl -g -u $SL_USER:$SL_APIKEY -X POST -d '{"parameters": [string, string, int]}' \
'https://api.softlayer.com/rest/v3.1/SoftLayer_Dns_Domain/createPtrRecord'