Class NetworkPolicySpec.Jsii$Proxy
- java.lang.Object
-
- software.amazon.jsii.JsiiObject
-
- org.cdk8s.plus24.k8s.NetworkPolicySpec.Jsii$Proxy
-
- All Implemented Interfaces:
NetworkPolicySpec
,software.amazon.jsii.JsiiSerializable
- Enclosing interface:
- NetworkPolicySpec
@Stability(Stable) @Internal public static final class NetworkPolicySpec.Jsii$Proxy extends software.amazon.jsii.JsiiObject implements NetworkPolicySpec
An implementation forNetworkPolicySpec
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
-
Nested classes/interfaces inherited from interface org.cdk8s.plus24.k8s.NetworkPolicySpec
NetworkPolicySpec.Builder, NetworkPolicySpec.Jsii$Proxy
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Jsii$Proxy(NetworkPolicySpec.Builder builder)
Constructor that initializes the object based on literal property values passed by theNetworkPolicySpec.Builder
.protected
Jsii$Proxy(software.amazon.jsii.JsiiObjectRef objRef)
Constructor that initializes the object based on values retrieved from the JsiiObject.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.fasterxml.jackson.databind.JsonNode
$jsii$toJson()
boolean
equals(Object o)
List<NetworkPolicyEgressRule>
getEgress()
List of egress rules to be applied to the selected pods.List<NetworkPolicyIngressRule>
getIngress()
List of ingress rules to be applied to the selected pods.LabelSelector
getPodSelector()
Selects the pods to which this NetworkPolicy object applies.List<String>
getPolicyTypes()
List of rule types that the NetworkPolicy relates to.int
hashCode()
-
-
-
Constructor Detail
-
Jsii$Proxy
protected Jsii$Proxy(software.amazon.jsii.JsiiObjectRef objRef)
Constructor that initializes the object based on values retrieved from the JsiiObject.- Parameters:
objRef
- Reference to the JSII managed object.
-
Jsii$Proxy
protected Jsii$Proxy(NetworkPolicySpec.Builder builder)
Constructor that initializes the object based on literal property values passed by theNetworkPolicySpec.Builder
.
-
-
Method Detail
-
getPodSelector
public final LabelSelector getPodSelector()
Description copied from interface:NetworkPolicySpec
Selects the pods to which this NetworkPolicy object applies.The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace.
- Specified by:
getPodSelector
in interfaceNetworkPolicySpec
-
getEgress
public final List<NetworkPolicyEgressRule> getEgress()
Description copied from interface:NetworkPolicySpec
List of egress rules to be applied to the selected pods.Outgoing traffic is allowed if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic matches at least one egress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy limits all outgoing traffic (and serves solely to ensure that the pods it selects are isolated by default). This field is beta-level in 1.8
- Specified by:
getEgress
in interfaceNetworkPolicySpec
-
getIngress
public final List<NetworkPolicyIngressRule> getIngress()
Description copied from interface:NetworkPolicySpec
List of ingress rules to be applied to the selected pods.Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic source is the pod's local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy does not allow any traffic (and serves solely to ensure that the pods it selects are isolated by default)
- Specified by:
getIngress
in interfaceNetworkPolicySpec
-
getPolicyTypes
public final List<String> getPolicyTypes()
Description copied from interface:NetworkPolicySpec
List of rule types that the NetworkPolicy relates to.Valid options are ["Ingress"], ["Egress"], or ["Ingress", "Egress"]. If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include "Egress" (since such a policy would not include an Egress section and would otherwise default to just [ "Ingress" ]). This field is beta-level in 1.8
- Specified by:
getPolicyTypes
in interfaceNetworkPolicySpec
-
$jsii$toJson
@Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson()
- Specified by:
$jsii$toJson
in interfacesoftware.amazon.jsii.JsiiSerializable
-
-