mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-10-25 05:27:26 +08:00
Co-authored-by: Jeffrey Cafferata <jeffrey@jcid.nl> Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
1.6 KiB
1.6 KiB
| name | parameters | parameter_types | return | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| NewDnsProvider |
|
|
string |
NewDnsProvider activates a DNS Service Provider (DSP) specified in creds.json.
A DSP stores a DNS zone's records and provides DNS service for the zone (i.e.
answers on port 53 to queries related to the zone).
namemust match the name of an entry increds.json.typespecifies a valid DNS provider type identifier listed on the provider page.- Starting with v3.16, the type is optional. If it is absent, the
TYPEfield increds.jsonis used instead. You can leave it out. (Thanks to JavaScript magic, you can leave it out even when there are more fields). - Starting with v4.0, specifying the type may be an error. Please add the
TYPEfield tocreds.jsonand remove this parameter fromdnsconfig.jsto prepare.
- Starting with v3.16, the type is optional. If it is absent, the
metais a way to send additional parameters to the provider. It is optional and only certain providers use it. See the individual provider docs for details.
This function will return an opaque string that should be assigned to a variable name for use in D directives.
Prior to v3.16:
var REG_MYNDC = NewRegistrar("mynamedotcom", "NAMEDOTCOM");
var DNS_MYAWS = NewDnsProvider("myaws", "ROUTE53");
D("example.com", REG_MYNDC, DnsProvider(DNS_MYAWS),
A("@","1.2.3.4")
);
In v3.16 and later:
var REG_MYNDC = NewRegistrar("mynamedotcom");
var DNS_MYAWS = NewDnsProvider("myaws");
D("example.com", REG_MYNDC, DnsProvider(DNS_MYAWS),
A("@","1.2.3.4")
);