'Create a new record.
API docs: http://www.linode.com/api/dns/domain.resource.create'

def create_record(self, name, zone, type, data, extra=None):

    params = {'api_action': 'domain.resource.create', 'DomainID': zone.id, 'Name': name, 'Target': data, 'Type': self.RECORD_TYPE_MAP[type]}
    merged = merge_valid_keys(params=params, valid_keys=VALID_RECORD_EXTRA_PARAMS, extra=extra)
    result = self.connection.request(API_ROOT, params=params).objects[0]
    record = Record(id=result['ResourceID'], name=name, type=type, data=data, extra=merged, zone=zone, driver=self, ttl=merged.get('TTL_sec', None))
    return record
