code: public static dnskey get(nitro_service service, String keyname) throws Exception{
  		dnskey obj = new dnskey();
  		obj.set_keyname(keyname);
  		dnskey response = (dnskey) obj.get_resource(service);
  		return response;
  	}
docs: Use this API to fetch dnskey resource of given name .