Package org.cdk8s.plus25
Class MetricOptions.Builder
- java.lang.Object
-
- org.cdk8s.plus25.MetricOptions.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<MetricOptions>
- Enclosing interface:
- MetricOptions
@Stability(Stable) public static final class MetricOptions.Builder extends Object implements software.amazon.jsii.Builder<MetricOptions>
A builder forMetricOptions
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MetricOptionsbuild()Builds the configured instance.MetricOptions.BuilderlabelSelector(LabelSelector labelSelector)Sets the value ofMetricOptions.getLabelSelector()MetricOptions.Buildername(String name)Sets the value ofMetricOptions.getName()MetricOptions.Buildertarget(MetricTarget target)Sets the value ofMetricOptions.getTarget()
-
-
-
Method Detail
-
name
@Stability(Stable) public MetricOptions.Builder name(String name)
Sets the value ofMetricOptions.getName()- Parameters:
name- The name of the metric to scale on. This parameter is required.- Returns:
this
-
target
@Stability(Stable) public MetricOptions.Builder target(MetricTarget target)
Sets the value ofMetricOptions.getTarget()- Parameters:
target- The target metric value that will trigger scaling. This parameter is required.- Returns:
this
-
labelSelector
@Stability(Stable) public MetricOptions.Builder labelSelector(LabelSelector labelSelector)
Sets the value ofMetricOptions.getLabelSelector()- Parameters:
labelSelector- A selector to find a metric by label. When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping.- Returns:
this
-
build
@Stability(Stable) public MetricOptions build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<MetricOptions>- Returns:
- a new instance of
MetricOptions - Throws:
NullPointerException- if any required attribute was not provided
-
-