DNS Management
dns import
Import zone based off a BIND zone file.
- Example::
slcli dns import ~/ibm.com.txt This command imports zone and its resource records from file: ~/ibm.com.txt
dns import [OPTIONS] ZONEFILE
Options
- --dry-run
Don’t actually create records
Arguments
- ZONEFILE
Required argument
dns record-add
Add resource record.
Each resource record contains a RECORD and DATA property, defining a resource’s name and it’s target data. Domains contain multiple types of resource records so it can take one of the following values: A, AAAA, CNAME, MX, SPF, SRV, and PTR.
About reverse records (PTR), the RECORD value must to be the public Ip Address of device you would like to manage reverse DNS.
slcli dns record-add 10.10.8.21 PTR myhost.com –ttl=900
Examples:
slcli dns record-add myhost.com A 192.168.1.10 –zone=foobar.com –ttl=900
slcli dns record-add myhost.com AAAA 2001:DB8::1 –zone=foobar.com
slcli dns record-add 192.168.1.2 MX 192.168.1.10 –zone=foobar.com –priority=11 –ttl=1800
slcli dns record-add myhost.com TXT “txt-verification=rXOxyZounZs87oacJSKvbUSIQ” –zone=2223334
slcli dns record-add myhost.com SPF “v=spf1 include:_spf.google.com ~all” –zone=2223334
slcli dns record-add myhost.com SRV 192.168.1.10 –zone=2223334 –service=foobar –port=80 –protocol=TCP
dns record-add [OPTIONS] RECORD RECORD_TYPE DATA
Options
- --zone <zone>
Zone name or identifier that the resource record will be associated with. Required for all record types except PTR
- --ttl <ttl>
TTL value in seconds, such as 86400
- Default:
900
- --priority <priority>
The priority of the target host. (MX or SRV type only)
- Default:
10
- --protocol <protocol>
The protocol of the service, usually either TCP or UDP. (SRV type only)
- Default:
tcp
- Options:
tcp | udp | tls
- --port <port>
The TCP/UDP/TLS port on which the service is to be found. (SRV type only)
- --service <service>
The symbolic name of the desired service. (SRV type only)
- --weight <weight>
Relative weight for records with same priority. (SRV type only)
- Default:
5
Arguments
- RECORD
Required argument
- RECORD_TYPE
Required argument
- DATA
Required argument
dns record-edit
Update DNS record.
- Example::
slcli dns record-edit ibm.com –by-id 12345678 –data 127.0.0.2 –ttl 3600 This command edits records under the zone: ibm.com, whose ID is 12345678, and sets its data to “127.0.0.2” and ttl to 3600.
slcli dns record-edit ibm.com –by-record kibana –ttl 3600 This command edits records under the zone: ibm.com, whose host is “kibana”, and sets their ttl all to 3600.
dns record-edit [OPTIONS] ZONE_ID
Options
- --by-record <by_record>
Edit by host record, such as www
- --by-id <by_id>
Edit a single record by its ID
- --data <data>
Record data, such as an IP address
- --ttl <ttl>
TTL value in seconds, such as 86400
Arguments
- ZONE_ID
Required argument
dns record-list
List all records in a zone.
- Example::
slcli dns record-list ibm.com –record elasticsearch –type A –ttl 900 This command lists all A records under the zone: ibm.com, and filters by host is elasticsearch and ttl is 900 seconds.
dns record-list [OPTIONS] ZONE
Options
- --data <data>
Record data, such as an IP address
- --record <record>
Host record, such as www
- --ttl <ttl>
TTL value in seconds, such as 86400
- --type <record_type>
Record type, such as A or CNAME
Arguments
- ZONE
Required argument
dns record-remove
Remove resource record.
- Example::
slcli dns record-remove 12345678 This command removes resource record with ID 12345678.
dns record-remove [OPTIONS] RECORD_ID
Arguments
- RECORD_ID
Required argument
dns zone-create
Create a zone.
- Example::
slcli dns zone-create ibm.com This command creates a zone that is named ibm.com.
dns zone-create [OPTIONS] ZONE
Arguments
- ZONE
Required argument
dns zone-delete
Delete zone.
- Example::
slcli dns zone-delete ibm.com This command deletes a zone that is named ibm.com
dns zone-delete [OPTIONS] ZONE
Arguments
- ZONE
Required argument
dns zone-list
List all zones.
- Example::
slcli dns zone-list This command lists all zones under current account.
dns zone-list [OPTIONS]
dns zone-print
Print zone in BIND format.
- Example::
slcli dns zone-print ibm.com This command prints zone that is named ibm.com, and in BIND format.
dns zone-print [OPTIONS] ZONE
Arguments
- ZONE
Required argument