@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class MetricTransformation extends Object implements Serializable, Cloneable, StructuredPojo
Indicates how to transform ingested log events to metric data in a CloudWatch metric.
Constructor and Description |
---|
MetricTransformation() |
Modifier and Type | Method and Description |
---|---|
MetricTransformation |
addDimensionsEntry(String key,
String value)
Add a single Dimensions entry
|
MetricTransformation |
clearDimensionsEntries()
Removes all the entries added into Dimensions.
|
MetricTransformation |
clone() |
boolean |
equals(Object obj) |
Double |
getDefaultValue()
(Optional) The value to emit when a filter pattern does not match a log event.
|
Map<String,String> |
getDimensions()
The fields to use as dimensions for the metric.
|
String |
getMetricName()
The name of the CloudWatch metric.
|
String |
getMetricNamespace()
A custom namespace to contain your metric in CloudWatch.
|
String |
getMetricValue()
The value to publish to the CloudWatch metric when a filter pattern matches a log event.
|
String |
getUnit()
The unit to assign to the metric.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setDefaultValue(Double defaultValue)
(Optional) The value to emit when a filter pattern does not match a log event.
|
void |
setDimensions(Map<String,String> dimensions)
The fields to use as dimensions for the metric.
|
void |
setMetricName(String metricName)
The name of the CloudWatch metric.
|
void |
setMetricNamespace(String metricNamespace)
A custom namespace to contain your metric in CloudWatch.
|
void |
setMetricValue(String metricValue)
The value to publish to the CloudWatch metric when a filter pattern matches a log event.
|
void |
setUnit(String unit)
The unit to assign to the metric.
|
String |
toString()
Returns a string representation of this object.
|
MetricTransformation |
withDefaultValue(Double defaultValue)
(Optional) The value to emit when a filter pattern does not match a log event.
|
MetricTransformation |
withDimensions(Map<String,String> dimensions)
The fields to use as dimensions for the metric.
|
MetricTransformation |
withMetricName(String metricName)
The name of the CloudWatch metric.
|
MetricTransformation |
withMetricNamespace(String metricNamespace)
A custom namespace to contain your metric in CloudWatch.
|
MetricTransformation |
withMetricValue(String metricValue)
The value to publish to the CloudWatch metric when a filter pattern matches a log event.
|
MetricTransformation |
withUnit(StandardUnit unit)
The unit to assign to the metric.
|
MetricTransformation |
withUnit(String unit)
The unit to assign to the metric.
|
public void setMetricName(String metricName)
The name of the CloudWatch metric.
metricName
- The name of the CloudWatch metric.public String getMetricName()
The name of the CloudWatch metric.
public MetricTransformation withMetricName(String metricName)
The name of the CloudWatch metric.
metricName
- The name of the CloudWatch metric.public void setMetricNamespace(String metricNamespace)
A custom namespace to contain your metric in CloudWatch. Use namespaces to group together metrics that are similar. For more information, see Namespaces.
metricNamespace
- A custom namespace to contain your metric in CloudWatch. Use namespaces to group together metrics that are
similar. For more information, see Namespaces.public String getMetricNamespace()
A custom namespace to contain your metric in CloudWatch. Use namespaces to group together metrics that are similar. For more information, see Namespaces.
public MetricTransformation withMetricNamespace(String metricNamespace)
A custom namespace to contain your metric in CloudWatch. Use namespaces to group together metrics that are similar. For more information, see Namespaces.
metricNamespace
- A custom namespace to contain your metric in CloudWatch. Use namespaces to group together metrics that are
similar. For more information, see Namespaces.public void setMetricValue(String metricValue)
The value to publish to the CloudWatch metric when a filter pattern matches a log event.
metricValue
- The value to publish to the CloudWatch metric when a filter pattern matches a log event.public String getMetricValue()
The value to publish to the CloudWatch metric when a filter pattern matches a log event.
public MetricTransformation withMetricValue(String metricValue)
The value to publish to the CloudWatch metric when a filter pattern matches a log event.
metricValue
- The value to publish to the CloudWatch metric when a filter pattern matches a log event.public void setDefaultValue(Double defaultValue)
(Optional) The value to emit when a filter pattern does not match a log event. This value can be null.
defaultValue
- (Optional) The value to emit when a filter pattern does not match a log event. This value can be null.public Double getDefaultValue()
(Optional) The value to emit when a filter pattern does not match a log event. This value can be null.
public MetricTransformation withDefaultValue(Double defaultValue)
(Optional) The value to emit when a filter pattern does not match a log event. This value can be null.
defaultValue
- (Optional) The value to emit when a filter pattern does not match a log event. This value can be null.public Map<String,String> getDimensions()
The fields to use as dimensions for the metric. One metric filter can include as many as three dimensions.
Metrics extracted from log events are charged as custom metrics. To prevent unexpected high charges, do not
specify high-cardinality fields such as IPAddress
or requestID
as dimensions. Each
different value found for a dimension is treated as a separate metric and accrues charges as a separate custom
metric.
CloudWatch Logs disables a metric filter if it generates 1000 different name/value pairs for your specified dimensions within a certain amount of time. This helps to prevent accidental high charges.
You can also set up a billing alarm to alert you if your charges are higher than expected. For more information, see Creating a Billing Alarm to Monitor Your Estimated Amazon Web Services Charges.
Metrics extracted from log events are charged as custom metrics. To prevent unexpected high charges, do
not specify high-cardinality fields such as IPAddress
or requestID
as
dimensions. Each different value found for a dimension is treated as a separate metric and accrues
charges as a separate custom metric.
CloudWatch Logs disables a metric filter if it generates 1000 different name/value pairs for your specified dimensions within a certain amount of time. This helps to prevent accidental high charges.
You can also set up a billing alarm to alert you if your charges are higher than expected. For more information, see Creating a Billing Alarm to Monitor Your Estimated Amazon Web Services Charges.
public void setDimensions(Map<String,String> dimensions)
The fields to use as dimensions for the metric. One metric filter can include as many as three dimensions.
Metrics extracted from log events are charged as custom metrics. To prevent unexpected high charges, do not
specify high-cardinality fields such as IPAddress
or requestID
as dimensions. Each
different value found for a dimension is treated as a separate metric and accrues charges as a separate custom
metric.
CloudWatch Logs disables a metric filter if it generates 1000 different name/value pairs for your specified dimensions within a certain amount of time. This helps to prevent accidental high charges.
You can also set up a billing alarm to alert you if your charges are higher than expected. For more information, see Creating a Billing Alarm to Monitor Your Estimated Amazon Web Services Charges.
dimensions
- The fields to use as dimensions for the metric. One metric filter can include as many as three
dimensions.
Metrics extracted from log events are charged as custom metrics. To prevent unexpected high charges, do
not specify high-cardinality fields such as IPAddress
or requestID
as
dimensions. Each different value found for a dimension is treated as a separate metric and accrues charges
as a separate custom metric.
CloudWatch Logs disables a metric filter if it generates 1000 different name/value pairs for your specified dimensions within a certain amount of time. This helps to prevent accidental high charges.
You can also set up a billing alarm to alert you if your charges are higher than expected. For more information, see Creating a Billing Alarm to Monitor Your Estimated Amazon Web Services Charges.
public MetricTransformation withDimensions(Map<String,String> dimensions)
The fields to use as dimensions for the metric. One metric filter can include as many as three dimensions.
Metrics extracted from log events are charged as custom metrics. To prevent unexpected high charges, do not
specify high-cardinality fields such as IPAddress
or requestID
as dimensions. Each
different value found for a dimension is treated as a separate metric and accrues charges as a separate custom
metric.
CloudWatch Logs disables a metric filter if it generates 1000 different name/value pairs for your specified dimensions within a certain amount of time. This helps to prevent accidental high charges.
You can also set up a billing alarm to alert you if your charges are higher than expected. For more information, see Creating a Billing Alarm to Monitor Your Estimated Amazon Web Services Charges.
dimensions
- The fields to use as dimensions for the metric. One metric filter can include as many as three
dimensions.
Metrics extracted from log events are charged as custom metrics. To prevent unexpected high charges, do
not specify high-cardinality fields such as IPAddress
or requestID
as
dimensions. Each different value found for a dimension is treated as a separate metric and accrues charges
as a separate custom metric.
CloudWatch Logs disables a metric filter if it generates 1000 different name/value pairs for your specified dimensions within a certain amount of time. This helps to prevent accidental high charges.
You can also set up a billing alarm to alert you if your charges are higher than expected. For more information, see Creating a Billing Alarm to Monitor Your Estimated Amazon Web Services Charges.
public MetricTransformation addDimensionsEntry(String key, String value)
public MetricTransformation clearDimensionsEntries()
public void setUnit(String unit)
The unit to assign to the metric. If you omit this, the unit is set as None
.
unit
- The unit to assign to the metric. If you omit this, the unit is set as None
.StandardUnit
public String getUnit()
The unit to assign to the metric. If you omit this, the unit is set as None
.
None
.StandardUnit
public MetricTransformation withUnit(String unit)
The unit to assign to the metric. If you omit this, the unit is set as None
.
unit
- The unit to assign to the metric. If you omit this, the unit is set as None
.StandardUnit
public MetricTransformation withUnit(StandardUnit unit)
The unit to assign to the metric. If you omit this, the unit is set as None
.
unit
- The unit to assign to the metric. If you omit this, the unit is set as None
.StandardUnit
public String toString()
toString
in class Object
Object.toString()
public MetricTransformation clone()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.