Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save sudorandom/6257522 to your computer and use it in GitHub Desktop.
Save sudorandom/6257522 to your computer and use it in GitHub Desktop.
import SoftLayer
from pprint import pprint as pp
apiUsername = ''
apiKey = ''
client = SoftLayer.Client(username=apiUsername, api_key=apiKey)
records = [
{
'host': '@',
'data': 'ns1.philexampleone.com',
'responsiblePerson': 'admin.philexampleone.com',
'expire': 604800,
'referesh': 3600,
'retry': 300,
'minimum': 3600,
'type': 'SOA'
},
{
'data': '127.0.0.1',
'host': '@',
'type': 'a'
}
]
domain = {
'name': 'philexampleone.com',
'resourceRecords': records
}
result = client['Dns_Domain'].createObject(domain)
pp(result)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment