Use this API to fetch filtered set of lbmetrictable_metric_binding resources.
filter string should be in JSON format.eg: "port:80,servicetype:HTTP".
349147
public static lbmetrictable_metric_binding[] get_filtered(nitro_service service, String metrictable, String filter) throws Exception{
		lbmetrictable_metric_binding obj = new lbmetrictable_metric_binding();
		obj.set_metrictable(metrictable);
		options option = new options();
		option.set_filter(filter);
		lbmetrictable_metric_binding[] response = (lbmetrictable_metric_binding[]) obj.getfiltered(service, option);
		return response;
	}
470503
@Override
  public SortedMap<String, Meter> getMeters(MetricFilter filter) {
    return getSimplyNamedMetrics(Meter.class, Optional.of(filter));
  }
129482
public List<Series> retrieveMetricSeries(String metricName) {
        return retrieveMetricSeries(metricName, Collections.<String, String>emptyMap());
    }
977921
public static base_response delete(nitro_service client, lbmetrictable resource) throws Exception {
		lbmetrictable deleteresource = new lbmetrictable();
		deleteresource.metrictable = resource.metrictable;
		return deleteresource.delete_resource(client);
	}
171907
def query_metric_tags(self, metric_type, metric_id):
        
        definition = self._get(self._get_metrics_tags_url(self._get_metrics_single_url(metric_type, metric_id)))
        return definition
563051
public java.util.List<MetricDataResult> getMetricDataResults() {
        if (metricDataResults == null) {
            metricDataResults = new com.amazonaws.internal.SdkInternalList<MetricDataResult>();
        }
        return metricDataResults;
    }
708373
private String parseWithMetric(final String metric) {
    // TODO: Try to reduce code duplication with Tags.parseWithMetric().
    final int curly = metric.indexOf('{');
    if (curly < 0) {
      clearTags();
      return metric;
    }
    final int len = metric.length();
    if (metric.charAt(len - 1) != '}') {  // "foo{"
      clearTags();
      return null;  // Missing '}' at the end.
    } else if (curly == len - 2) {  // "foo{}"
      clearTags();
      return metric.substring(0, len - 2);
    }
    final int num_tags_before = getNumTags();
    
    final List<Filter> filters = new ArrayList<Filter>();
    final int close = metric.indexOf('}');
    int i = 0;
    if (close != metric.length() - 1) { // "foo{...}{tagk=filter}" 
      final int filter_bracket = metric.lastIndexOf('{');
      for (final String filter : metric.substring(filter_bracket + 1, 
          metric.length() - 1).split(",")) {
        if (filter.isEmpty()) {
          break;
        }
        final String[] kv = filter.split("=");
        if (kv.length != 2 || kv[0].isEmpty() || kv[1].isEmpty()) {
          continue;  // Invalid tag.
        }
        final Filter f = new Filter();
        f.tagk = kv[0];
        f.tagv = kv[1];
        f.is_groupby = false;
        filters.add(f);
        i++;  
      }
    }
    
    i = 0;
    for (final String tag : metric.substring(curly + 1, close).split(",")) {
      if (tag.isEmpty() && close != metric.length() - 1){
        break;
      }
      final String[] kv = tag.split("=");
      if (kv.length != 2 || kv[0].isEmpty() || kv[1].isEmpty()) {
        continue;  // Invalid tag.
      }
      final Filter f = new Filter();
      f.tagk = kv[0];
      f.tagv = kv[1];
      f.is_groupby = true;
      filters.add(f);
      i++;
    }
    if (!filters.isEmpty()) {
      Collections.sort(filters);
    }
    
    i = 0;
    for (int x = filters.size() - 1; x >= 0; x--) {
      final Filter filter = filters.get(x);
      if (i < num_tags_before) {
        setTag(i++, filter.tagk, filter.tagv, filter.is_groupby);
      } else {
        addTag(filter.tagk, filter.tagv, filter.is_groupby);
      }
    }
    
    if (i < num_tags_before) {
      setTag(i, "", "", true);
    } else {
      addTag();
    }
    // Remove extra tags.
    for (i++; i < num_tags_before; i++) {
      tagtable.removeRow(i + 1);
    }
    // Return the "foo" part of "foo{a=b,...,x=y}"
    return metric.substring(0, curly);
    
    /*
    // substring the tags out of "foo{a=b,...,x=y}" and parse them.
    int i = 0;  // Tag index.
    final int num_tags_before = getNumTags();
    for (final String tag : metric.substring(curly + 1, len - 1).split(",")) {
      final String[] kv = tag.split("=");
      if (kv.length != 2 || kv[0].isEmpty() || kv[1].isEmpty()) {
        setTag(i, "", "", true);
        continue;  // Invalid tag.
      }
      if (i < num_tags_before) {
        setTag(i, kv[0], kv[1], true);
      } else {
        addTag(kv[0], kv[1]);
      }
      i++;
    }
    // Leave an empty line at the end.
    if (i < num_tags_before) {
      setTag(i, "", "", true);
    } else {
      addTag();
    }
    // Remove extra tags.
    for (i++; i < num_tags_before; i++) {
      tagtable.removeRow(i + 1);
    }
    // Return the "foo" part of "foo{a=b,...,x=y}"
    return metric.substring(0, curly); */
  }
