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