Package org.cdk8s.plus24
Interface ContainerPort
-
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
ContainerPort.Jsii$Proxy
@Generated(value="jsii-pacmak/1.79.0 (build b22f628)", date="2023-03-31T02:28:41.527Z") @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 class
ContainerPort.Builder
A builder forContainerPort
static class
ContainerPort.Jsii$Proxy
An implementation forContainerPort
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static ContainerPort.Builder
builder()
default String
getHostIp()
What host IP to bind the external port to.default Number
getHostPort()
Number of port to expose on the host.default String
getName()
If specified, this must be an IANA_SVC_NAME and unique within the pod.Number
getNumber()
Number of port to expose on the pod's IP address.default Protocol
getProtocol()
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.Builder
ofContainerPort
-
-