Interface MetricTransformation.Builder
-
- All Superinterfaces:
Buildable
,CopyableBuilder<MetricTransformation.Builder,MetricTransformation>
,SdkBuilder<MetricTransformation.Builder,MetricTransformation>
,SdkPojo
- Enclosing class:
- MetricTransformation
public static interface MetricTransformation.Builder extends SdkPojo, CopyableBuilder<MetricTransformation.Builder,MetricTransformation>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description MetricTransformation.Builder
defaultValue(Double defaultValue)
(Optional) The value to emit when a filter pattern does not match a log event.MetricTransformation.Builder
dimensions(Map<String,String> dimensions)
The fields to use as dimensions for the metric.MetricTransformation.Builder
metricName(String metricName)
The name of the CloudWatch metric.MetricTransformation.Builder
metricNamespace(String metricNamespace)
A custom namespace to contain your metric in CloudWatch.MetricTransformation.Builder
metricValue(String metricValue)
The value to publish to the CloudWatch metric when a filter pattern matches a log event.MetricTransformation.Builder
unit(String unit)
The unit to assign to the metric.MetricTransformation.Builder
unit(StandardUnit unit)
The unit to assign to the metric.-
Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
-
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
-
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFields
-
-
-
-
Method Detail
-
metricName
MetricTransformation.Builder metricName(String metricName)
The name of the CloudWatch metric.
- Parameters:
metricName
- The name of the CloudWatch metric.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
metricNamespace
MetricTransformation.Builder metricNamespace(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.
- Parameters:
metricNamespace
- A custom namespace to contain your metric in CloudWatch. Use namespaces to group together metrics that are similar. For more information, see Namespaces.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
metricValue
MetricTransformation.Builder metricValue(String metricValue)
The value to publish to the CloudWatch metric when a filter pattern matches a log event.
- Parameters:
metricValue
- The value to publish to the CloudWatch metric when a filter pattern matches a log event.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
defaultValue
MetricTransformation.Builder defaultValue(Double defaultValue)
(Optional) The value to emit when a filter pattern does not match a log event. This value can be null.
- Parameters:
defaultValue
- (Optional) The value to emit when a filter pattern does not match a log event. This value can be null.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
dimensions
MetricTransformation.Builder dimensions(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
orrequestID
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.
- Parameters:
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
orrequestID
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.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
unit
MetricTransformation.Builder unit(String unit)
The unit to assign to the metric. If you omit this, the unit is set as
None
.- Parameters:
unit
- The unit to assign to the metric. If you omit this, the unit is set asNone
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
StandardUnit
,StandardUnit
-
unit
MetricTransformation.Builder unit(StandardUnit unit)
The unit to assign to the metric. If you omit this, the unit is set as
None
.- Parameters:
unit
- The unit to assign to the metric. If you omit this, the unit is set asNone
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
StandardUnit
,StandardUnit
-
-