public class PutMetricFilterRequest extends AmazonWebServiceRequest implements Serializable, Cloneable
PutMetricFilter operation.
Creates or updates a metric filter and associates it with the
specified log group. Metric filters allow you to configure rules to
extract metric data from log events ingested through
PutLogEvents requests.
The maximum number of metric filters that can be associated with a log group is 100.
NOOP| Constructor and Description |
|---|
PutMetricFilterRequest()
Default constructor for a new PutMetricFilterRequest object.
|
PutMetricFilterRequest(String logGroupName,
String filterName,
String filterPattern,
List<MetricTransformation> metricTransformations)
Constructs a new PutMetricFilterRequest object.
|
| Modifier and Type | Method and Description |
|---|---|
PutMetricFilterRequest |
clone() |
boolean |
equals(Object obj) |
String |
getFilterName()
A name for the metric filter.
|
String |
getFilterPattern()
A valid CloudWatch Logs filter pattern for extracting metric data out
of ingested log events.
|
String |
getLogGroupName()
The name of the log group to associate the metric filter with.
|
List<MetricTransformation> |
getMetricTransformations()
A collection of information needed to define how metric data gets
emitted.
|
int |
hashCode() |
void |
setFilterName(String filterName)
A name for the metric filter.
|
void |
setFilterPattern(String filterPattern)
A valid CloudWatch Logs filter pattern for extracting metric data out
of ingested log events.
|
void |
setLogGroupName(String logGroupName)
The name of the log group to associate the metric filter with.
|
void |
setMetricTransformations(Collection<MetricTransformation> metricTransformations)
A collection of information needed to define how metric data gets
emitted.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
PutMetricFilterRequest |
withFilterName(String filterName)
A name for the metric filter.
|
PutMetricFilterRequest |
withFilterPattern(String filterPattern)
A valid CloudWatch Logs filter pattern for extracting metric data out
of ingested log events.
|
PutMetricFilterRequest |
withLogGroupName(String logGroupName)
The name of the log group to associate the metric filter with.
|
PutMetricFilterRequest |
withMetricTransformations(Collection<MetricTransformation> metricTransformations)
A collection of information needed to define how metric data gets
emitted.
|
PutMetricFilterRequest |
withMetricTransformations(MetricTransformation... metricTransformations)
A collection of information needed to define how metric data gets
emitted.
|
copyBaseTo, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollectorpublic PutMetricFilterRequest()
public PutMetricFilterRequest(String logGroupName, String filterName, String filterPattern, List<MetricTransformation> metricTransformations)
logGroupName - The name of the log group to associate the metric
filter with.filterName - A name for the metric filter.filterPattern - A valid CloudWatch Logs filter pattern for
extracting metric data out of ingested log events.metricTransformations - A collection of information needed to
define how metric data gets emitted.public String getLogGroupName()
Constraints:
Length: 1 - 512
Pattern: [\.\-_/#A-Za-z0-9]+
public void setLogGroupName(String logGroupName)
Constraints:
Length: 1 - 512
Pattern: [\.\-_/#A-Za-z0-9]+
logGroupName - The name of the log group to associate the metric filter with.public PutMetricFilterRequest withLogGroupName(String logGroupName)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 512
Pattern: [\.\-_/#A-Za-z0-9]+
logGroupName - The name of the log group to associate the metric filter with.public String getFilterName()
Constraints:
Length: 1 - 512
Pattern: [^:*]*
public void setFilterName(String filterName)
Constraints:
Length: 1 - 512
Pattern: [^:*]*
filterName - A name for the metric filter.public PutMetricFilterRequest 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 the metric filter.public String getFilterPattern()
Constraints:
Length: 0 - 512
public void setFilterPattern(String filterPattern)
Constraints:
Length: 0 - 512
filterPattern - A valid CloudWatch Logs filter pattern for extracting metric data out
of ingested log events.public PutMetricFilterRequest withFilterPattern(String filterPattern)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 0 - 512
filterPattern - A valid CloudWatch Logs filter pattern for extracting metric data out
of ingested log events.public List<MetricTransformation> getMetricTransformations()
Constraints:
Length: 1 - 1
public void setMetricTransformations(Collection<MetricTransformation> metricTransformations)
Constraints:
Length: 1 - 1
metricTransformations - A collection of information needed to define how metric data gets
emitted.public PutMetricFilterRequest 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 - A collection of information needed to define how metric data gets
emitted.public PutMetricFilterRequest withMetricTransformations(Collection<MetricTransformation> metricTransformations)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 1
metricTransformations - A collection of information needed to define how metric data gets
emitted.public String toString()
toString in class ObjectObject.toString()public PutMetricFilterRequest clone()
clone in class AmazonWebServiceRequestCopyright © 2015. All rights reserved.