public class MetricFilter extends Object implements Serializable, Cloneable
Metric filters can be used to express how Amazon CloudWatch Logs would extract metric observations from ingested log events and transform them to metric data in a CloudWatch metric.
| Constructor and Description |
|---|
MetricFilter() |
| Modifier and Type | Method and Description |
|---|---|
MetricFilter |
clone() |
boolean |
equals(Object obj) |
Long |
getCreationTime()
A point in time expressed as the number of milliseconds since Jan 1,
1970 00:00:00 UTC.
|
String |
getFilterName()
A name for a metric or subscription filter.
|
String |
getFilterPattern()
A symbolic description of how Amazon CloudWatch Logs should interpret
the data in each log event.
|
List<MetricTransformation> |
getMetricTransformations()
Returns the value of the MetricTransformations property for this
object.
|
int |
hashCode() |
void |
setCreationTime(Long creationTime)
A point in time expressed as the number of milliseconds since Jan 1,
1970 00:00:00 UTC.
|
void |
setFilterName(String filterName)
A name for a metric or subscription filter.
|
void |
setFilterPattern(String filterPattern)
A symbolic description of how Amazon CloudWatch Logs should interpret
the data in each log event.
|
void |
setMetricTransformations(Collection<MetricTransformation> metricTransformations)
Sets the value of the MetricTransformations property for this object.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
MetricFilter |
withCreationTime(Long creationTime)
A point in time expressed as the number of milliseconds since Jan 1,
1970 00:00:00 UTC.
|
MetricFilter |
withFilterName(String filterName)
A name for a metric or subscription filter.
|
MetricFilter |
withFilterPattern(String filterPattern)
A symbolic description of how Amazon CloudWatch Logs should interpret
the data in each log event.
|
MetricFilter |
withMetricTransformations(Collection<MetricTransformation> metricTransformations)
Sets the value of the MetricTransformations property for this object.
|
MetricFilter |
withMetricTransformations(MetricTransformation... metricTransformations)
Sets the value of the MetricTransformations property for this object.
|
public String getFilterName()
Constraints:
Length: 1 - 512
Pattern: [^:*]*
public void setFilterName(String filterName)
Constraints:
Length: 1 - 512
Pattern: [^:*]*
filterName - A name for a metric or subscription filter.public MetricFilter withFilterName(String filterName)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 512
Pattern: [^:*]*
filterName - A name for a metric or subscription filter.public String getFilterPattern()
Constraints:
Length: 0 - 512
public void setFilterPattern(String filterPattern)
Constraints:
Length: 0 - 512
filterPattern - A symbolic description of how Amazon CloudWatch Logs should interpret
the data in each log event. For example, a log event may contain
timestamps, IP addresses, strings, and so on. You use the filter
pattern to specify what to look for in the log event message.public MetricFilter withFilterPattern(String filterPattern)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 0 - 512
filterPattern - A symbolic description of how Amazon CloudWatch Logs should interpret
the data in each log event. For example, a log event may contain
timestamps, IP addresses, strings, and so on. You use the filter
pattern to specify what to look for in the log event message.public List<MetricTransformation> getMetricTransformations()
Constraints:
Length: 1 - 1
public void setMetricTransformations(Collection<MetricTransformation> metricTransformations)
Constraints:
Length: 1 - 1
metricTransformations - The new value for the MetricTransformations property for this object.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.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 1
metricTransformations - The new value for the MetricTransformations property for this object.public MetricFilter withMetricTransformations(Collection<MetricTransformation> metricTransformations)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 1
metricTransformations - The new value for the MetricTransformations property for this object.public Long getCreationTime()
Constraints:
Range: 0 -
public void setCreationTime(Long creationTime)
Constraints:
Range: 0 -
creationTime - A point in time expressed as the number of milliseconds since Jan 1,
1970 00:00:00 UTC.public MetricFilter withCreationTime(Long creationTime)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Range: 0 -
creationTime - A point in time expressed as the number of milliseconds since Jan 1,
1970 00:00:00 UTC.public String toString()
toString in class ObjectObject.toString()public MetricFilter clone()
Copyright © 2015. All rights reserved.