Package org.cdk8s.plus22
Class ExposeDeploymentViaIngressOptions.Builder
- java.lang.Object
-
- org.cdk8s.plus22.ExposeDeploymentViaIngressOptions.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<ExposeDeploymentViaIngressOptions>
- Enclosing interface:
- ExposeDeploymentViaIngressOptions
@Stability(Stable) public static final class ExposeDeploymentViaIngressOptions.Builder extends Object implements software.amazon.jsii.Builder<ExposeDeploymentViaIngressOptions>
A builder forExposeDeploymentViaIngressOptions
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
-
-
-
Method Detail
-
name
@Stability(Stable) public ExposeDeploymentViaIngressOptions.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 ExposeDeploymentViaIngressOptions.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 ExposeDeploymentViaIngressOptions.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 ExposeDeploymentViaIngressOptions.Builder serviceType(ServiceType serviceType)
Sets the value ofExposeDeploymentViaServiceOptions.getServiceType()- Parameters:
serviceType- The type of the exposed service.- Returns:
this
-
targetPort
@Stability(Stable) public ExposeDeploymentViaIngressOptions.Builder targetPort(Number targetPort)
Sets the value ofExposeDeploymentViaServiceOptions.getTargetPort()- Parameters:
targetPort- The port number the service will redirect to.- Returns:
this
-
ingress
@Stability(Stable) public ExposeDeploymentViaIngressOptions.Builder ingress(Ingress ingress)
Sets the value ofExposeServiceViaIngressOptions.getIngress()- Parameters:
ingress- The ingress to add rules to.- Returns:
this
-
pathType
@Stability(Stable) public ExposeDeploymentViaIngressOptions.Builder pathType(HttpIngressPathType pathType)
Sets the value ofExposeServiceViaIngressOptions.getPathType()- Parameters:
pathType- The type of the path.- Returns:
this
-
build
@Stability(Stable) public ExposeDeploymentViaIngressOptions build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<ExposeDeploymentViaIngressOptions>- Returns:
- a new instance of
ExposeDeploymentViaIngressOptions - Throws:
NullPointerException- if any required attribute was not provided
-
-