Package org.cdk8s.plus24
Class NetworkPolicyIpBlock
- java.lang.Object
-
- software.amazon.jsii.JsiiObject
-
- software.constructs.Construct
-
- org.cdk8s.plus24.NetworkPolicyIpBlock
-
- All Implemented Interfaces:
INetworkPolicyPeer
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.71.0 (build f1f58ae)", date="2022-11-24T11:18:28.478Z") @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.plus24.INetworkPolicyPeer
INetworkPolicyPeer.Jsii$Default, INetworkPolicyPeer.Jsii$Proxy
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
NetworkPolicyIpBlock(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
protected
NetworkPolicyIpBlock(software.amazon.jsii.JsiiObjectRef objRef)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static NetworkPolicyIpBlock
anyIpv4(software.constructs.Construct scope, String id)
Any IPv4 address.static NetworkPolicyIpBlock
anyIpv6(software.constructs.Construct scope, String id)
Any IPv6 address.String
getCidr()
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 NetworkPolicyIpBlock
ipv4(software.constructs.Construct scope, String id, String cidrIp)
Create an IPv4 peer from a CIDR.static NetworkPolicyIpBlock
ipv4(software.constructs.Construct scope, String id, String cidrIp, List<String> except)
Create an IPv4 peer from a CIDR.static NetworkPolicyIpBlock
ipv6(software.constructs.Construct scope, String id, String cidrIp)
Create an IPv6 peer from a CIDR.static NetworkPolicyIpBlock
ipv6(software.constructs.Construct scope, String id, String cidrIp, List<String> except)
Create an IPv6 peer from a CIDR.NetworkPolicyPeerConfig
toNetworkPolicyPeerConfig()
Return the configuration of this peer.IPodSelector
toPodSelector()
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:
toNetworkPolicyPeerConfig
in interfaceINetworkPolicyPeer
- See Also:
- INetworkPolicyPeer.toNetworkPolicyPeerConfig()
-
toPodSelector
@Stability(Stable) @Nullable public IPodSelector toPodSelector()
Convert the peer into a pod selector, if possible.- Specified by:
toPodSelector
in 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".
-
-