Package org.cdk8s.plus24.k8s
Interface NetworkPolicyIngressRule
-
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
NetworkPolicyIngressRule.Jsii$Proxy
@Generated(value="jsii-pacmak/1.85.0 (build 08ee592)", date="2023-07-25T00:18:39.453Z") @Stability(Stable) public interface NetworkPolicyIngressRule extends software.amazon.jsii.JsiiSerializable
NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods matched by a NetworkPolicySpec's podSelector.The traffic must match both ports and from.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
NetworkPolicyIngressRule.Builder
A builder forNetworkPolicyIngressRule
static class
NetworkPolicyIngressRule.Jsii$Proxy
An implementation forNetworkPolicyIngressRule
-
Method Summary
All Methods Static Methods Instance Methods Default Methods Modifier and Type Method Description static NetworkPolicyIngressRule.Builder
builder()
default List<NetworkPolicyPeer>
getFrom()
List of sources which should be able to access the pods selected for this rule.default List<NetworkPolicyPort>
getPorts()
List of ports which should be made accessible on the pods selected for this rule.
-
-
-
Method Detail
-
getFrom
@Stability(Stable) @Nullable default List<NetworkPolicyPeer> getFrom()
List of sources which should be able to access the pods selected for this rule.Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all sources (traffic not restricted by source). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the from list.
-
getPorts
@Stability(Stable) @Nullable default List<NetworkPolicyPort> getPorts()
List of ports which should be made accessible on the pods selected for this rule.Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.
-
builder
@Stability(Stable) static NetworkPolicyIngressRule.Builder builder()
- Returns:
- a
NetworkPolicyIngressRule.Builder
ofNetworkPolicyIngressRule
-
-