620580
public static lbwlm[] get_filtered(nitro_service service, String filter) throws Exception{
		lbwlm obj = new lbwlm();
		options option = new options();
		option.set_filter(filter);
		lbwlm[] response = (lbwlm[]) obj.getfiltered(service, option);
		return response;
	}
759608
public MetricFilter metricsFilter() {
        if (id() == null) {
            return (name, metric) -> false;
        }
        return new MetricUtils.SingleMetricFilter(metricName);

    }
937239
@Override
  public SortedMap<String, Gauge> getGauges(MetricFilter filter) {
    return this.innerMetricContext.getGauges(filter);
  }
328467
public static long count(nitro_service service, String metrictable) throws Exception{
		lbmetrictable_metric_binding obj = new lbmetrictable_metric_binding();
		obj.set_metrictable(metrictable);
		options option = new options();
		option.set_count(true);
		lbmetrictable_metric_binding response[] = (lbmetrictable_metric_binding[]) obj.get_resources(service,option);
		if (response != null) {
			return response[0].__count;
		}
		return 0;
	}
409193
@Override
    public SortedMap<String, Histogram> getHistograms(MetricFilter filter) {
        return getMetrics(Histogram.class, filter);
    }
518745
public static base_responses add(nitro_service client, lbmetrictable resources[]) throws Exception {
		base_responses result = null;
		if (resources != null && resources.length > 0) {
			lbmetrictable addresources[] = new lbmetrictable[resources.length];
			for (int i=0;i<resources.length;i++){
				addresources[i] = new lbmetrictable();
				addresources[i].metrictable = resources[i].metrictable;
			}
			result = add_bulk_request(client, addresources);
		}
		return result;
	}
266599
def _match_metric(self, metric):
        
        if len(self._compiled_filters) == 0:
            return True
        for (collector, filter_regex) in self._compiled_filters:
            if collector != metric.getCollectorPath():
                continue
            if filter_regex.match(metric.getMetricPath()):
                return True
        return False
55818
private Map<String, String> getMetricFilterParameters( MetricFilterOptions options ) {
        if( options == null ) {
            return null;
        }

        Map<String, String> parameters = new HashMap<String, String>();

        AWSCloud.addValueIfNotNull(parameters, "MetricName", options.getMetricName());
        AWSCloud.addValueIfNotNull(parameters, "Namespace", options.getMetricNamespace());
        AWSCloud.addIndexedParameters(parameters, "Dimensions.member.", options.getMetricMetadata());

        if( parameters.size() == 0 ) {
            return null;
        }

        return parameters;
    }
282281
public static base_response update(nitro_service client, lbmetrictable resource) throws Exception {
		lbmetrictable updateresource = new lbmetrictable();
		updateresource.metrictable = resource.metrictable;
		updateresource.metric = resource.metric;
		updateresource.Snmpoid = resource.Snmpoid;
		return updateresource.update_resource(client);
	}
849598
@Override
  public SortedMap<String, Meter> getMeters(MetricFilter filter) {
    return this.innerMetricContext.getMeters(filter);
  }