Package org.cdk8s.plus20
Interface ServicePortOptions
-
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Subinterfaces:
AddDeploymentOptions,ServicePort
- All Known Implementing Classes:
AddDeploymentOptions.Jsii$Proxy,ServicePort.Jsii$Proxy,ServicePortOptions.Jsii$Proxy
@Generated(value="jsii-pacmak/1.54.0 (build b1b977a)", date="2022-03-07T02:28:27.997Z") @Stability(Stable) public interface ServicePortOptions extends software.amazon.jsii.JsiiSerializable
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classServicePortOptions.BuilderA builder forServicePortOptionsstatic classServicePortOptions.Jsii$ProxyAn implementation forServicePortOptions
-
Method Summary
All Methods Static Methods Instance Methods Default Methods Modifier and Type Method Description static ServicePortOptions.Builderbuilder()default StringgetName()The name of this port within the service.default NumbergetNodePort()The port on each node on which this service is exposed when type=NodePort or LoadBalancer.default ProtocolgetProtocol()The IP protocol for this port.default NumbergetTargetPort()The port number the service will redirect to.
-
-
-
Method Detail
-
getName
@Stability(Stable) @Nullable default String getName()
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.
-
getNodePort
@Stability(Stable) @Nullable default Number getNodePort()
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.
Default: - auto-allocate a port if the ServiceType of this Service requires one.
-
getProtocol
@Stability(Stable) @Nullable default Protocol getProtocol()
The IP protocol for this port.Supports "TCP", "UDP", and "SCTP". Default is TCP.
Default: Protocol.TCP
-
getTargetPort
@Stability(Stable) @Nullable default Number getTargetPort()
The port number the service will redirect to.Default: - The value of `port` will be used.
-
builder
@Stability(Stable) static ServicePortOptions.Builder builder()
- Returns:
- a
ServicePortOptions.BuilderofServicePortOptions
-
-