Interface MetricStat.Builder
-
- All Superinterfaces:
Buildable
,CopyableBuilder<MetricStat.Builder,MetricStat>
,SdkBuilder<MetricStat.Builder,MetricStat>
,SdkPojo
- Enclosing class:
- MetricStat
public static interface MetricStat.Builder extends SdkPojo, CopyableBuilder<MetricStat.Builder,MetricStat>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default MetricStat.Builder
metric(Consumer<Metric.Builder> metric)
The CloudWatch metric to return, including the metric name, namespace, and dimensions.MetricStat.Builder
metric(Metric metric)
The CloudWatch metric to return, including the metric name, namespace, and dimensions.MetricStat.Builder
stat(String stat)
The statistic to return.MetricStat.Builder
unit(String unit)
The unit to use for the returned data points.-
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
-
metric
MetricStat.Builder metric(Metric metric)
The CloudWatch metric to return, including the metric name, namespace, and dimensions. To get the exact metric name, namespace, and dimensions, inspect the Metric object that is returned by a call to ListMetrics.
- Parameters:
metric
- The CloudWatch metric to return, including the metric name, namespace, and dimensions. To get the exact metric name, namespace, and dimensions, inspect the Metric object that is returned by a call to ListMetrics.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
metric
default MetricStat.Builder metric(Consumer<Metric.Builder> metric)
The CloudWatch metric to return, including the metric name, namespace, and dimensions. To get the exact metric name, namespace, and dimensions, inspect the Metric object that is returned by a call to ListMetrics.
This is a convenience method that creates an instance of theMetric.Builder
avoiding the need to create one manually viaMetric.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed tometric(Metric)
.- Parameters:
metric
- a consumer that will call methods onMetric.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
metric(Metric)
-
stat
MetricStat.Builder stat(String stat)
The statistic to return. It can include any CloudWatch statistic or extended statistic. For a list of valid values, see the table in Statistics in the Amazon CloudWatch User Guide.
The most commonly used metrics for predictive scaling are
Average
andSum
.- Parameters:
stat
- The statistic to return. It can include any CloudWatch statistic or extended statistic. For a list of valid values, see the table in Statistics in the Amazon CloudWatch User Guide.The most commonly used metrics for predictive scaling are
Average
andSum
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
unit
MetricStat.Builder unit(String unit)
The unit to use for the returned data points. For a complete list of the units that CloudWatch supports, see the MetricDatum data type in the Amazon CloudWatch API Reference.
- Parameters:
unit
- The unit to use for the returned data points. For a complete list of the units that CloudWatch supports, see the MetricDatum data type in the Amazon CloudWatch API Reference.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-