github.com/philhug/dnscontrol@v0.2.4-0.20180625181521-921fa9849001/docs/_providers/softlayer.md (about)

     1  ---
     2  name: SoftLayer DNS
     3  title: SoftLayer DNS Provider
     4  layout: default
     5  jsId: SOFTLAYER
     6  ---
     7  
     8  # SoftLayer DNS Provider
     9  
    10  ## Configuration
    11  To authenticate with SoftLayer requires at least a `username` and `api_key` for authentication. It can also optionally take a `timeout` and `endpoint_url` parameter however these are optional and will use standard defaults if not provided.
    12  
    13  These can be supplied in the `creds.json` file:
    14  {% highlight json %}
    15  {
    16    "softlayer": {
    17      "username": "myusername",
    18      "api_key": "mysecretapikey"
    19    }
    20  }
    21  {% endhighlight %}
    22  
    23  To maintain compatibility with existing softlayer CLI services these can also be provided by the `SL_USERNAME` and `SL_API_KEY` environment variables or specified in the `~/.softlayer`, but this is discouraged. More information about these methods can be found at [the softlayer-go library documentation](https://github.com/softlayer/softlayer-go#sessions).
    24  
    25  ## Usage
    26  Use this provider like any other DNS Provider:
    27  
    28  {% highlight js %}
    29  var REG_NONE = NewRegistrar("none","NONE"); // no registrar
    30  var SOFTLAYER = NewDnsProvider("softlayer", "SOFTLAYER");
    31  
    32  D("example.tld", registrary, DnsProvider(SOFTLAYER),
    33      A("test","1.2.3.4")
    34  );
    35  {%endhighlight%}
    36  
    37  ## Metadata
    38  This provider does not recognize any special metadata fields unique to SoftLayer dns.
    39  For compatibility with the pre-generated NAMESERVER fields it's recommended to set the NS TTL to 86400 such as:
    40  
    41  {% highlight js %}
    42  D("example.tld", REG_NONE, DnsProvider(SOFTLAYER),
    43      {"ns_ttl": "86400"},
    44  
    45      A("test","1.2.3.4")
    46  );
    47  {%endhighlight%}
    48  
    49  `ns_ttl` is a standard metadata field that applies to all providers.