public interface DnsService
This service provides DNS operations on a given domain name, eg kuali.org
.
Note that this is not intended to be a full fledged DNS API. The methods provided here are for convenience as a simple way to automate tasks related to spinning up and shutting down Kuali environments.
Modifier and Type | Method and Description |
---|---|
SimpleDnsRecord |
createCNAMERecord(String aliasFQDN,
String canonicalFQDN,
int timeToLiveInSeconds)
Create a CNAME record for
aliasFQDN that points to canonicalFQDN . |
void |
deleteCNAMERecord(String fqdn)
Delete the DNS CNAME record for
fqdn , if one exists. |
com.google.common.base.Optional<SimpleDnsRecord> |
getCNAMERecord(String fqdn)
Return the DNS CNAME record for
fqdn , if one exists. |
String |
getCNAMERecordValueFromFQDN(String fqdn)
Given a
fqdn return the exact string stored by the DNS service provider in the VALUE portion of the corresponding DNS record. |
String |
getDomainName()
The name of the domain this service performs operations on eg
kuali.org |
List<SimpleDnsRecord> |
getRecords()
Return a list of all of the DNS records for this domain.
|
List<SimpleDnsRecord> |
getRecords(DnsRecordSearchCriteria searchCriteria)
Return a list of any DNS records matching the search criteria for this domain.
|
boolean |
isExistingCNAMERecord(String fqdn)
Return true if a DNS CNAME record for
fqdn exists, false otherwise. |
String getDomainName()
kuali.org
SimpleDnsRecord createCNAMERecord(String aliasFQDN, String canonicalFQDN, int timeToLiveInSeconds)
aliasFQDN
that points to canonicalFQDN
.aliasFQDN
- The fully qualified domain name that is being pointed to canonicalFQDN
canonicalFQDN
- The fully qualified domain name that aliasFQDN
points to when this method returns.timeToLiveInSeconds
- The amount of time DNS servers are allowed to cache the new CNAME record. A TTL value of 300 means if the CNAME record is changed, DNS servers around the world
may still be showing the old value for up to 5 minutes.IllegalArgumentException
- aliasFQDN
or canonicalFQDN
are blank or are not syntactically valid DNS names
aliasFQDN
does not end with this domain.timeToLiveInSeconds
is negative.boolean isExistingCNAMERecord(String fqdn)
fqdn
exists, false otherwise.IllegalArgumentException
- If fqdn
is blank, is not a syntactically valid DNS name, or does not end with this domain name.void deleteCNAMERecord(String fqdn)
fqdn
, if one exists.IllegalArgumentException
- If fqdn
is blank, is not a syntactically valid DNS name, or does not end with this domain name.com.google.common.base.Optional<SimpleDnsRecord> getCNAMERecord(String fqdn)
fqdn
, if one exists.IllegalArgumentException
- If fqdn
is blank, is not a syntactically valid DNS name, or does not end with this domain name.String getCNAMERecordValueFromFQDN(String fqdn)
fqdn
return the exact string stored by the DNS service provider in the VALUE portion of the corresponding DNS record. This typically just means
appending a single dot to the end of the fqdn
IllegalArgumentException
- If fqdn
is blank, or is not a syntactically valid DNS name.List<SimpleDnsRecord> getRecords()
List<SimpleDnsRecord> getRecords(DnsRecordSearchCriteria searchCriteria)
Copyright © 2004–2014 The Kuali Foundation. All rights reserved.