Use this API to add dnsmxrec.
433290
public static base_response add(nitro_service client, dnsmxrec resource) throws Exception {
		dnsmxrec addresource = new dnsmxrec();
		addresource.domain = resource.domain;
		addresource.mx = resource.mx;
		addresource.pref = resource.pref;
		addresource.ttl = resource.ttl;
		return addresource.add_resource(client);
	}
780682
public static mps_ssl_certkey add(nitro_service client, mps_ssl_certkey resource) throws Exception
	{
		resource.validate("add");
		return ((mps_ssl_certkey[]) resource.perform_operation(client, "add"))[0];
	}
1235541
def _config_win32_add_ifaddr (self, key, name):
        """"""
        try:
            ip, rtype = _winreg.QueryValueEx(key, name)
            if isinstance(ip, basestring) and ip:
                ip = str(ip).lower()
                self.localhosts.add(ip)
                self.interfaces.add(ip)
        except WindowsError:
            pass
547394
public static base_response add(nitro_service client, snmpmanager resource) throws Exception {
		snmpmanager addresource = new snmpmanager();
		addresource.ipaddress = resource.ipaddress;
		addresource.netmask = resource.netmask;
		addresource.domainresolveretry = resource.domainresolveretry;
		return addresource.add_resource(client);
	}
1196229
public static base_responses add(nitro_service client, dnspolicy resources[]) throws Exception {
		base_responses result = null;
		if (resources != null && resources.length > 0) {
			dnspolicy addresources[] = new dnspolicy[resources.length];
			for (int i=0;i<resources.length;i++){
				addresources[i] = new dnspolicy();
				addresources[i].name = resources[i].name;
				addresources[i].rule = resources[i].rule;
				addresources[i].viewname = resources[i].viewname;
				addresources[i].preferredlocation = resources[i].preferredlocation;
				addresources[i].preferredloclist = resources[i].preferredloclist;
				addresources[i].drop = resources[i].drop;
				addresources[i].cachebypass = resources[i].cachebypass;
				addresources[i].actionname = resources[i].actionname;
			}
			result = add_bulk_request(client, addresources);
		}
		return result;
	}
56722
public static ns_ssl_certkey add(nitro_service client, ns_ssl_certkey resource) throws Exception
	{
		resource.validate("add");
		return ((ns_ssl_certkey[]) resource.perform_operation(client, "add"))[0];
	}
41785
public static base_response add(nitro_service client, dnssoarec resource) throws Exception {
		dnssoarec addresource = new dnssoarec();
		addresource.domain = resource.domain;
		addresource.originserver = resource.originserver;
		addresource.contact = resource.contact;
		addresource.serial = resource.serial;
		addresource.refresh = resource.refresh;
		addresource.retry = resource.retry;
		addresource.expire = resource.expire;
		addresource.minimum = resource.minimum;
		addresource.ttl = resource.ttl;
		return addresource.add_resource(client);
	}
995638
public static dnsmxrec[] get(nitro_service service, options option) throws Exception{
		dnsmxrec obj = new dnsmxrec();
		dnsmxrec[] response = (dnsmxrec[])obj.get_resources(service,option);
		return response;
	}
628546
def add_record(cls, fqdn, name, type, value, ttl):
        """"""
        data = {
            "rrset_name": name,
            "rrset_type": type,
            "rrset_values": value,
        }
        if ttl:
            data['rrset_ttl'] = int(ttl)
        meta = cls.get_fqdn_info(fqdn)
        url = meta['domain_records_href']
        return cls.json_post(url, data=json.dumps(data))
804639
def addSSLService(self):
        ""
        https_port = self.options['https_port']
        self.tls_service = HendrixTCPServiceWithTLS(https_port, self.hendrix.site, self.key, self.cert,
                                                    self.context_factory, self.context_factory_kwargs)
        self.tls_service.setServiceParent(self.hendrix)
601083
def addServer(self, normalPort, sslPort, f, name):
        
        tcp = internet.TCPServer(normalPort, f)
        tcp.setName(name)
        self.servers.append(tcp)
        if sslPort is not None:
            ssl = internet.SSLServer(sslPort, f, contextFactory=self.sslfac)
            ssl.setName(name+'s')
            self.servers.append(ssl)
1355933
public static dnsnsecrec[] get(nitro_service service) throws Exception{
		dnsnsecrec obj = new dnsnsecrec();
		dnsnsecrec[] response = (dnsnsecrec[])obj.get_resources(service);
		return response;
	}
1264659
public static base_response add(nitro_service client, dnsaction resource) throws Exception {
		dnsaction addresource = new dnsaction();
		addresource.actionname = resource.actionname;
		addresource.actiontype = resource.actiontype;
		addresource.ipaddress = resource.ipaddress;
		addresource.ttl = resource.ttl;
		addresource.viewname = resource.viewname;
		addresource.preferredloclist = resource.preferredloclist;
		return addresource.add_resource(client);
	}
77296
public static dnsnsrec get(nitro_service service, String domain) throws Exception{
		dnsnsrec obj = new dnsnsrec();
		obj.set_domain(domain);
		dnsnsrec response = (dnsnsrec) obj.get_resource(service);
		return response;
	}
752017
public static dnstxtrec get(nitro_service service, String domain) throws Exception{
		dnstxtrec obj = new dnstxtrec();
		obj.set_domain(domain);
		dnstxtrec response = (dnstxtrec) obj.get_resource(service);
		return response;
	}
733773
public static dnscnamerec get(nitro_service service, String aliasname) throws Exception{
		dnscnamerec obj = new dnscnamerec();
		obj.set_aliasname(aliasname);
		dnscnamerec response = (dnscnamerec) obj.get_resource(service);
		return response;
	}
83086
def dyndns_add(nameserver, name, rdata, type="A", ttl=10):
    
    zone = name[name.find(".") + 1:]
    r = sr1(IP(dst=nameserver) / UDP() / DNS(opcode=5,
                                             qd=[DNSQR(qname=zone, qtype="SOA")],  # noqa: E501
                                             ns=[DNSRR(rrname=name, type="A",
                                                       ttl=ttl, rdata=rdata)]),
            verbose=0, timeout=5)
    if r and r.haslayer(DNS):
        return r.getlayer(DNS).rcode
    else:
        return -1