1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

adding docs again

This commit is contained in:
Craig Peterson
2017-01-11 13:02:45 -07:00
parent 8e5257c497
commit 7ba051d750
40 changed files with 761 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
---
name: A
parameters:
- name
- address
- modifiers...
---
A adds an A record To a domain. The name should be the relative label for the record. Use `@` for the domain apex.
The address should be an ip address, either a string, or a numeric value obtained via [IP](#IP).
Modifers can be any number of [record modifiers](#record-modifiers) or json objects, which will be merged into the record's metadata.
{% include startExample.html %}
{% highlight js %}
D("example.com", REGISTRAR, DnsProvider("R53"),
A("@", "1.2.3.4"),
A("foo", "2.3.4.5"),
A("test.foo", IP("1.2.3.4"), TTL(5000)),
A("*", "1.2.3.4", {foo: 42})
);
{%endhighlight%}
{% include endExample.html %}

View File

@@ -0,0 +1,28 @@
---
name: AAAA
parameters:
- name
- address
- modifiers...
---
AAAA adds an AAAA record To a domain. The name should be the relative label for the record. Use `@` for the domain apex.
The address should be an ipv6 address as a string.
Modifers can be any number of [record modifiers](#record-modifiers) or json objects, which will be merged into the record's metadata.
{% include startExample.html %}
{% highlight js %}
var addrV6 = "2001:0db8:85a3:0000:0000:8a2e:0370:7334"
D("example.com", REGISTRAR, DnsProvider("R53"),
AAAA("@", addrV6),
AAAA("foo", addrV6),
AAAA("test.foo", addrV6, TTL(5000)),
AAAA("*", addrV6, {foo: 42})
);
{%endhighlight%}
{% include endExample.html %}

View File

@@ -0,0 +1,24 @@
---
name: CNAME
parameters:
- name
- address
- modifiers...
---
CNAME adds a CNAME record to the domain. The name should be the relative label for the domain.
Using `@` or `*` for CNAME records is not recommended, as different providers support them differently.
Adress should be a string representing the CNAME target. If it is a single label we will assume it is a relative name on the current domain. If it contains *any* dots, it should be a fully qualified domain name, ending with a `.`.
{% include startExample.html %}
{% highlight js %}
D("example.com", REGISTRAR, DnsProvider("R53"),
CNAME("foo", "google.com."), // foo.example.com -> google.com
CNAME("abc", "@"), // abc.example.com -> example.com
CNAME("def", "test.subdomain"), // def.example.com -> test.subdomain.example.com
);
{%endhighlight%}
{% include endExample.html %}

View File

@@ -0,0 +1,20 @@
---
name: DefaultTTL
parameters:
- ttl
---
DefaultTTL sets the TTL for all records in a domain that do not explicitly set one with [TTL](#TTL). If neither `DefaultTTl` or `TTL` exist for a record,
it will use the DNSControl global default of 300 seconds.
{% include startExample.html %}
{% highlight js %}
D("example.com", REGISTRAR, DnsProvider("R53"),
DefaultTTL(2000),
A("@","1.2.3.4"), //has default
A("foo", "2.3.4.5", TTL(500)) //overrides default
);
{%endhighlight%}
{% include endExample.html %}

View File

@@ -0,0 +1,21 @@
---
name: DnsProvider
parameters:
- name
- nsCount
---
DnsProvider indicates that the specifid provider should be used to manage
records for this domain. The name must match the name used with [NewDnsProvider](#NewDnsProvider).
The nsCount parameter determines how the nameservers will be managed from this provider.
Leaving the parameter out means "fetch and use all nameservers from this provider as authoritative". ie: `DnsProvider("name")`
Using `0` for nsCount means "do not fetch nameservers from this domain, or give them to the registrar".
Using a different number, ie: `DnsProvider("name",2)`, means "fetch all nameservers from this provider,
but limit it to this many.
See [this page]({{site.github.url}}/nameservers) for a detailed explanation of how DNSControl handles nameservers and NS records.

View File

View File

View File

View File

View File