Show / Hide Table of Contents

Class V1NetworkPolicyEgressRule

NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to. This type is beta-level in 1.8

Inheritance
object
V1NetworkPolicyEgressRule
Implements
IEquatable<V1NetworkPolicyEgressRule>
Inherited Members
object.GetType()
object.MemberwiseClone()
object.Equals(object, object)
object.ReferenceEquals(object, object)
Namespace: k8s.Models
Assembly: KubernetesClient.dll
Syntax
public record V1NetworkPolicyEgressRule : IEquatable<V1NetworkPolicyEgressRule>

Constructors

View Source

V1NetworkPolicyEgressRule()

Declaration
public V1NetworkPolicyEgressRule()
View Source

V1NetworkPolicyEgressRule(V1NetworkPolicyEgressRule)

Declaration
protected V1NetworkPolicyEgressRule(V1NetworkPolicyEgressRule original)
Parameters
Type Name Description
V1NetworkPolicyEgressRule original

Properties

View Source

EqualityContract

Declaration
protected virtual Type EqualityContract { get; }
Property Value
Type Description
Type
View Source

Ports

ports is a list of destination ports for outgoing traffic. 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.

Declaration
[JsonPropertyName("ports")]
public IList<V1NetworkPolicyPort> Ports { get; set; }
Property Value
Type Description
IList<V1NetworkPolicyPort>
View Source

To

to is a list of destinations for outgoing traffic of 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 destinations (traffic not restricted by destination). 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 to list.

Declaration
[JsonPropertyName("to")]
public IList<V1NetworkPolicyPeer> To { get; set; }
Property Value
Type Description
IList<V1NetworkPolicyPeer>

Methods

View Source

Equals(object?)

Declaration
public override bool Equals(object? obj)
Parameters
Type Name Description
object obj
Returns
Type Description
bool
Overrides
object.Equals(object)
View Source

Equals(V1NetworkPolicyEgressRule?)

Declaration
public virtual bool Equals(V1NetworkPolicyEgressRule? other)
Parameters
Type Name Description
V1NetworkPolicyEgressRule other
Returns
Type Description
bool
View Source

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
int
Overrides
object.GetHashCode()
View Source

PrintMembers(StringBuilder)

Declaration
protected virtual bool PrintMembers(StringBuilder builder)
Parameters
Type Name Description
StringBuilder builder
Returns
Type Description
bool
View Source

ToString()

Declaration
public override string ToString()
Returns
Type Description
string
Overrides
object.ToString()

Operators

View Source

operator ==(V1NetworkPolicyEgressRule?, V1NetworkPolicyEgressRule?)

Declaration
public static bool operator ==(V1NetworkPolicyEgressRule? left, V1NetworkPolicyEgressRule? right)
Parameters
Type Name Description
V1NetworkPolicyEgressRule left
V1NetworkPolicyEgressRule right
Returns
Type Description
bool
View Source

operator !=(V1NetworkPolicyEgressRule?, V1NetworkPolicyEgressRule?)

Declaration
public static bool operator !=(V1NetworkPolicyEgressRule? left, V1NetworkPolicyEgressRule? right)
Parameters
Type Name Description
V1NetworkPolicyEgressRule left
V1NetworkPolicyEgressRule right
Returns
Type Description
bool

Implements

IEquatable<T>
  • View Source
In this article
Back to top Generated by DocFX