Class MetricFilter
- java.lang.Object
-
- com.amazonaws.services.logs.model.MetricFilter
-
- All Implemented Interfaces:
Serializable
,Cloneable
public class MetricFilter extends Object implements Serializable, Cloneable
Metric filters can be used to express how CloudWatch Logs would extract metric observations from ingested log events and transform them to metric data in a CloudWatch metric.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MetricFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MetricFilter
clone()
boolean
equals(Object obj)
Long
getCreationTime()
String
getFilterName()
String
getFilterPattern()
List<MetricTransformation>
getMetricTransformations()
int
hashCode()
void
setCreationTime(Long creationTime)
void
setFilterName(String filterName)
void
setFilterPattern(String filterPattern)
void
setMetricTransformations(Collection<MetricTransformation> metricTransformations)
String
toString()
Returns a string representation of this object; useful for testing and debugging.MetricFilter
withCreationTime(Long creationTime)
MetricFilter
withFilterName(String filterName)
MetricFilter
withFilterPattern(String filterPattern)
MetricFilter
withMetricTransformations(MetricTransformation... metricTransformations)
NOTE: This method appends the values to the existing list (if any).MetricFilter
withMetricTransformations(Collection<MetricTransformation> metricTransformations)
-
-
-
Method Detail
-
setFilterName
public void setFilterName(String filterName)
- Parameters:
filterName
-
-
getFilterName
public String getFilterName()
- Returns:
-
withFilterName
public MetricFilter withFilterName(String filterName)
- Parameters:
filterName
-- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setFilterPattern
public void setFilterPattern(String filterPattern)
- Parameters:
filterPattern
-
-
getFilterPattern
public String getFilterPattern()
- Returns:
-
withFilterPattern
public MetricFilter withFilterPattern(String filterPattern)
- Parameters:
filterPattern
-- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getMetricTransformations
public List<MetricTransformation> getMetricTransformations()
- Returns:
-
setMetricTransformations
public void setMetricTransformations(Collection<MetricTransformation> metricTransformations)
- Parameters:
metricTransformations
-
-
withMetricTransformations
public MetricFilter withMetricTransformations(MetricTransformation... metricTransformations)
NOTE: This method appends the values to the existing list (if any). Use
setMetricTransformations(java.util.Collection)
orwithMetricTransformations(java.util.Collection)
if you want to override the existing values.- Parameters:
metricTransformations
-- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withMetricTransformations
public MetricFilter withMetricTransformations(Collection<MetricTransformation> metricTransformations)
- Parameters:
metricTransformations
-- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setCreationTime
public void setCreationTime(Long creationTime)
- Parameters:
creationTime
-
-
getCreationTime
public Long getCreationTime()
- Returns:
-
withCreationTime
public MetricFilter withCreationTime(Long creationTime)
- Parameters:
creationTime
-- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
public String toString()
Returns a string representation of this object; useful for testing and debugging.- Overrides:
toString
in classObject
- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
clone
public MetricFilter clone()
-
-