Package org.cdk8s.plus24
Class AddDeploymentOptions.Builder
- java.lang.Object
-
- org.cdk8s.plus24.AddDeploymentOptions.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<AddDeploymentOptions>
- Enclosing interface:
- AddDeploymentOptions
@Stability(Stable) public static final class AddDeploymentOptions.Builder extends Object implements software.amazon.jsii.Builder<AddDeploymentOptions>
A builder forAddDeploymentOptions
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AddDeploymentOptions
build()
Builds the configured instance.AddDeploymentOptions.Builder
name(String name)
Sets the value ofServiceBindOptions.getName()
AddDeploymentOptions.Builder
nodePort(Number nodePort)
Sets the value ofServiceBindOptions.getNodePort()
AddDeploymentOptions.Builder
port(Number port)
Sets the value ofAddDeploymentOptions.getPort()
AddDeploymentOptions.Builder
protocol(Protocol protocol)
Sets the value ofServiceBindOptions.getProtocol()
AddDeploymentOptions.Builder
targetPort(Number targetPort)
Sets the value ofServiceBindOptions.getTargetPort()
-
-
-
Method Detail
-
port
@Stability(Stable) public AddDeploymentOptions.Builder port(Number port)
Sets the value ofAddDeploymentOptions.getPort()
- Parameters:
port
- The port number the service will bind to.- Returns:
this
-
name
@Stability(Stable) public AddDeploymentOptions.Builder name(String name)
Sets the value ofServiceBindOptions.getName()
- Parameters:
name
- The name of this port within the service. This must be a DNS_LABEL. All ports within a ServiceSpec must have unique names. This maps to the 'Name' field in EndpointPort objects. Optional if only one ServicePort is defined on this service.- Returns:
this
-
nodePort
@Stability(Stable) public AddDeploymentOptions.Builder nodePort(Number nodePort)
Sets the value ofServiceBindOptions.getNodePort()
- Parameters:
nodePort
- The port on each node on which this service is exposed when type=NodePort or LoadBalancer. Usually assigned by the system. If specified, it will be allocated to the service if unused or else creation of the service will fail. Default is to auto-allocate a port if the ServiceType of this Service requires one.- Returns:
this
-
protocol
@Stability(Stable) public AddDeploymentOptions.Builder protocol(Protocol protocol)
Sets the value ofServiceBindOptions.getProtocol()
- Parameters:
protocol
- The IP protocol for this port. Supports "TCP", "UDP", and "SCTP". Default is TCP.- Returns:
this
-
targetPort
@Stability(Stable) public AddDeploymentOptions.Builder targetPort(Number targetPort)
Sets the value ofServiceBindOptions.getTargetPort()
- Parameters:
targetPort
- The port number the service will redirect to.- Returns:
this
-
build
@Stability(Stable) public AddDeploymentOptions build()
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<AddDeploymentOptions>
- Returns:
- a new instance of
AddDeploymentOptions
- Throws:
NullPointerException
- if any required attribute was not provided
-
-