public class MetricFilter
extends java.lang.Object
implements java.io.Serializable, java.lang.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.
Modifier and Type | Field and Description |
---|---|
private java.lang.Long |
creationTime |
private java.lang.String |
filterName |
private java.lang.String |
filterPattern |
private SdkInternalList<MetricTransformation> |
metricTransformations |
Constructor and Description |
---|
MetricFilter() |
Modifier and Type | Method and Description |
---|---|
MetricFilter |
clone() |
boolean |
equals(java.lang.Object obj) |
java.lang.Long |
getCreationTime() |
java.lang.String |
getFilterName() |
java.lang.String |
getFilterPattern() |
java.util.List<MetricTransformation> |
getMetricTransformations() |
int |
hashCode() |
void |
setCreationTime(java.lang.Long creationTime) |
void |
setFilterName(java.lang.String filterName) |
void |
setFilterPattern(java.lang.String filterPattern) |
void |
setMetricTransformations(java.util.Collection<MetricTransformation> metricTransformations) |
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
MetricFilter |
withCreationTime(java.lang.Long creationTime) |
MetricFilter |
withFilterName(java.lang.String filterName) |
MetricFilter |
withFilterPattern(java.lang.String filterPattern) |
MetricFilter |
withMetricTransformations(java.util.Collection<MetricTransformation> metricTransformations) |
MetricFilter |
withMetricTransformations(MetricTransformation... metricTransformations)
NOTE: This method appends the values to the existing list (if
any).
|
private java.lang.String filterName
private java.lang.String filterPattern
private SdkInternalList<MetricTransformation> metricTransformations
private java.lang.Long creationTime
public void setFilterName(java.lang.String filterName)
filterName
- public java.lang.String getFilterName()
public MetricFilter withFilterName(java.lang.String filterName)
filterName
- public void setFilterPattern(java.lang.String filterPattern)
filterPattern
- public java.lang.String getFilterPattern()
public MetricFilter withFilterPattern(java.lang.String filterPattern)
filterPattern
- public java.util.List<MetricTransformation> getMetricTransformations()
public void setMetricTransformations(java.util.Collection<MetricTransformation> metricTransformations)
metricTransformations
- public MetricFilter withMetricTransformations(MetricTransformation... metricTransformations)
NOTE: This method appends the values to the existing list (if
any). Use setMetricTransformations(java.util.Collection)
or
withMetricTransformations(java.util.Collection)
if you want to
override the existing values.
metricTransformations
- public MetricFilter withMetricTransformations(java.util.Collection<MetricTransformation> metricTransformations)
metricTransformations
- public void setCreationTime(java.lang.Long creationTime)
creationTime
- public java.lang.Long getCreationTime()
public MetricFilter withCreationTime(java.lang.Long creationTime)
creationTime
- public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public MetricFilter clone()
clone
in class java.lang.Object