Package org.cdk8s.plus24
Class ScalingTarget.Builder
- java.lang.Object
-
- org.cdk8s.plus24.ScalingTarget.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<ScalingTarget>
- Enclosing interface:
- ScalingTarget
@Stability(Stable) public static final class ScalingTarget.Builder extends Object implements software.amazon.jsii.Builder<ScalingTarget>
A builder forScalingTarget
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ScalingTarget.Builder
apiVersion(String apiVersion)
Sets the value ofScalingTarget.getApiVersion()
ScalingTarget
build()
Builds the configured instance.ScalingTarget.Builder
containers(List<? extends Container> containers)
Sets the value ofScalingTarget.getContainers()
ScalingTarget.Builder
kind(String kind)
Sets the value ofScalingTarget.getKind()
ScalingTarget.Builder
name(String name)
Sets the value ofScalingTarget.getName()
ScalingTarget.Builder
replicas(Number replicas)
Sets the value ofScalingTarget.getReplicas()
-
-
-
Method Detail
-
apiVersion
@Stability(Stable) public ScalingTarget.Builder apiVersion(String apiVersion)
Sets the value ofScalingTarget.getApiVersion()
- Parameters:
apiVersion
- The object's API version (e.g. "authorization.k8s.io/v1"). This parameter is required.- Returns:
this
-
containers
@Stability(Stable) public ScalingTarget.Builder containers(List<? extends Container> containers)
Sets the value ofScalingTarget.getContainers()
- Parameters:
containers
- Container definitions associated with the target. This parameter is required.- Returns:
this
-
kind
@Stability(Stable) public ScalingTarget.Builder kind(String kind)
Sets the value ofScalingTarget.getKind()
- Parameters:
kind
- The object kind (e.g. "Deployment"). This parameter is required.- Returns:
this
-
name
@Stability(Stable) public ScalingTarget.Builder name(String name)
Sets the value ofScalingTarget.getName()
- Parameters:
name
- The Kubernetes name of this resource. This parameter is required.- Returns:
this
-
replicas
@Stability(Stable) public ScalingTarget.Builder replicas(Number replicas)
Sets the value ofScalingTarget.getReplicas()
- Parameters:
replicas
- The fixed number of replicas defined on the target. This is used for validation purposes as Scalable targets should not have a fixed number of replicas.- Returns:
this
-
build
@Stability(Stable) public ScalingTarget build()
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<ScalingTarget>
- Returns:
- a new instance of
ScalingTarget
- Throws:
NullPointerException
- if any required attribute was not provided
-
-