Package org.cdk8s.plus24
Class MetricObjectOptions.Builder
- java.lang.Object
-
- org.cdk8s.plus24.MetricObjectOptions.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<MetricObjectOptions>
- Enclosing interface:
- MetricObjectOptions
@Stability(Stable) public static final class MetricObjectOptions.Builder extends Object implements software.amazon.jsii.Builder<MetricObjectOptions>
A builder forMetricObjectOptions
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MetricObjectOptions
build()
Builds the configured instance.MetricObjectOptions.Builder
labelSelector(LabelSelector labelSelector)
Sets the value ofMetricOptions.getLabelSelector()
MetricObjectOptions.Builder
name(String name)
Sets the value ofMetricOptions.getName()
MetricObjectOptions.Builder
object(IResource object)
Sets the value ofMetricObjectOptions.getObject()
MetricObjectOptions.Builder
target(MetricTarget target)
Sets the value ofMetricOptions.getTarget()
-
-
-
Method Detail
-
object
@Stability(Stable) public MetricObjectOptions.Builder object(IResource object)
Sets the value ofMetricObjectOptions.getObject()
- Parameters:
object
- Resource where the metric can be found. This parameter is required.- Returns:
this
-
name
@Stability(Stable) public MetricObjectOptions.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 MetricObjectOptions.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 MetricObjectOptions.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 MetricObjectOptions build()
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<MetricObjectOptions>
- Returns:
- a new instance of
MetricObjectOptions
- Throws:
NullPointerException
- if any required attribute was not provided
-
-