Package org.cdk8s.plus22
Class ExposeDeploymentViaServiceOptions.Builder
- java.lang.Object
-
- org.cdk8s.plus22.ExposeDeploymentViaServiceOptions.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<ExposeDeploymentViaServiceOptions>
- Enclosing interface:
- ExposeDeploymentViaServiceOptions
@Stability(Stable) public static final class ExposeDeploymentViaServiceOptions.Builder extends Object implements software.amazon.jsii.Builder<ExposeDeploymentViaServiceOptions>
A builder forExposeDeploymentViaServiceOptions
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExposeDeploymentViaServiceOptionsbuild()Builds the configured instance.ExposeDeploymentViaServiceOptions.Buildername(String name)Sets the value ofExposeDeploymentViaServiceOptions.getName()ExposeDeploymentViaServiceOptions.Builderport(Number port)Sets the value ofExposeDeploymentViaServiceOptions.getPort()ExposeDeploymentViaServiceOptions.Builderprotocol(Protocol protocol)Sets the value ofExposeDeploymentViaServiceOptions.getProtocol()ExposeDeploymentViaServiceOptions.BuilderserviceType(ServiceType serviceType)Sets the value ofExposeDeploymentViaServiceOptions.getServiceType()ExposeDeploymentViaServiceOptions.BuildertargetPort(Number targetPort)Sets the value ofExposeDeploymentViaServiceOptions.getTargetPort()
-
-
-
Method Detail
-
name
@Stability(Stable) public ExposeDeploymentViaServiceOptions.Builder name(String name)
Sets the value ofExposeDeploymentViaServiceOptions.getName()- Parameters:
name- The name of the service to expose. This will be set on the Service.metadata and must be a DNS_LABEL- Returns:
this
-
port
@Stability(Stable) public ExposeDeploymentViaServiceOptions.Builder port(Number port)
Sets the value ofExposeDeploymentViaServiceOptions.getPort()- Parameters:
port- The port that the service should serve on.- Returns:
this
-
protocol
@Stability(Stable) public ExposeDeploymentViaServiceOptions.Builder protocol(Protocol protocol)
Sets the value ofExposeDeploymentViaServiceOptions.getProtocol()- Parameters:
protocol- The IP protocol for this port. Supports "TCP", "UDP", and "SCTP". Default is TCP.- Returns:
this
-
serviceType
@Stability(Stable) public ExposeDeploymentViaServiceOptions.Builder serviceType(ServiceType serviceType)
Sets the value ofExposeDeploymentViaServiceOptions.getServiceType()- Parameters:
serviceType- The type of the exposed service.- Returns:
this
-
targetPort
@Stability(Stable) public ExposeDeploymentViaServiceOptions.Builder targetPort(Number targetPort)
Sets the value ofExposeDeploymentViaServiceOptions.getTargetPort()- Parameters:
targetPort- The port number the service will redirect to.- Returns:
this
-
build
@Stability(Stable) public ExposeDeploymentViaServiceOptions build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<ExposeDeploymentViaServiceOptions>- Returns:
- a new instance of
ExposeDeploymentViaServiceOptions - Throws:
NullPointerException- if any required attribute was not provided
-
-