Class: AwsCloudwatchLogMetricFilter::Backend::AwsClientApi

Inherits:
AwsBackendBase
  • Object
show all
Defined in:
lib/resources/aws/aws_cloudwatch_log_metric_filter.rb

Overview

Uses the cloudwatch API to really talk to AWS

Instance Attribute Summary

Attributes inherited from AwsBackendBase

#aws_transport

Instance Method Summary collapse

Methods inherited from AwsBackendBase

#aws_service_client, #initialize

Constructor Details

This class inherits a constructor from AwsBackendBase

Instance Method Details

#describe_metric_filters(criteria) ⇒ Object



88
89
90
91
92
93
94
95
96
97
# File 'lib/resources/aws/aws_cloudwatch_log_metric_filter.rb', line 88

def describe_metric_filters(criteria)
  query = {}
  query[:filter_name_prefix] = criteria[:filter_name] if criteria[:filter_name]
  query[:log_group_name] = criteria[:log_group_name] if criteria[:log_group_name]
  # 'pattern' is not available as a remote filter,
  # we filter it after the fact locally
  # TODO: handle pagination?  Max 50/page.  Maybe you want a plural resource?
  aws_response = aws_service_client.describe_metric_filters(query)
  aws_response.metric_filters
end