kubernetes_asyncio.client.models.v1_network_policy_egress_rule module

Kubernetes

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501

The version of the OpenAPI document: v1.34.3 Generated by: https://openapi-generator.tech

class kubernetes_asyncio.client.models.v1_network_policy_egress_rule.V1NetworkPolicyEgressRule(ports=None, to=None, local_vars_configuration=None)

Bases: object

NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech

Do not edit the class manually.

attribute_map = {'ports': 'ports', 'to': 'to'}
openapi_types = {'ports': 'list[V1NetworkPolicyPort]', 'to': 'list[V1NetworkPolicyPeer]'}
property ports

Gets the ports of this V1NetworkPolicyEgressRule. # noqa: E501

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. # noqa: E501

Returns:

The ports of this V1NetworkPolicyEgressRule. # noqa: E501

Return type:

list[V1NetworkPolicyPort]

property to

Gets the to of this V1NetworkPolicyEgressRule. # noqa: E501

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. # noqa: E501

Returns:

The to of this V1NetworkPolicyEgressRule. # noqa: E501

Return type:

list[V1NetworkPolicyPeer]

to_dict(serialize=False)

Returns the model properties as a dict

to_str()

Returns the string representation of the model