Package org.cdk8s.plus25
Class NetworkPolicyIpBlock
- java.lang.Object
-
- software.amazon.jsii.JsiiObject
-
- software.constructs.Construct
-
- org.cdk8s.plus25.NetworkPolicyIpBlock
-
- All Implemented Interfaces:
INetworkPolicyPeer,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.88.0 (build eaabd08)", date="2023-09-11T06:17:58.366Z") @Stability(Stable) public class NetworkPolicyIpBlock extends software.constructs.Construct implements INetworkPolicyPeer
Describes a particular CIDR (Ex."192.168.1.1/24","2001:db9::/64") that is allowed to the pods matched by a network policy selector. The except entry describes CIDRs that should not be included within this rule.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
-
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default, software.constructs.IConstruct.Jsii$Proxy
-
Nested classes/interfaces inherited from interface org.cdk8s.plus25.INetworkPolicyPeer
INetworkPolicyPeer.Jsii$Default, INetworkPolicyPeer.Jsii$Proxy
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedNetworkPolicyIpBlock(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)protectedNetworkPolicyIpBlock(software.amazon.jsii.JsiiObjectRef objRef)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static NetworkPolicyIpBlockanyIpv4(software.constructs.Construct scope, String id)Any IPv4 address.static NetworkPolicyIpBlockanyIpv6(software.constructs.Construct scope, String id)Any IPv6 address.StringgetCidr()A string representing the IP Block Valid examples are "192.168.1.1/24" or "2001:db9::/64".List<String>getExcept()A slice of CIDRs that should not be included within an IP Block Valid examples are "192.168.1.1/24" or "2001:db9::/64".static NetworkPolicyIpBlockipv4(software.constructs.Construct scope, String id, String cidrIp)Create an IPv4 peer from a CIDR.static NetworkPolicyIpBlockipv4(software.constructs.Construct scope, String id, String cidrIp, List<String> except)Create an IPv4 peer from a CIDR.static NetworkPolicyIpBlockipv6(software.constructs.Construct scope, String id, String cidrIp)Create an IPv6 peer from a CIDR.static NetworkPolicyIpBlockipv6(software.constructs.Construct scope, String id, String cidrIp, List<String> except)Create an IPv6 peer from a CIDR.NetworkPolicyPeerConfigtoNetworkPolicyPeerConfig()Return the configuration of this peer.IPodSelectortoPodSelector()Convert the peer into a pod selector, if possible.-
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
-
-
-
-
Method Detail
-
anyIpv4
@Stability(Stable) @NotNull public static NetworkPolicyIpBlock anyIpv4(@NotNull software.constructs.Construct scope, @NotNull String id)
Any IPv4 address.- Parameters:
scope- This parameter is required.id- This parameter is required.
-
anyIpv6
@Stability(Stable) @NotNull public static NetworkPolicyIpBlock anyIpv6(@NotNull software.constructs.Construct scope, @NotNull String id)
Any IPv6 address.- Parameters:
scope- This parameter is required.id- This parameter is required.
-
ipv4
@Stability(Stable) @NotNull public static NetworkPolicyIpBlock ipv4(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String cidrIp, @Nullable List<String> except)
Create an IPv4 peer from a CIDR.- Parameters:
scope- This parameter is required.id- This parameter is required.cidrIp- This parameter is required.except-
-
ipv4
@Stability(Stable) @NotNull public static NetworkPolicyIpBlock ipv4(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String cidrIp)
Create an IPv4 peer from a CIDR.- Parameters:
scope- This parameter is required.id- This parameter is required.cidrIp- This parameter is required.
-
ipv6
@Stability(Stable) @NotNull public static NetworkPolicyIpBlock ipv6(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String cidrIp, @Nullable List<String> except)
Create an IPv6 peer from a CIDR.- Parameters:
scope- This parameter is required.id- This parameter is required.cidrIp- This parameter is required.except-
-
ipv6
@Stability(Stable) @NotNull public static NetworkPolicyIpBlock ipv6(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String cidrIp)
Create an IPv6 peer from a CIDR.- Parameters:
scope- This parameter is required.id- This parameter is required.cidrIp- This parameter is required.
-
toNetworkPolicyPeerConfig
@Stability(Stable) @NotNull public NetworkPolicyPeerConfig toNetworkPolicyPeerConfig()
Return the configuration of this peer.- Specified by:
toNetworkPolicyPeerConfigin interfaceINetworkPolicyPeer- See Also:
- INetworkPolicyPeer.toNetworkPolicyPeerConfig()
-
toPodSelector
@Stability(Stable) @Nullable public IPodSelector toPodSelector()
Convert the peer into a pod selector, if possible.- Specified by:
toPodSelectorin interfaceINetworkPolicyPeer- See Also:
- INetworkPolicyPeer.toPodSelector()
-
getCidr
@Stability(Stable) @NotNull public String getCidr()
A string representing the IP Block Valid examples are "192.168.1.1/24" or "2001:db9::/64".
-
-