Skip to content

Instantly share code, notes, and snippets.

@underscorephil
Last active December 9, 2015 21:28
Show Gist options
  • Save underscorephil/4330747 to your computer and use it in GitHub Desktop.
Save underscorephil/4330747 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)
@fernandes
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment