Package org.cdk8s.plus22
Interface ContainerPort
-
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
ContainerPort.Jsii$Proxy
@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-11T03:06:34.942Z") @Stability(Stable) public interface ContainerPort extends software.amazon.jsii.JsiiSerializable
Represents a network port in a single container.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classContainerPort.BuilderA builder forContainerPortstatic classContainerPort.Jsii$ProxyAn implementation forContainerPort
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static ContainerPort.Builderbuilder()default StringgetHostIp()What host IP to bind the external port to.default NumbergetHostPort()Number of port to expose on the host.default StringgetName()If specified, this must be an IANA_SVC_NAME and unique within the pod.NumbergetNumber()Number of port to expose on the pod's IP address.default ProtocolgetProtocol()Protocol for port.
-
-
-
Method Detail
-
getNumber
@Stability(Stable) @NotNull Number getNumber()
Number of port to expose on the pod's IP address.This must be a valid port number, 0 < x < 65536.
-
getHostIp
@Stability(Stable) @Nullable default String getHostIp()
What host IP to bind the external port to.Default: - 127.0.0.1.
-
getHostPort
@Stability(Stable) @Nullable default Number getHostPort()
Number of port to expose on the host.If specified, this must be a valid port number, 0 < x < 65536. Most containers do not need this.
Default: - auto generated by kubernetes and might change on restarts.
-
getName
@Stability(Stable) @Nullable default String getName()
If specified, this must be an IANA_SVC_NAME and unique within the pod.Each named port in a pod must have a unique name. Name for the port that can be referred to by services.
Default: - port is not named.
-
getProtocol
@Stability(Stable) @Nullable default Protocol getProtocol()
Protocol for port.Must be UDP, TCP, or SCTP. Defaults to "TCP".
Default: Protocol.TCP
-
builder
@Stability(Stable) static ContainerPort.Builder builder()
- Returns:
- a
ContainerPort.BuilderofContainerPort
-
-