namecheap_domains_ns
¶
Namecheap Nameserver Management
Added in version 2017.7.0.
Prerequisites¶
This module uses the requests
Python module to communicate to the namecheap
API.
Configuration¶
The Namecheap username, API key and URL should be set in the minion configuration file, or in the Pillar data.
namecheap.name: companyname
namecheap.key: a1b2c3d4e5f67a8b9c0d1e2f3
namecheap.client_ip: 162.155.30.172
#Real url
namecheap.url: https://api.namecheap.com/xml.response
#Sandbox url
#namecheap.url: https://api.sandbox.namecheap.xml.response
- saltext.namecheap.modules.namecheap_domains_ns.__virtual__()[source]¶
Check to make sure requests and xml are installed and requests
- saltext.namecheap.modules.namecheap_domains_ns.get_info(sld, tld, nameserver)[source]¶
Retrieves information about a registered nameserver. Returns the following information:
IP Address set for the nameserver
Domain name which was queried
A list of nameservers and their statuses
- sld
SLD of the domain name
- tld
TLD of the domain name
- nameserver
Nameserver to retrieve
CLI Example:
salt '*' namecheap_domains_ns.get_info sld tld nameserver
- saltext.namecheap.modules.namecheap_domains_ns.update(sld, tld, nameserver, old_ip, new_ip)[source]¶
Deletes a nameserver. Returns
True
if the nameserver was updated successfully.- sld
SLD of the domain name
- tld
TLD of the domain name
- nameserver
Nameserver to create
- old_ip
Current ip address
- new_ip
New ip address
CLI Example:
salt '*' namecheap_domains_ns.update sld tld nameserver old_ip new_ip
- saltext.namecheap.modules.namecheap_domains_ns.delete(sld, tld, nameserver)[source]¶
Deletes a nameserver. Returns
True
if the nameserver was deleted successfully- sld
SLD of the domain name
- tld
TLD of the domain name
- nameserver
Nameserver to delete
CLI Example:
salt '*' namecheap_domains_ns.delete sld tld nameserver
- saltext.namecheap.modules.namecheap_domains_ns.create(sld, tld, nameserver, ip)[source]¶
Creates a new nameserver. Returns
True
if the nameserver was created successfully.- sld
SLD of the domain name
- tld
TLD of the domain name
- nameserver
Nameserver to create
- ip
Nameserver IP address
CLI Example:
salt '*' namecheap_domains_ns.create sld tld nameserver ip